[nailgun] Unable to serialize deployment in case no controller is created for env

Bug #1342727 reported by Sergey Yudin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel Python (Deprecated)

Bug Description

Way to reproduce:

[root@fuel bin]# fuel env create --name ENV --rel 1 -m ha -n neutron --nst gre
Environment 'ENV' with id=1, mode=ha_compact and network-mode=neutron was created!

[root@fuel bin]# fuel node set --node 1 --role compute --env 1
Nodes [1] with roles ['compute'] were added to environment 1

[root@fuel ~]# fuel --env 1 deployment default
HTTP Error 500: Internal Server Error (internal server error)

[root@fuel bin]# tail -n 25 /var/log/nailgun/api.log
2014-07-16 13:26:24.534 DEBUG [7f79f7fff700] (logger) Response code '200 OK' for PUT /api/nodes/ from 172.18.165.86:55499
2014-07-16 13:26:29.060 DEBUG [7f79f75fe700] (logger) Request GET /api/v1/clusters/1/orchestrator/deployment/defaults from 127.0.0.1:55501
2014-07-16 13:26:32.505 ERROR [7f79f75fe700] (logger) Traceback (most recent call last):
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 239, in process
    return self.handle()
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/opt/nailgun/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "<string>", line 2, in GET
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/api/handlers/base.py", line 56, in content_json
    data = func(*args, **kwargs)
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/api/handlers/orchestrator.py", line 76, in GET
    return self._serializer.serialize(cluster, nodes)
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 862, in serialize
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 190, in serialize
    ).serialize(cluster, nodes)
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 74, in serialize
    common_attrs = cls.get_common_attrs(cluster)
  File "/opt/nailgun/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 290, in get_common_attrs
    # Assign primary controller in nodes list
IndexError: list index out of range

Expected behavior:
fuel --env 1 deployment default
creates /root/deployment_1/compute_1.yaml with empty or missed fields

Sergey Yudin (tsipa740)
description: updated
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: none → 5.1
Changed in fuel:
importance: Undecided → Medium
assignee: nobody → Fuel Python Team (fuel-python)
Dmitry Ilyin (idv1985)
summary: - Unable to serialize deployment in case no controller is created for env
+ [nailgun] Unable to serialize deployment in case no controller is
+ created for env
Revision history for this message
Artem Roma (aroma-x) wrote :

Ok, I haven't caught the error both on our fake test environment and deployed cluster. Could you please reproduce this bug on latest iso and in case of success provide access to your environment?

Changed in fuel:
status: New → Incomplete
Revision history for this message
Andrew Woodward (xarses) wrote :

does not reproduce on iso 378

Changed in fuel:
status: Incomplete → Invalid
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.