Fuel fails with IndexError exception when trying to deploy env with node without disks

Bug #1394404 reported by Aleksandr Shaposhnikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Vitaly Kramskikh

Bug Description

Fuel trying to provision/deploy on node that didn't have disk space detected. Nailgun trying to prepare configs and fails on operations with partitioning with unfriendly error message.

version:

api: '1.0'
astute_sha: 65eb911c38afc0e23d187772f9a05f703c685896
auth_required: true
build_id: 2014-11-18_22-00-23
build_number: '114'
feature_groups:
- mirantis
fuellib_sha: 5a5275370b33ab3b9a403728a1c7ad173289e4a0
fuelmain_sha: e556f0e1b00c30ec5c4b374ca2878c047c8686c2
nailgun_sha: b0add09c4361fee8fc70637c9a6ef42fbe738abe
ostf_sha: 82465a94eed4eff1fc8d8e1f2fb7e9993c22f068
production: docker
release: '6.0'
release_versions:
  2014.2-6.0:
    VERSION:
      api: '1.0'
      astute_sha: 65eb911c38afc0e23d187772f9a05f703c685896
      build_id: 2014-11-18_22-00-23
      build_number: '114'
      feature_groups:
      - mirantis
      fuellib_sha: 5a5275370b33ab3b9a403728a1c7ad173289e4a0
      fuelmain_sha: e556f0e1b00c30ec5c4b374ca2878c047c8686c2
      nailgun_sha: b0add09c4361fee8fc70637c9a6ef42fbe738abe
      ostf_sha: 82465a94eed4eff1fc8d8e1f2fb7e9993c22f068
      production: docker
      release: '6.0'

Error: list index out of range
2014-11-19 22:31:36 ERROR
[7fd03a816740] (manager) Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nailgun/task/manager.py", line 70, in _call_silently
    to_return = method(task, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/nailgun/task/task.py", line 575, in execute
    cls._check_disks(task)
  File "/usr/lib/python2.6/site-packages/nailgun/task/task.py", line 632, in _check_disks
    node.volume_manager.check_disk_space_for_deployment()
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 929, in check_disk_space_for_deployment
    minimal_installation_size = self.__calc_minimal_installation_size()
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 964, in __calc_minimal_installation_size
    min_size = self.expand_generators(volume)['min_size']
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 917, in expand_generators
    for (k, v) in value.iteritems())
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 917, in <genexpr>
    for (k, v) in value.iteritems())
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 910, in expand_generators
    generator, *generator_args)
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 722, in call_generator
    result = generators[generator](*args)
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 712, in <lambda>
    lambda: generators['calc_root_size']() + \
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 728, in _calc_root_size
    size = int(self.disks[0].size * 0.2)
IndexError: list index out of range

description: updated
Łukasz Oleś (loles)
Changed in fuel:
importance: Undecided → Medium
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 6.1
status: New → Confirmed
Revision history for this message
Łukasz Oleś (loles) wrote :

Snapshot included. It looks like Node doesn't have disk. We should not allow to start deploy.

Dmitry Pyzhov (dpyzhov)
tags: added: module-volumes
Dmitry Pyzhov (dpyzhov)
tags: added: feature-validation
tags: removed: module-volumes
Changed in fuel:
milestone: 6.1 → 7.0
tags: added: qa-agree-7.0
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Validation issue. Raised to high. Deployment is blocked for general workflow without a clear explanation for user. It's hard for user to figure out the RC of the issue in order to workaround it properly.

Changed in fuel:
importance: Medium → High
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vitaly Kramskikh (vkramskikh)
Changed in fuel:
status: Confirmed → In Progress
summary: - Fuel allows to add and deploy a node that doesn't have a disk space
- available
+ Fuel fails with IndexError exception when trying to deploy env with node
+ without disks
description: updated
Revision history for this message
Vitaly Kramskikh (vkramskikh) wrote :

Will fix the exception as a part of this bug. Validating disk space when adding node to a cluster is not trivial and moved to a separate bug: https://bugs.launchpad.net/fuel/+bug/1483351

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/211267

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

Reviewed: https://review.openstack.org/211267
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=856e380a7b36aa80d61f21d3aeff6721b09bf2a7
Submitter: Jenkins
Branch: master

commit 856e380a7b36aa80d61f21d3aeff6721b09bf2a7
Author: Vitaly Kramskikh <email address hidden>
Date: Mon Aug 10 17:04:14 2015 +0300

    Fix IndexError in _calc_root_size generator in case of no disks

    Closes-Bug: #1394404

    Change-Id: Ide88fd0887b5f49659e81e3876a582699cb959eb

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #288

"build_id": "288", "build_number": "288", "release_versions": {"2015.1.0-7.0": {"VERSION": {"build_id": "288", "build_number": "288", "api": "1.0", "fuel-library_sha": "121016a09b0e889994118aa3ea42fa67eabb8f25", "nailgun_sha": "93477f9b42c5a5e0506248659f40bebc9ac23943", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "1ce8ecd8beb640f2f62f73435f4e18d1469979ac", "astute_sha": "a717657232721a7fafc67ff5e1c696c9dbeb0b95", "fuel-ostf_sha": "1f08e6e71021179b9881a824d9c999957fcc7045", "release": "7.0", "fuelmain_sha": "6b83d6a6a75bf7bca3177fcf63b2eebbf1ad0a85"}}}, "auth_required": true, "api": "1.0", "fuel-library_sha": "121016a09b0e889994118aa3ea42fa67eabb8f25", "nailgun_sha": "93477f9b42c5a5e0506248659f40bebc9ac23943", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "1ce8ecd8beb640f2f62f73435f4e18d1469979ac", "astute_sha": "a717657232721a7fafc67ff5e1c696c9dbeb0b95", "fuel-ostf_sha": "1f08e6e71021179b9881a824d9c999957fcc7045", "release": "7.0", "fuelmain_sha": "6b83d6a6a75bf7bca3177fcf63b2eebbf1ad0a85"

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
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.