Skip to content

qa/cephfs: upgrade is_mounted() in mount.py#45036

Merged
rishabh-d-dave merged 1 commit intoceph:mainfrom
rishabh-d-dave:qa-fix-is_mounted
Aug 19, 2022
Merged

qa/cephfs: upgrade is_mounted() in mount.py#45036
rishabh-d-dave merged 1 commit intoceph:mainfrom
rishabh-d-dave:qa-fix-is_mounted

Conversation

@rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave commented Feb 15, 2022

Related PR - PR #46988

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@github-actions github-actions bot added cephfs Ceph File System tests labels Feb 15, 2022
@rishabh-d-dave rishabh-d-dave requested review from a team and vshankar February 15, 2022 05:34
@rishabh-d-dave rishabh-d-dave changed the title qa/cephfs: upgrade mount.is_mounted() qa/cephfs: upgrade is_mounted() in mount.py Feb 15, 2022
@rishabh-d-dave
Copy link
Contributor Author

Discussion regarding this patch was initiated here. It's better to backport this PR to prevent bugs. I've created a tracker for the same.

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request Apr 19, 2022
qa/cephfs: upgrade is_mounted() in mount.py

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

@rishabh-d-dave
Copy link
Contributor Author

Just a rebase.

Copy link
Member

@lxbsz lxbsz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@rishabh-d-dave
Copy link
Contributor Author

@vshankar PTAL.

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave rishabh-d-dave added wip-rishabh-testing Rishabh's testing label needs-qa and removed needs-review labels May 10, 2022
rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request May 17, 2022
qa/cephfs: upgrade is_mounted() in mount.py

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

Need to retest this PR with teuth due to recent changes.

@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

jenkins test windows

@rishabh-d-dave rishabh-d-dave requested a review from batrick July 20, 2022 18:48
@rishabh-d-dave
Copy link
Contributor Author

jenkins test windows

@rishabh-d-dave
Copy link
Contributor Author

jenkins test make check

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave
Copy link
Contributor Author

Doesn't look like a related failure - https://jenkins.ceph.com/job/ceph-api/41031/

@rishabh-d-dave
Copy link
Contributor Author

jenkins test api

@rishabh-d-dave
Copy link
Contributor Author

@lxbsz @kotreshhr @nmshelke Please review and approve this PR again. This PR now checks output of cat /proc/self/mounts instead of running findmnt. CephFS tests can have a case where a client, expectedly or unexpectedly, has been evicted. Since findmnt hangs in such a case, we are using to an alternate solution which was suggested by Patrick.

See -

https://github.com/ceph/ceph/pull/45036/files#diff-a31fb9fe7c629a895231a8bd8f0f3f5874dc251130c571fb0ac40a6911c554ceR171-R173

https://github.com/ceph/ceph/compare/e2e233e2ad80227b9516808d647fca6794cc9df3..f96031b9202b2169e2d81746d14daa702864857c

Copy link
Member

@lxbsz lxbsz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@kotreshhr kotreshhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request Jul 21, 2022
qa/cephfs: upgrade is_mounted() in mount.py

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request Jul 21, 2022
qa/cephfs: upgrade is_mounted() in mount.py

Instead of relying on value of a mutable variable, actually check if the
CephFS is mounted on the system. This will prevent bugs due to stale and
incorrect values.

Fixes: https://tracker.ceph.com/issues/54283
Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

rishabh-d-dave commented Jul 21, 2022

Now since we are not using findmnt anymore, this PR no more exposes the issue where findmnt would hang because client has been evicted (this issue is reported at tracker ticket https://traker.ceph.com/issues/56476).

The fact that the tests that failed with findmnt patch now run successfully with the new patch confirms this - http://pulpito.front.sepia.ceph.com/rishabh-2022-07-21_09:19:44-fs-wip-rishabh-fs-auth-subcmd-distro-default-smithi/

This PR is on ready for QA run.

cc: @batrick @vshankar

Copy link
Contributor

@nmshelke nmshelke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dparmar18 dparmar18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rishabh-d-dave rishabh-d-dave added wip-rishabh-testing Rishabh's testing label and removed needs-qa labels Jul 22, 2022
@rishabh-d-dave
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix cephfs Ceph File System tests wip-rishabh-testing Rishabh's testing label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants