Create server failed because of the losing of root_gb in node info

Bug #1729533 reported by zhangjialong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mogan
Fix Released
Undecided
zhangjialong

Bug Description

Description
===========
When using latest mogan to create baremetal servers, all failed.

Steps to reproduce
===========
Using openstack baremetalcompute server create mogan --flavor 2a13f1f9-962e-4b73-84f2-6179fe7f56cd --image 5dac1b27-636a-4fb8-978f-c074c76e3743 --nic net-id=630bfdd2-0bfd-40ce-a054-4e0ae9f95b43

Then, you would found the server became error

Mogan commit
commit cb02f1c19ba460d1c5c6b8851a21d9948bad3e0e
Merge: a8050e3 7d67f24
Author: Zuul <email address hidden>
Date: Wed Nov 1 11:11:20 2017 +0000

    Merge "Zuul: add file extension to playbook path"

Logs
==============
     |__Atom 'mogan.engine.flows.create_server.OnFailureRescheduleTask;server:create' {'intention': 'EXECUTE', 'state': 'SUCCESS', 'requires': {'request_spec': {u'availability_zone': None, u'server_properties': {u'flavor_uuid': u'2a13f1f9-962e-4b73-84f2-6179fe7f56cd', u'networks': [{u'net_id': u'630bfdd2-0bfd-40ce-a054-4e0ae9f95b43'}]}, u'num_servers': 1, u'server_ids': ['3bece9a0-4e20-4010-bbc5-7e0f0941db78'], u'flavor': {u'resource_traits': {}, u'uuid': u'2a13f1f9-962e-4b73-84f2-6179fe7f56cd', u'created_at': u'2017-11-02T07:39:04.000000', u'updated_at': None, u'name': u'baremetal_1cpu_1024mbram_10gbdisk', u'disabled': False, u'resources': {u'baremetal': u'1'}, u'is_public': True, u'resource_aggregates': {}, u'projects': [], u'description': u'CPU: 1, RAM: 1024MB, DISK: 10GB'}, u'scheduler_hints': {}}, 'requested_networks': [{u'net_id': u'630bfdd2-0bfd-40ce-a054-4e0ae9f95b43'}], 'context': <oslo_context.context.RequestContext object at 0x7f6276604cd0>, 'filter_properties': {'retry': {u'num_attempts': 3, u'nodes': [u'c002878f-972e-417b-ab89-f5966d981ec6', u'772057e3-17a5-4c58-9891-ab5ce9ca8ce4', u'c002878f-972e-417b-ab89-f5966d981ec6'], u'exc': [u'Traceback (most recent call last):\n', u' File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task\n result = task.execute(**arguments)\n', u' File "/opt/stack/mogan/mogan/engine/flows/create_server.py", line 274, in execute\n self.driver.spawn(context, server, configdrive_value, partitions)\n', u' File "/opt/stack/mogan/mogan/baremetal/ironic/driver.py", line 308, in spawn\n \'power\': validate_chk.power})\n', u'ValidationError: Ironic node: 772057e3-17a5-4c58-9891-ab5ce9ca8ce4 failed to validate. (deploy: {u\'reason\': u"Cannot validate driver deploy. Some parameters were missing in node\'s instance_info. Missing are: [\'root_gb\']", u\'result\': False}, power: {u\'result\': True})\n']}}, 'user_data': None, 'server': Server(affinity_zone=None,availability_zone=None,created_at=2017-11-02T09:04:49Z,description=None,fault=<?>,flavor_uuid=2a13f1f9-962e-4b73-84f2-6179fe7f56cd,id=11,image_uuid=5dac1b27-636a-4fb8-978f-c074c76e3743,key_name=None,launched_at=None,locked=False,locked_by=None,metadata={},name='mogan',nics=ServerNics,node='node-1',node_uuid=c002878f-972e-417b-ab89-f5966d981ec6,partitions={},power_state=None,project_id=602626b119ca4268b0227f67b3dde653,status='building',updated_at=None,user_id=b4b3577840134508931567c200c2332d,uuid=3bece9a0-4e20-4010-bbc5-7e0f0941db78), 'key_pair': None, 'injected_files': [], 'partitions': None}, 'provides': None}
        |__Flow 'server_create_manager'^[[00m: ValidationError: Ironic node: c002878f-972e-417b-ab89-f5966d981ec6 failed to validate. (deploy: {u'reason': u"Cannot validate driver deploy. Some parameters were missing in node's instance_info. Missing are: ['root_gb']", u'result': False}, power: {u'result': True})
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00mTraceback (most recent call last):
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m result = task.execute(**arguments)
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m File "/opt/stack/mogan/mogan/engine/flows/create_server.py", line 274, in execute
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m self.driver.spawn(context, server, configdrive_value, partitions)
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m File "/opt/stack/mogan/mogan/baremetal/ironic/driver.py", line 308, in spawn
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00m 'power': validate_chk.power})
2017-11-02 17:05:09.316 TRACE mogan.engine.manager ^[[01;35m^[[00mValidationError: Ironic node: c002878f-972e-417b-ab89-f5966d981ec6 failed to validate. (deploy: {u'reason': u"Cannot validate driver deploy. Some parameters were missing in node's instance_info. Missing are: ['root_gb']", u'result': False}, power: {u'result': True})

zhangjialong (zhangjl)
Changed in mogan:
assignee: nobody → zhangjialong (zhangjl)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mogan (master)

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

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

Reviewed: https://review.openstack.org/517235
Committed: https://git.openstack.org/cgit/openstack/mogan/commit/?id=c8f6ca2c8a8ebe930026be66651b66aa7c908ac3
Submitter: Zuul
Branch: master

commit c8f6ca2c8a8ebe930026be66651b66aa7c908ac3
Author: zhangjl <email address hidden>
Date: Thu Nov 2 17:35:17 2017 +0800

    Ensure root_gb always in patch params to avoid ValidationError

    Accoring [1], the root_gb is required when validating the
    node properties. While, in latest mogan codes [2], root_gb
    is optional. Then, the ValidationError would occured when
    creating baremetal server with mogan.

    To fix this problem, ensure root_gb always in patch params.

    [1]: https://github.com/openstack/nova/blob/master/nova/virt/ironic/patcher.py#L61
    [2]: https://github.com/openstack/mogan/blob/master/mogan/baremetal/ironic/driver.py#L159-L161

    Change-Id: I99f7a0408c234649fc81482f82018c74781f7a26
    Closes-Bug: #1729533

Changed in mogan:
status: In Progress → 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.