"openstack overcloud node configure" accepts image names, not IDs

Bug #1710717 reported by Bob Fournier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Bob Fournier

Bug Description

When using the "openstack overcloud node configure" command with the --deploy-kernel and --deploy-ramdisk parameters, the actual image names must be provided, the image IDs are not accepted.

For example with these images:
(undercloud) [stack@host01 log]$ glance image-list
+--------------------------------------+------------------------+
| ID | Name |
+--------------------------------------+------------------------+
| 82a6c2f7-f1b2-4877-bf82-79a31a6fa6e3 | bm-deploy-kernel |
| 986bdadb-21a5-44c8-9132-4f63020d7681 | bm-deploy-ramdisk |
| 6f6f1c71-15a9-40d3-a60f-87f83f85a3fe | overcloud-full |
| 0ba559c1-5204-454b-9342-347824456170 | overcloud-full-initrd |
| 9c769d21-454a-436a-b8c0-2194b7f97295 | overcloud-full-vmlinuz |
+--------------------------------------+------------------------+

This command using the names works:
(undercloud) [stack@host01 log]$ openstack overcloud node configure --deploy-kernel bm-deploy-kernel --deploy-ramdisk bm-deploy-ramdisk host2
Started Mistral Workflow tripleo.baremetal.v1.configure. Execution ID: ab5ab7d3-b76b-47c6-a600-85fd2df33984
Waiting for messages on queue '50f70300-8f79-482d-8607-20ae25b699cb' with no timeout.
Successfully configured the nodes.

While this command using the ID fails:
(undercloud) [stack@host01 log]$ openstack overcloud node configure --deploy-kernel 82a6c2f7-f1b2-4877-bf82-79a31a6fa6e3 --deploy-ramdisk bm-deploy-ramdisk host2
Started Mistral Workflow tripleo.baremetal.v1.configure. Execution ID: 2c4654eb-b5ec-4384-86a6-4d7eed00e23b
Waiting for messages on queue '30a0f56f-edfb-4602-bf85-d0cefda958ef' with no timeout.
[u'Kernel image not found in Glance, and no path specified.']
Failed to configure nodes: [u'Kernel image not found in Glance, and no path specified.']

Stack trace is here:
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal [-] Error registering nodes with ironic.
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal Traceback (most recent call last):
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal File "/usr/lib/python2.7/site-packages/tripleo_common/actions/baremetal.py", line 68, in run
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal ramdisk_name=self.ramdisk_name)
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal File "/usr/lib/python2.7/site-packages/tripleo_common/utils/nodes.py", line 372, in register_all_nodes
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal glance_client, kernel_name, ramdisk_name)
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal File "/usr/lib/python2.7/site-packages/tripleo_common/utils/glance.py", line 41, in create_or_find_kernel_and_ramdisk
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal 'aki', 'Kernel', skip_missing=skip_missing)
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal File "/usr/lib/python2.7/site-packages/tripleo_common/utils/glance.py", line 78, in _upload_file
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal "specified." % type_name)
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal ValueError: Kernel image not found in Glance, and no path specified.
2017-05-03 09:06:43.383 44010 ERROR tripleo_common.actions.baremetal

Bob Fournier (bfournie)
Changed in tripleo:
assignee: nobody → Bob Fournier (bfournie)
summary: - openstack overcloud node configure commands accepts image names, not IDs
+ "openstack overcloud node configure" accepts image names, not IDs
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
milestone: queens-1 → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/498978
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=896b2492eec03c96a3d2a3e0083d09bef77d6479
Submitter: Zuul
Branch: master

commit 896b2492eec03c96a3d2a3e0083d09bef77d6479
Author: Bob Fournier <email address hidden>
Date: Tue Aug 29 18:27:21 2017 -0400

    Accept glance image ID in addition to name

    Add a check to accept the image ID if provided. Currently only the
    name is checked.

    Change-Id: I7c02079debd13c743b84e91ddd226a4b365f6b77
    Closes-Bug: 1710717

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 8.2.0

This issue was fixed in the openstack/tripleo-common 8.2.0 release.

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.