os-cloud-config: with fake_pxe pm_type in instackenv.json and thus no pm_addr entry, "openstack baremetal import --json instackenv.json" exists with: ERROR: openstack 'pm_addr' Environment: instack-undercloud-2.1.2-25.el7ost.noarch openstack-ironic-api-2015.1.1-4.el7ost.noarch os-cloud-config-0.2.8-6.el7ost.noarch python-ironic-discoverd-1.1.0-6.el7ost.noarch openstack-ironic-common-2015.1.1-4.el7ost.noarch python-ironicclient-0.5.1-10.el7ost.noarch openstack-ironic-discoverd-1.1.0-6.el7ost.noarch openstack-heat-api-cloudwatch-2015.1.1-3.el7ost.noarch openstack-ironic-conductor-2015.1.1-4.el7ost.noarch Steps to reproduce: 1. Install the undercloud. 2. Enable the fake_pxe driver in ironic. 3. With the instack file looking as following: { "nodes":[ { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:18" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:ce" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:2a" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:1a" ], "cpu":null, "memory":null, "disk":null, "arch":null } ] } Attempt to run: openstack baremetal import --json instackenv.json Result: ERROR: openstack 'pm_addr' Expected result: All the nodes using the fake_pxe pm_type should be added despite the missing pm_addr.
can you try adding pm_addr to the json file, but set it to the empty string? pm_addr: ""
Lucas, can you have a look at this one?
Changed the instackenv.json to the following (also tried with "pm_addr": null): { "nodes":[ { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:18" ], "cpu":null, "memory":null, "disk":null, "arch":null, "pm_addr":"" }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:ce" ], "cpu":null, "memory":null, "disk":null, "arch":null, "pm_addr":"" }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:2a" ], "cpu":null, "memory":null, "disk":null, "arch":null, "pm_addr":"" }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:1a" ], "cpu":null, "memory":null, "disk":null, "arch":null, "pm_addr":"" } ] } This time, when I run "openstack baremetal import --json instackenv.json" - I get: ERROR: openstack local variable 'driver_info' referenced before assignment
Hi Alexander, I've uploaded a fix upstream to os-cloud-config and put a patch backporting it into ospd (see external trackers). Lemme know if that works for you.
The patch worked! I was able to register the nodes. Here's my instackenv.json file: { "nodes":[ { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:18" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:ce" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:2a" ], "cpu":null, "memory":null, "disk":null, "arch":null }, { "pm_type":"fake_pxe", "mac":[ "00:0a:f7:79:93:1a" ], "cpu":null, "memory":null, "disk":null, "arch":null } ] }
Verified: os-cloud-config-0.2.8-7.el7ost.noarch The reported issue doesn't reproduce and the nodes are registered successfully.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1862