Xenapi disk resize broken by use of privsep code

Bug #1771137 reported by Bob Ball
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Bob Ball

Bug Description

Patch I6c695c04ae586fec6adc354257638116277dda88 (https://review.openstack.org/#/c/552242/) moved disk resizing into privsep. Unforutunately "None" was passed as the expected return code, which is not understood by processutils.
Further, Tempest flavor resizing moves from m1.nano to m1.micro, both of which have root_gb=0 thus skipping the resize code - so Tempest didn't spot this error.

May 14 11:26:45 DevStackOSDomU nova-compute[15359]: Traceback (most recent call last):
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py", line 445, in loop
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: reply = self._process_cmd(*msg)
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py", line 428, in _process_cmd
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: ret = func(*f_args, **f_kwargs)
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/usr/local/lib/python2.7/dist-packages/oslo_privsep/priv_context.py", line 209, in _wrap
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: return func(*args, **kwargs)
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/opt/stack/nova/nova/privsep/fs.py", line 152, in resize2fs
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: unprivileged_resize2fs(image, check_exit_code=check_exit_code, size=size)
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/opt/stack/nova/nova/privsep/fs.py", line 162, in unprivileged_resize2fs
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: processutils.execute(*cmd, check_exit_code=check_exit_code)
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 414, in execute
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: if not ignore_exit_code and _returncode not in check_exit_code:
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: TypeError: argument of type 'NoneType' is not iterable
May 14 11:26:45 DevStackOSDomU nova-compute[15359]: DEBUG oslo.privsep.daemon [None req-aad511d7-9f4a-450c-bf86-c4e948d7409b service nova] privsep: reply[140577558810448]: (5, 'exceptions.TypeError', ("argum
ent of type 'NoneType' is not iterable",)) {{(pid=16155) loop /usr/local/lib/python2.7/dist-packages/oslo_privsep/daemon.py:456}}

Tags: xenserver
Bob Ball (bob-ball)
Changed in nova:
status: New → Confirmed
status: Confirmed → In Progress
assignee: nobody → Bob Ball (bob-ball)
tags: added: xens
tags: added: xenserver
removed: xens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/568318

melanie witt (melwitt)
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/568318
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=eec0fe59ff08285181ac6c74ffcc36348b692b69
Submitter: Zuul
Branch: master

commit eec0fe59ff08285181ac6c74ffcc36348b692b69
Author: Bob Ball <email address hidden>
Date: Mon May 14 16:27:56 2018 +0100

    XenAPI: Pass expected return codes to resize2fs

    None is not tolerated by ProcessUtils, therefore make sure that [0] is passed as the
    expected return code

    Change-Id: I7d6335633479dfd7715444ef4aefc85ed41b8fa3
    Closes-Bug: #1771137

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b2

This issue was fixed in the openstack/nova 18.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.