redhat-openstack / infrared

Plugin based framework that aims to provide an easy-to-use CLI for Ansible based projects
https://infrared.readthedocs.io/en/latest/index.html
Apache License 2.0
99 stars 97 forks source link

Registering Nodes for the Overcloud Failed #327

Closed sandeepyadav619 closed 6 years ago

sandeepyadav619 commented 6 years ago

Hello,

I am facing an issue while Registering Nodes for the Overcloud. Currently, I am trying a downstream version of queens.

I found that "openstack: 'baremetal import --json /home/stack/instackenv.json'" is removed and replaced by "openstack overcloud node import ~/instackenv.json".

Can you please do the necessary modification for this command so that registration of the node can be done without issue since queen release.


TASK [register hosts to instack] **********************************************************************************************************************************************************************************
                      [[ previous task time: 0:00:00.032749 = 0.03s / 43.29s ]]
fatal: [undercloud-0]: FAILED! => {"changed": true, "cmd": "source ~/stackrc\n openstack baremetal import --json /home/stack/instackenv.json", "delta": "0:00:00.766740", "end": "2018-05-29 12:13:07.022145", "msg": "non-zero return code", "rc": 2, "start": "2018-05-29 12:13:06.255405", "stderr": "", "stderr_lines": [], "stdout": "openstack: 'baremetal import --json /home/stack/instackenv.json' is not an openstack command. See 'openstack --help'.\nDid you mean one of these?\n  baremetal chassis create\n  baremetal chassis delete\n  baremetal chassis list\n  baremetal chassis set\n  baremetal chassis show\n  baremetal chassis unset\n  baremetal create\n  baremetal driver list\n  baremetal driver passthru call\n  baremetal driver passthru list\n  baremetal driver property list\n  baremetal driver raid property list\n  baremetal driver show\n  baremetal introspection abort\n  baremetal introspection data save\n  baremetal introspection interface list\n  baremetal introspection interface show\n  baremetal introspection list\n  baremetal introspection reprocess\n  baremetal introspection rule delete\n  baremetal introspection rule import\n  baremetal introspection rule list\n  baremetal introspection rule purge\n  baremetal introspection rule show\n  baremetal introspection start\n  baremetal introspection status\n  baremetal node abort\n  baremetal node add trait\n  baremetal node adopt\n  baremetal node boot device set\n  baremetal node boot device show\n  baremetal node clean\n  baremetal node console disable\n  baremetal node console enable\n  baremetal node console show\n  baremetal node create\n  baremetal node delete\n  baremetal node deploy\n  baremetal node inject nmi\n  baremetal node inspect\n  baremetal node list\n  baremetal node maintenance set\n  baremetal node maintenance unset\n  baremetal node manage\n  baremetal node passthru call\n  baremetal node passthru list\n  baremetal node power off\n  baremetal node power on\n  baremetal node provide\n  baremetal node reboot\n  baremetal node rebuild\n  baremetal node remove trait\n  baremetal node set\n  baremetal node show\n  baremetal node trait list\n  baremetal node undeploy\n  baremetal node unset\n  baremetal node validate\n  baremetal node vif attach\n  baremetal node vif detach\n  baremetal node vif list\n  baremetal port create\n  baremetal port delete\n  baremetal port group create\n  baremetal port group delete\n  baremetal port group list\n  baremetal port group set\n  baremetal port group show\n  baremetal port group unset\n  baremetal port list\n  baremetal port set\n  baremetal port show\n  baremetal port unset\n  baremetal volume connector create\n  baremetal volume connector delete\n  baremetal volume connector list\n  baremetal volume connector set\n  baremetal volume connector show\n  baremetal volume connector unset\n  baremetal volume target create\n  baremetal volume target delete\n  baremetal volume target list\n  baremetal volume target set\n  baremetal volume target show\n  baremetal volume target unset\n  credential create\n  credential delete\n  credential list\n  credential set\n  credential show", "stdout_lines": ["openstack: 'baremetal import --json /home/stack/instackenv.json' is not an openstack command. See 'openstack --help'.", "Did you mean one of these?", "  baremetal chassis create", "  baremetal chassis delete", "  baremetal chassis list", "  baremetal chassis set", "  baremetal chassis show", "  baremetal chassis unset", "  baremetal create", "  baremetal driver list", "  baremetal driver passthru call", "  baremetal driver passthru list", "  baremetal driver property list", "  baremetal driver raid property list", "  baremetal driver show", "  baremetal introspection abort", "  baremetal introspection data save", "  baremetal introspection interface list", "  baremetal introspection interface show", "  baremetal introspection list", "  baremetal introspection reprocess", "  baremetal introspection rule delete", "  baremetal introspection rule import", "  baremetal introspection rule list", "  baremetal introspection rule purge", "  baremetal introspection rule show", "  baremetal introspection start", "  baremetal introspection status", "  baremetal node abort", "  baremetal node add trait", "  baremetal node adopt", "  baremetal node boot device set", "  baremetal node boot device show", "  baremetal node clean", "  baremetal node console disable", "  baremetal node console enable", "  baremetal node console show", "  baremetal node create", "  baremetal node delete", "  baremetal node deploy", "  baremetal node inject nmi", "  baremetal node inspect", "  baremetal node list", "  baremetal node maintenance set", "  baremetal node maintenance unset", "  baremetal node manage", "  baremetal node passthru call", "  baremetal node passthru list", "  baremetal node power off", "  baremetal node power on", "  baremetal node provide", "  baremetal node reboot", "  baremetal node rebuild", "  baremetal node remove trait", "  baremetal node set", "  baremetal node show", "  baremetal node trait list", "  baremetal node undeploy", "  baremetal node unset", "  baremetal node validate", "  baremetal node vif attach", "  baremetal node vif detach", "  baremetal node vif list", "  baremetal port create", "  baremetal port delete", "  baremetal port group create", "  baremetal port group delete", "  baremetal port group list", "  baremetal port group set", "  baremetal port group show", "  baremetal port group unset", "  baremetal port list", "  baremetal port set", "  baremetal port show", "  baremetal port unset", "  baremetal volume connector create", "  baremetal volume connector delete", "  baremetal volume connector list", "  baremetal volume connector set", "  baremetal volume connector show", "  baremetal volume connector unset", "  baremetal volume target create", "  baremetal volume target delete", "  baremetal volume target list", "  baremetal volume target set", "  baremetal volume target show", "  baremetal volume target unset", "  credential create", "  credential delete", "  credential list", "  credential set", "  credential show"]}

cmd: source ~/stackrc
 openstack baremetal import --json /home/stack/instackenv.json

start: 2018-05-29 12:13:06.255405

end: 2018-05-29 12:13:07.022145

delta: 0:00:00.766740

msg: non-zero return code

stdout: openstack: 'baremetal import --json /home/stack/instackenv.json' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  baremetal chassis create
  baremetal chassis delete
  baremetal chassis list
  baremetal chassis set
  baremetal chassis show
  baremetal chassis unset
  baremetal create
  baremetal driver list
  baremetal driver passthru call
  baremetal driver passthru list
  baremetal driver property list
  baremetal driver raid property list
  baremetal driver show
  baremetal introspection abort
  baremetal introspection data save
  baremetal introspection interface list
  baremetal introspection interface show
  baremetal introspection list
  baremetal introspection reprocess
  baremetal introspection rule delete
  baremetal introspection rule import
  baremetal introspection rule list
  baremetal introspection rule purge
  baremetal introspection rule show
  baremetal introspection start
  baremetal introspection status
  baremetal node abort
  baremetal node add trait
  baremetal node adopt
  baremetal node boot device set
  baremetal node boot device show
  baremetal node clean
  baremetal node console disable
  baremetal node console enable
  baremetal node console show
  baremetal node create
  baremetal node delete
  baremetal node deploy
  baremetal node inject nmi
  baremetal node inspect
  baremetal node list
  baremetal node maintenance set
  baremetal node maintenance unset
  baremetal node manage
  baremetal node passthru call
  baremetal node passthru list
  baremetal node power off
  baremetal node power on
  baremetal node provide
  baremetal node reboot
  baremetal node rebuild
  baremetal node remove trait
  baremetal node set
  baremetal node show
  baremetal node trait list
  baremetal node undeploy
  baremetal node unset
  baremetal node validate
  baremetal node vif attach
  baremetal node vif detach
  baremetal node vif list
  baremetal port create
  baremetal port delete
  baremetal port group create
  baremetal port group delete
  baremetal port group list
  baremetal port group set
  baremetal port group show
  baremetal port group unset
  baremetal port list
  baremetal port set
  baremetal port show
  baremetal port unset
  baremetal volume connector create
  baremetal volume connector delete
  baremetal volume connector list
  baremetal volume connector set
  baremetal volume connector show
  baremetal volume connector unset
  baremetal volume target create
  baremetal volume target delete
  baremetal volume target list
  baremetal volume target set
  baremetal volume target show
  baremetal volume target unset
  credential create
  credential delete
  credential list
  credential set
  credential show

NO MORE HOSTS LEFT ************************************************************************************************************************************************************************************************
    to retry, use: --limit @/home/sandyada/.venv_infrared/infrared/plugins/tripleo-overcloud/main.retry

PLAY RECAP ********************************************************************************************************************************************************************************************************
hypervisor                 : ok=1    changed=0    unreachable=0    failed=0   
localhost                  : ok=1    changed=0    unreachable=0    failed=0   
undercloud-0               : ok=31   changed=12   unreachable=0    failed=1   

ERROR   Playbook "/home/sandyada/.venv_infrared/infrared/plugins/tripleo-overcloud/main.yml" failed!
                      [[ previous task time: 0:00:01.342977 = 1.34s / 44.63s ]]
                      [[ previous play time: 0:00:02.019536 = 2.02s / 44.63s ]]
                 [[ previous playbook time: 0:00:44.629896 = 44.63s / 44.63s ]]
                     [[ previous total time: 0:00:44.632126 = 44.63s / 0.00s ]]

Regards Sandeep

vgri commented 6 years ago

Hey Sandeep, Thanks for bringing this up. We already have a fix for this issue that was merged to Infrared master and stable branches. {% if install.version|default(undercloud_version) |openstack_release < 13 %} openstack baremetal import --json {{ instack_file_path.stat.path }} openstack baremetal configure boot {% else %} openstack overcloud node import --instance-boot-option=local {{ instack_file_path.stat.path }} {% endif %}

There might be a version discovery problem of your openstack_release. Can you please provide more details on your deployment? Is the Infrared on your machine is up to date? Full Infrared log will also help to understand the problem. Thanks, Vadim.

sandeepyadav619 commented 6 years ago

Hello Vadim,

Thank you so much for informing that fix is already merged for master branch. I updated the infrared and the issue resolved for me, thanks!

regards Sandeep