muranoclient doesn't compare hashes before uploading image to glance

Bug #1623888 reported by Dmytro Dovbii on 2016-09-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-muranoclient
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) on 2016-09-15
description: updated
Kirill Zaitsev (kzaitsev) wrote :

That;s what versions are for

Changed in python-muranoclient:
status: New → Opinion
status: Opinion → Invalid
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
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) on 2016-09-16
Changed in python-muranoclient:
status: Opinion → Confirmed
tamil vanan (tamilhce) on 2016-09-17
Changed in python-muranoclient:
assignee: nobody → tamil vanan (tamilhce)
status: Confirmed → In Progress
tamil vanan (tamilhce) on 2016-09-17
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  Edit
Everyone can see this information.

Other bug subscribers