muranoclient doesn't compare hashes before uploading image to glance

Bug #1623888 reported by Dmytro Dovbii
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-muranoclient
Confirmed
Medium
Unassigned

Bug Description

If user wants to update his package in murano and download newer version from apps.openstack.org he will not get the image required by package if it also was updated previously, but has the same name as previous one.
This occurs because muranoclient does not compare checksum of already uploaded to glance image and image specified in dependencies of package:

https://github.com/openstack/python-muranoclient/blob/master/muranoclient/common/utils.py#L578-L584

Dmytro Dovbii (ddovbii)
description: updated
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

That;s what versions are for

Changed in python-muranoclient:
status: New → Opinion
status: Opinion → Invalid
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

Ah, I see it's about images. Then the bug is actually invalid. Since this would cause muranoclient to download the same image multiple times. hash sum is only available after the image is fully downloaded to glance — then if you download 2 packages and both of them need the same image — by your logic it would be downloaded twice. We had a bug back in L for fixing this I believe

Changed in python-muranoclient:
status: Invalid → Opinion
milestone: none → 0.12.0
importance: Undecided → Medium
Revision history for this message
Dmytro Dovbii (ddovbii) wrote :

well, we decided to resolve this bug by following logic:

* if image with the same name is already registered in glance, but does not have checksum (because it is downloading at this time, for example) we skip uploading

* if image with the same name is already registered and has different checksum then image in package's dependencies, we update metadata of old image by adding `-old` prefix to it's title and upload new one

Dmytro Dovbii (ddovbii)
Changed in python-muranoclient:
status: Opinion → Confirmed
tamil vanan (tamilhce)
Changed in python-muranoclient:
assignee: nobody → tamil vanan (tamilhce)
status: Confirmed → In Progress
tamil vanan (tamilhce)
Changed in python-muranoclient:
assignee: tamil vanan (tamilhce) → nobody
Changed in python-muranoclient:
status: In Progress → Confirmed
Changed in python-muranoclient:
milestone: 0.12.0 → 1.0.0
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.