Hello Germano Veit Michel, Francesco Romani,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/47105
to review the following change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
vdsm-tool: Do not panic with sanlock empty groups
This fixes the following error:
File "/usr/lib/python2.6/site-packages/vdsm/tool/configurators/ sanlock.py", line 87, in isconfigured .strip().split(" ")] ValueError: invalid literal for int() with base 10: ''
Which happens when sanlock "Groups:" line is empty:
$ grep "Groups:" /proc/<sanlock pid>/status Groups:
Sanlock must have its groups properly setup, but we should not blow up because of this.
Fixed by using split() instead of split(' '), which cannot handle empty string and is the wrong way to split in most cases.
Change-Id: I47f080beb748353970dec0753c9a0a7b1dd09bc6 Bug-Url:https://bugzilla.redhat.com/1267444 Backport-To: 3.6 Backport-To: 3.5 Signed-off-by: Germano Veit Michel germano@redhat.com Signed-off-by: Nir Soffer nsoffer@redhat.com Reviewed-on: https://gerrit.ovirt.org/46742 Reviewed-by: Francesco Romani fromani@redhat.com Continuous-Integration: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/tool/configurators/sanlock.py 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/47105/1
diff --git a/lib/vdsm/tool/configurators/sanlock.py b/lib/vdsm/tool/configurators/sanlock.py index 1c2b3dd..5f21b46 100644 --- a/lib/vdsm/tool/configurators/sanlock.py +++ b/lib/vdsm/tool/configurators/sanlock.py @@ -84,7 +84,7 @@ if status_line.startswith(proc_status_group_prefix): groups = [int(x) for x in status_line[ len(proc_status_group_prefix):] - .strip().split(" ")] + .strip().split()] break else: raise InvalidConfig(
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 1: Verified-1
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::ERROR, At least one bug-url is required for the stable branch * Check merged to previous::WARN, Still open on branches ovirt-3.6
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2:
* update_tracker: OK * Check Bug-Url::OK * Check Public Bug::#1269886::ERROR, private bug * Check Public Bug::WARN, no public bug url found * Check merged to previous::WARN, Still open on branches ovirt-3.6
Allon Mureinik has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2:
Fixed bug url for 3.5 clone
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2: Verified+1
Tested on rhel 6.7 and rhel 7.1
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2: Code-Review+1
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2: -Code-Review
For some reason the CI won't run and I cannot even trigger a build manually.
Allon Mureinik has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2: Code-Review+1
Eyal Edri has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2:
if we want this also in 3.6.0, this has to be backported to 3.6.0 branch as well (master also?)
so: master/3.6/3.6.0
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 2:
Eyal, this is already in master and 3.6: - master: https://gerrit.ovirt.org/46742 - ovirt-3.6: https://gerrit.ovirt.org/47104
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 3: Verified-1
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::ERROR, At least one bug-url is required for the stable branch * Check merged to previous::OK, change not open on any previous branch
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::ERROR, At least one bug-url is required for the stable branch * Check merged to previous::OK, change not open on any previous branch
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5: -Verified
* update_tracker: OK * Check Bug-Url::OK * Check Public Bug::#1269886::ERROR, private bug * Check Public Bug::WARN, no public bug url found * Check merged to previous::OK, change not open on any previous branch
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5:
This version fixes the bug url, a space after Bug-Url: was missing.
David Caro has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5:
it won't run on ci because there are no 3.5 jobs, the automation scripts must be cherry-picked in order to be able to create them
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5: Code-Review+2
Francesco Romani has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5: Code-Review+2
Francesco Romani has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 5: Continuous-Integration+1
run (some) CI tests manually using CI scripts. Seen a few unrelated failures.
Francesco Romani has submitted this change and it was merged.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
vdsm-tool: Do not panic with sanlock empty groups
This fixes the following error:
File "/usr/lib/python2.6/site-packages/vdsm/tool/configurators/ sanlock.py", line 87, in isconfigured .strip().split(" ")] ValueError: invalid literal for int() with base 10: ''
Which happens when sanlock "Groups:" line is empty:
$ grep "Groups:" /proc/<sanlock pid>/status Groups:
Sanlock must have its groups properly setup, but we should not blow up because of this.
Fixed by using split() instead of split(' '), which cannot handle empty string and is the wrong way to split in most cases.
Change-Id: I47f080beb748353970dec0753c9a0a7b1dd09bc6 Bug-Url: https://bugzilla.redhat.com/1269886 Backport-To: 3.6 Backport-To: 3.5 Signed-off-by: Germano Veit Michel germano@redhat.com Signed-off-by: Nir Soffer nsoffer@redhat.com Reviewed-on: https://gerrit.ovirt.org/46742 Reviewed-by: Francesco Romani fromani@redhat.com Continuous-Integration: Dan Kenigsberg danken@redhat.com Reviewed-on: https://gerrit.ovirt.org/47105 Reviewed-by: Allon Mureinik amureini@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com Continuous-Integration: Francesco Romani fromani@redhat.com --- M lib/vdsm/tool/configurators/sanlock.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Nir Soffer: Verified Dan Kenigsberg: Looks good to me, approved Allon Mureinik: Looks good to me, but someone else must approve Francesco Romani: Looks good to me, approved; Passed CI tests
automation@ovirt.org has posted comments on this change.
Change subject: vdsm-tool: Do not panic with sanlock empty groups ......................................................................
Patch Set 6:
* update_tracker: OK * Set MODIFIED::bug 1269886::::#1269886::::IGNORE, not oVirt prod but
vdsm-patches@lists.fedorahosted.org