New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nautilus: qa: fix various py3 cephfs qa bugs x2 #34470
Conversation
@Vicente-Cheng could you please redo the backport? as i think it should only contain a single commit from #32533 . |
7131078
to
acd53bd
Compare
@tchaikov , already rebased. |
jenkins retest this please |
@Vicente-Cheng thanks for looking into the test failure, i think it's a known issue. see https://tracker.ceph.com/issues/44683 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
#34563 (comment) applies here too. |
@@ -78,7 +78,7 @@ def test_journal_migration(self): | |||
"--path", "/tmp/journal.json"], 0) | |||
p = self.fs.tool_remote.run( | |||
args=[ | |||
"python", | |||
"python3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change. Isn't nautilus still tested with python2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has caused failures as expected,
http://pulpito.ceph.com/yuriw-2020-05-01_18:26:19-fs-wip-yuri2-testing-2020-05-01-1612-nautilus-distro-basic-smithi/5006837/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not required, the reason of failure from the log above is that the script is python2 but python is python3, so there is a syntax error. Instead this should be rewritten so the print
uses parenthesis, also I would recommend to use remote.sh
to avoid extra StringIO handling as follows:
event_count_str = self.fs.tool_remote.sh('''
python -c "import json; print(len(json.load(open('/tmp/journal.json'))))"
''').strip()
event_count = int(event_count_str)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ajarr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment in regards to event_count
calculation.
@Vicente-Cheng at the moment all py3 related fixes in master are supposed to be py2 backward compatible, that is why they might and must be backported, however. |
Hi @kshtsk, Maybe I pick this fix and #34171 would drop this fix from batch commits? Update: I manually backport the part of 7e87f80 like above says. If you have other suggestions please tell me : ) thanks |
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit 6ea2730) Conflicts: qa/tasks/cephfs/test_pool_perm.py - manually modify the py3 compatibility related fix
Fixes: https://tracker.ceph.com/issues/43515 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit ae28ed1)
acd53bd
to
c61236a
Compare
@Vicente-Cheng if your backport is merged before #34171, surely i will drop the corresponding commits in that PR. the whole point of #34171 is 1) to collect all python3 compatibility changes for nautilus 2) to test them. |
backport tracker: https://tracker.ceph.com/issues/44655
backport of #32533
parent tracker: https://tracker.ceph.com/issues/43515
this backport was staged using ceph-backport.sh version 15.1.1.389
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh