[IBP] ValueError while parsing: mdadm --detail

Bug #1446186 reported by Evgeny Kozhemyakin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Alexander Gordeev
6.0.x
Fix Committed
High
Fuel Python (Deprecated)

Bug Description

Image based provisioning fails with "ValueError" during partitioning phase.

VERSION:
  feature_groups:
    - mirantis
    - experimental
  production: "docker"
  release: "6.0"
  api: "1.0"
  build_number: "58"
  build_id: "2014-12-26_14-25-46"
  astute_sha: "16b252d93be6aaa73030b8100cf8c5ca6a970a91"
  fuellib_sha: "fde8ba5e11a1acaf819d402c645c731af450aff0"
  ostf_sha: "a9afb68710d809570460c29d6c3293219d3624d4"
  nailgun_sha: "5f91157daa6798ff522ca9f6d34e7e135f150a90"
  fuelmain_sha: "81d38d6f2903b5a8b4bee79ca45a54b76c1361b8"

DEBUG fuel_agent.drivers.nailgun [-] Processing fs swap
DEBUG fuel_agent.drivers.nailgun [-] There is no image for fs swap. Skipping.
DEBUG fuel_agent.drivers.nailgun [-] Processing fs /var/lib/glance
DEBUG fuel_agent.drivers.nailgun [-] There is no image for fs /var/lib/glance. Skipping.
DEBUG fuel_agent.manager [-] --- Partitioning disks (do_partitioning) ---
DEBUG fuel_agent.utils.md_utils [-] Trying to wipe out all md devices
DEBUG fuel_agent.utils.utils [-] Trying to execute command: mdadm --detail /dev/md126
DEBUG fuel_agent.utils.utils [-] Trying to execute command: mdadm --detail /dev/md127
CRITICAL fuel-agent [-] ValueError: need more than 1 value to unpack
TRACE fuel-agent Traceback (most recent call last):
TRACE fuel-agent File "/usr/bin/provision", line 10, in <module>
TRACE fuel-agent sys.exit(provision())
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/cmd/agent.py", line 37
TRACE fuel-agent main(['do_provisioning'])
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/cmd/agent.py", line 67
TRACE fuel-agent getattr(mgr, action)()
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/manager.py", line 296,
TRACE fuel-agent self.do_partitioning()
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/manager.py", line 77,
TRACE fuel-agent mu.mdclean_all()
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/utils/md_utils.py", li
TRACE fuel-agent for md in mddisplay():
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/utils/md_utils.py", li
TRACE fuel-agent md.update(mddetail_parse(output))
TRACE fuel-agent File "/usr/lib/python2.6/site-packages/fuel_agent/utils/md_utils.py", li
TRACE fuel-agent h, v = output.split('Number Major Minor RaidDevice State')
TRACE fuel-agent ValueError: need more than 1 value to unpack

Changed in fuel:
assignee: nobody → Fuel provisioning team (fuel-provisioning)
importance: Undecided → High
Changed in fuel:
status: New → Confirmed
milestone: none → 6.1
tags: added: customer-found
tags: added: feature-image-based
tags: added: tricky
summary: - ValueError during image based provision
+ [IBP] ValueError while parsing: mdadm --detail
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel provisioning team (fuel-provisioning) → Aleksandr Gordeev (a-gordeev)
Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

https://github.com/neilbrown/mdadm/blob/mdadm-3.2.6/Detail.c#L509-L513

fuel-agent should expect 2 types of headers:
" Number Major Minor RaidDevice State\n" (already supported)
" Number Major Minor RaidDevice\n" - new one.

here's the sample output:

https://lists.gnu.org/archive/html/grub-devel/2010-01/txturKtfeagX2.txt

tags: removed: tricky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/176702
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=5283060fdef4e3125cefe1e4f2b2c24cc1698a7c
Submitter: Jenkins
Branch: master

commit 5283060fdef4e3125cefe1e4f2b2c24cc1698a7c
Author: Alexander Gordeev <email address hidden>
Date: Thu Apr 23 14:37:00 2015 +0300

    [IBP] Fix ValueError while parsing: mdadm --detail

    fuel-agent doesn't expect header from 'mdadm --detail' output where
    'State' is not present.

    fuel-agent should expect 2 types of headers:
    " Number Major Minor RaidDevice State\n" (already supported)
    " Number Major Minor RaidDevice\n" - addressed by this patch.

    This patch is required to let fuel-agent consume both types of headers.

    Additionally fuel-agent will start to log 'mdadm --detail' output to ease
    troubleshooting.

    Change-Id: Ie20db2c14bdc5669566a140a34d63d28c6115d11
    Closes-Bug: #1446186

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/179103

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/6.0)

Reviewed: https://review.openstack.org/179103
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=a268337c7f33c76bf7fc15a07d56819daef2c174
Submitter: Jenkins
Branch: stable/6.0

commit a268337c7f33c76bf7fc15a07d56819daef2c174
Author: Alexander Gordeev <email address hidden>
Date: Thu Apr 23 14:37:00 2015 +0300

    [IBP] Fix ValueError while parsing: mdadm --detail

    Backport from 6.1

    fuel-agent doesn't expect header from 'mdadm --detail' output where
    'State' is not present.

    fuel-agent should expect 2 types of headers:
    " Number Major Minor RaidDevice State\n" (already supported)
    " Number Major Minor RaidDevice\n" - addressed by this patch.

    This patch is required to let fuel-agent consume both types of headers.

    Additionally fuel-agent will start to log 'mdadm --detail' output to ease
    troubleshooting.

    Change-Id: Ie20db2c14bdc5669566a140a34d63d28c6115d11
    Closes-Bug: #1446186
    (cherry picked from commit 5283060fdef4e3125cefe1e4f2b2c24cc1698a7c)

Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

re-assigning to fuel-python with 'ibp' tag.

tags: added: ibp
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.