'list index out of range' error on group node disks configuration

Bug #1319306 reported by Aleksey Kasatkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Julia Aranovich

Bug Description

ISO 203, VBOX

CentOS, HA, Neutron-Vlan, 3 ctrl + 1 comp + 1 cind

1. Add nodes.
2. Select all controllers and enter disks configuration.
3. For the first disk: set "0" for Image Storage and "use all allowed space" for Base System
4. Press "Apply"

Error is exposed:

"Server error has occured"

Logs contain:

[7fe7d3fff700] (logger) Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "<string>", line 2, in PUT
  File "/usr/lib/python2.6/site-packages/nailgun/api/handlers/base.py", line 95, in content_json
    data = func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/nailgun/api/handlers/disks.py", line 66, in PUT
    volumes_data = DisksFormatConvertor.format_disks_to_full(node, data)
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 227, in format_disks_to_full
    disk['id'], volume['name'], volume['size'])
  File "/usr/lib/python2.6/site-packages/nailgun/volumes/manager.py", line 625, in set_volume_size
    disk = filter(lambda disk: disk.id == disk_id, self.disks)[0]
IndexError: list index out of range

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

First node's disks configuration (out of three nodes) was changed after that action.

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

There are no problems observed when you configure nodes one-by-one.

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Same problem on group disk configuration with other cluster configurations.

Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Aleksey Kasatkin (alekseyk-ru)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Seems that the problem is in UI. It sends disks IDs for all nodes in group equal to IDs of one of the nodes.
"disk/by-id/scsi-SATA_VBOX_HARDDISK_VB426d4cdf-38c3c969" for the 1st disk is sent for all three nodes here (and the same situation for 2nd and 3rd disks):

http://10.20.0.2:8000/api/nodes/1/disks - OK
PUT
[{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB426d4cdf-38c3c969","disk/by-id/ata-VBOX_HARDDISK_VB426d4cdf-38c3c969"],"size":64908,"id":"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0","volumes":[{"name":"os","size":64908},{"name":"vm","size":0}],"name":"sda"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB08be4bdb-49521d54","disk/by-id/ata-VBOX_HARDDISK_VB08be4bdb-49521d54"],"size":64908,"id":"sdb","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdb"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB30f4ec3e-0495b024","disk/by-id/ata-VBOX_HARDDISK_VB30f4ec3e-0495b024"],"size":64908,"id":"sdc","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdc"}]

http://10.20.0.2:8000/api/nodes/2/disks - ERR
PUT
[{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB426d4cdf-38c3c969","disk/by-id/ata-VBOX_HARDDISK_VB426d4cdf-38c3c969"],"size":64908,"id":"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0","volumes":[{"name":"os","size":64908},{"name":"vm","size":0}],"name":"sda"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB08be4bdb-49521d54","disk/by-id/ata-VBOX_HARDDISK_VB08be4bdb-49521d54"],"size":64908,"id":"sdb","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdb"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB30f4ec3e-0495b024","disk/by-id/ata-VBOX_HARDDISK_VB30f4ec3e-0495b024"],"size":64908,"id":"sdc","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdc"}]

http://10.20.0.2:8000/api/nodes/3/disks - ERR
PUT
[{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB426d4cdf-38c3c969","disk/by-id/ata-VBOX_HARDDISK_VB426d4cdf-38c3c969"],"size":64908,"id":"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0","volumes":[{"name":"os","size":64908},{"name":"vm","size":0}],"name":"sda"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB08be4bdb-49521d54","disk/by-id/ata-VBOX_HARDDISK_VB08be4bdb-49521d54"],"size":64908,"id":"sdb","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdb"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB30f4ec3e-0495b024","disk/by-id/ata-VBOX_HARDDISK_VB30f4ec3e-0495b024"],"size":64908,"id":"sdc","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdc"}]

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

When you configure nodes one-by-one correct values are sent:

http://10.20.0.2:8000/api/nodes/2/disks

[{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc5fb13d4-bbf6c7ba","disk/by-id/ata-VBOX_HARDDISK_VBc5fb13d4-bbf6c7ba"],"size":64908,"id":"sda","volumes":[{"name":"os","size":64908},{"name":"vm","size":0}],"name":"sda"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB91dd8f50-ce80a50e","disk/by-id/ata-VBOX_HARDDISK_VB91dd8f50-ce80a50e"],"size":64908,"id":"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdb"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB1c1771e7-fa76ffe0","disk/by-id/ata-VBOX_HARDDISK_VB1c1771e7-fa76ffe0"],"size":64908,"id":"sdc","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdc"}]

http://10.20.0.2:8000/api/nodes/3/disks

[{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB8aff7907-044d0b70","disk/by-id/ata-VBOX_HARDDISK_VB8aff7907-044d0b70"],"size":64908,"id":"sda","volumes":[{"name":"os","size":64908},{"name":"vm","size":0}],"name":"sda"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VBcc2a776e-f237ee36","disk/by-id/ata-VBOX_HARDDISK_VBcc2a776e-f237ee36"],"size":64908,"id":"sdb","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdb"},{"extra":["disk/by-id/scsi-SATA_VBOX_HARDDISK_VB9df3e83c-74240046","disk/by-id/ata-VBOX_HARDDISK_VB9df3e83c-74240046"],"size":64908,"id":"disk/by-path/pci-0000:00:0d.0-scsi-0:0:0:0","volumes":[{"name":"os","size":0},{"name":"vm","size":64908}],"name":"sdc"}]

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

It's repeatable not for every cluster configuration but for particular configurations it's repeatable constantly.

E.g. create cluster with all default parameters but "multinode", add 2 computes and try to change disk configuration for this group of 2 nodes.

Changed in fuel:
assignee: Aleksey Kasatkin (alekseyk-ru) → Fuel UI Team (fuel-ui)
Changed in fuel:
status: In Progress → Confirmed
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/93700

Changed in fuel:
assignee: Fuel UI Team (fuel-ui) → Julia Aranovich (jkirnosova)
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/93700
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=89e7224f0b87284f75bf02b956b640768fabe352
Submitter: Jenkins
Branch: master

commit 89e7224f0b87284f75bf02b956b640768fabe352
Author: Julia Aranovich <email address hidden>
Date: Thu May 15 15:17:13 2014 +0400

    Group disks configuration fix

    Closes-Bug:#1319306

    Change-Id: Ib1703b256e7e7b53266e2719178d93eb0e38c44c

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :

verified on {"build_id": "2014-05-22_01-10-31", "mirantis": "yes", "build_number": "216", "ostf_sha": "5c479f04c35127576d35526650ec83b104f9a33d", "nailgun_sha": "31fcb161ff8d6bfb861b041467440752c0e9c537", "production": "docker", "api": "1.0", "fuelmain_sha": "dda9cff27999e74b80e8e6a9e665e7e9677ab994", "astute_sha": "9a0d86918724c1153b5f70bdae008dea8572fd3e", "release": "5.0", "fuellib_sha": "872b6a7a968b619a493ad46c504910020ea2edae"}

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