mgr/nfs: disallow non-existent paths when creating export#49460
mgr/nfs: disallow non-existent paths when creating export#49460
Conversation
857a116 to
7f9e2c3
Compare
b41a50c to
e0c613c
Compare
|
jenkins test make check |
|
jenkins test api |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
no changes made, resolved a conflicted and rebased. |
As we discussed it's a test that is causing the issue, im figuring out how to fix it |
|
@phlogistonjohn Hi there. Seeing your contributions to the mgr/nfs code, pinging you case you have some insights on the issue this PR is facing. Summary of the code before moving to the issue: This PR uses Issues are not faced in teuthology, it's all green but rather make check tests never complete, runs till timeout i.e. 3 hours. I had to run tox tests locally to find out the actual issue that at the time of exit, the run would halt and need manual interruption (CTRL + C) else it would wait till infinity. At first the issue seemed to be with |
I haven't dug into the behavior of CephfsClient much myself but it seems that if adding: did not fix the hang but adding: did I bet the fact that the CephfsClient is created and assigned in ExportMgr.init is an issue: IOW, if there's state that needs to connect to some "real" ceph process this could interfere with the unit tests. I really like that you moved the path check to a function anyway, I think that is a good change regardless of the test hang. But I do think it would be better to only mock I'm not sure about the other aspect. I would probably need to experiment with it locally myself. If you think that would help please just say so, otherwise I'll let you try the above first. Once you have things working I'll be happy to review this as well. I will make one small style suggestion today. |
this helper instantiates CephfsClient, however this was initially planned in ExportMgr class in export.py but due to make check failure where main python thread experienced a dead lock which after several efforts pointed at instantiation of CephfsClient in ExportMgr was problematic, it was decided in order to achieve singleton behavior, func has been added inside this helper func that restricts instantiation using functool's lru_cache. Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
|
small run went fine http://pulpito.front.sepia.ceph.com/dparmar-2023-03-30_10:08:17-orch:cephadm-wip-58228-distro-default-smithi/ scheduling complete run now |
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Also adds a function _nfs_complete_cmd() that returns process obj so that stdout/stderr can be used for evaluation(_nfs_cmd() uses raw_cluster_cmd() that returns just stdout and it became difficult to time cluster creation errors in _test_create_cluster()). It takes sometime to update the cluster data, therefore running the command set (check nfs server status -> nfs cluster create test -> check cluster status) in a loop (max six iteration with sleep of 5 secs at each iteration) fixes the issue. Fixes: https://tracker.ceph.com/issues/58744 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
…terid' Fixes: https://tracker.ceph.com/issues/58758 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Comment in the code says to wait for two minutes as cluster creation takes time but actually it's waiting for thirteen minutes, it's not required to wait this long, i think a minute here is more than enough, also switched to using safe_while(). Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
_get_port_ip_info() fails to fetch port and ip due to empty 'backend' key:
2023-02-24T20:49:09.084 DEBUG:teuthology.orchestra.run.smithi042:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph nfs cluster info test
2023-02-24T20:49:09.471 INFO:teuthology.orchestra.run.smithi042.stdout:{
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout: "test": {
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout: "backend": [],
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout: "virtual_ip": null
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout: }
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:}
it then raises:
2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner: info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))['test']['backend'][0]
2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner:IndexError: list index out of range
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
|
no major changes in last push - https://github.com/ceph/ceph/compare/0ae4720686608595dcf475a83292464a745d3e3c..310286fa185194fdd27bfe7692d516703e18fa11 just the removal of |
thanks venky! |
|
Hi, sorry for the delayed response to this but I am behind on many tasks. Specifically |
|
That looks quite ugly to be honest, don't worry I'll push appropriate change in a follow up PR soon. Thanks for reporting this @phlogistonjohn |
|
Follow up PR #51005 |
|
@phlogistonjohn above commented PR contains patch for the redundancy mentioned in #49460 (comment), as per test results, it should be now something like this: |
Fixes:
_check_nfs_cluster_status()intest_nfs.pySigned-off-by: Dhairya Parmar dparmar@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows