Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1243829 - overcloud image upload creates duplicate images
overcloud image upload creates duplicate images
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-rdomanager-oscplugin (Show other bugs)
unspecified
Unspecified Unspecified
high Severity unspecified
: y1
: 7.0 (Kilo)
Assigned To: Marek Aufart
Amit Ugol
: Triaged, ZStream
: 1244139 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-16 08:28 EDT by Steven Hardy
Modified: 2015-10-08 08:15 EDT (History)
10 users (show)

See Also:
Fixed In Version: python-rdomanager-oscplugin-0.0.9-2.el7ost
Doc Type: Bug Fix
Doc Text:
The "openstack overcloud image upload" command uploaded Overcloud images even if old versions existed in Glance. This resulted in images with duplicate names, which caused Overcloud creation to fail. This fix modifies the tool to skip existing images. The tool also includes an "--update-existing" option to update existing images. Overcloud creation now uses the new Overcloud images stored in Glance without failure.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-08 08:15:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Gerrithub.io 241821 None None None Never
Red Hat Product Errata RHSA-2015:1862 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux OpenStack Platform 7 director update 2015-10-08 12:05:50 EDT

  None (edit)
Description Steven Hardy 2015-07-16 08:28:51 EDT
Description of problem:
When running "openstack overcloud image upload" more than once, we create duplicate images, even if the local image files are unmodified:


Version-Release number of selected component (if applicable):
I'm running oscplugin from git @ 11bd32adf86b9bf0fb488fb16b49d38033f79440 but the issue affects all currently packaged versions too AFAICT.

How reproducible:
Always

Steps to Reproduce:
[stack@instack ~]$ glance image-list
+--------------------------------------+------------------------+-------------+------------------+----------+--------+
| ID                                   | Name                   | Disk Format | Container Format | Size     | Status |
+--------------------------------------+------------------------+-------------+------------------+----------+--------+
| a45c40e8-9fb2-4107-adf3-dafb9065c71f | bm-deploy-kernel       | aki         | aki              | 5026624  | active |
| a9297bfd-9967-42ef-a474-bcfa1b3168bd | bm-deploy-ramdisk      | ari         | ari              | 58822452 | active |
| 04322d2c-60de-41ce-89b2-bab4e5c344db | overcloud-full-initrd  | ari         | ari              | 33613984 | active |
| 8c8be470-9203-47bf-b8c1-21286bf2ff54 | overcloud-full-vmlinuz | aki         | aki              | 5026624  | active |
+--------------------------------------+------------------------+-------------+------------------+----------+--------+
[stack@instack ~]$ openstack overcloud image upload
[stack@instack ~]$ glance image-list
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                   | Disk Format | Container Format | Size      | Status |
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+
| a45c40e8-9fb2-4107-adf3-dafb9065c71f | bm-deploy-kernel       | aki         | aki              | 5026624   | active |
| 6ea23338-edf2-4987-b15b-b9ea9912000c | bm-deploy-kernel       | aki         | aki              | 5026624   | active |
| a9297bfd-9967-42ef-a474-bcfa1b3168bd | bm-deploy-ramdisk      | ari         | ari              | 58822452  | active |
| 0aaa4c24-78c4-4635-8793-48045a30e512 | bm-deploy-ramdisk      | ari         | ari              | 58822452  | active |
| 4f3155d5-26cd-4da1-abfd-c7ea1320f3c9 | overcloud-full         | qcow2       | bare             | 978059264 | active |
| 04322d2c-60de-41ce-89b2-bab4e5c344db | overcloud-full-initrd  | ari         | ari              | 33613984  | active |
| a4b52eec-589a-455c-b12c-0303da4024af | overcloud-full-initrd  | ari         | ari              | 33613984  | active |
| 8c8be470-9203-47bf-b8c1-21286bf2ff54 | overcloud-full-vmlinuz | aki         | aki              | 5026624   | active |
| 53319340-f510-4442-ab60-1a705c7f6fc6 | overcloud-full-vmlinuz | aki         | aki              | 5026624   | active |
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+


Actual results:
Duplicate images created

Expected results:
I expected one of the following:
1. Just upload the missing overcloud-full qcow image
2. Look at the images and only update those which have been modified.

I wasn't sure if we had (2) implemented, but that's the way the devtest TripleO scripts work, so probably good to replicate IMO.

I manually removed the overcloud-full image because I knew my local image was modified, but I didn't expect all the other images to end up duplicated.
Comment 3 Jay Dobies 2015-07-16 15:03:35 EDT
One possible approach will be for the CLI to do a check to see if an image already exists with the name and fail if it does. We can offer a flag to overwrite the existing image if found which would delete the existing first (assuming glance doesn't have its own sort of overwrite flag).

Ultimately, I could see a use in storing multiple versions of an image for upgrade purposes, but quite a bit of the rest of the workflow would need to change for that to make sense.
Comment 4 Marek Aufart 2015-07-24 12:29:53 EDT
*** Bug 1244139 has been marked as a duplicate of this bug. ***
Comment 7 Amit Ugol 2015-09-06 04:16:43 EDT
Latest version looks like this:

$ openstack overcloud image upload
Image "overcloud-full-vmlinuz" is up-to-date, skipping.
Image "overcloud-full-initrd" is up-to-date, skipping.
Image "overcloud-full" is up-to-date, skipping.
Image "bm-deploy-kernel" is up-to-date, skipping.
Image "bm-deploy-ramdisk" is up-to-date, skipping.
Image file "/httpboot/discovery.kernel" is up-to-date, skipping.
Image file "/httpboot/discovery.ramdisk" is up-to-date, skipping.


Updating images is a different matter and wasn't tested here. If that does not work it will need a new bug.
Comment 9 errata-xmlrpc 2015-10-08 08:15:07 EDT
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

Note You need to log in before you can comment on or make changes to this bug.