glance-replicator: handle circumstances when one of image properties is None

Bug #1208417 reported by Yufang Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Yufang Zhang

Bug Description

In glance-replicator, all image properties in the master glance are synced to the slave glance. But there are circumstances( kernel_id or ramdisk_id, etc. ) when image properties in the master glance are None. Glance-relicator doesn't handle this issue, thus all such properties are trasnlated to the string 'None' in the slave glance, which is incorrect.

Changed in glance:
assignee: nobody → Yufang Zhang (yufang521247)
summary: - glance-replicator: handle circumstances when one of image property is
+ glance-replicator: handle circumstances when one of image properties is
None
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: New → In Progress
Revision history for this message
Yufang Zhang (yufang521247) wrote :

I check the mysql, here are some problematic entries:

mysql> select * from image_properties where name='kernel_id';
+-----+--------------------------------------+-----------+-------+---------------------+---------------------+------------+---------+
| id | image_id | name | value | created_at | updated_at | deleted_at | deleted |
+-----+--------------------------------------+-----------+-------+---------------------+---------------------+------------+---------+
| 7 | ac9990ad-b3ac-45ea-8c2e-ddf45dd10791 | kernel_id | None | 2013-08-05 08:02:52 | 2013-08-05 08:02:52 | NULL | 0 |
| 20 | bcb7fe30-0561-42ae-8adf-d0decc1dbe07 | kernel_id | None | 2013-08-05 08:11:04 | 2013-08-05 08:11:04 | NULL | 0 |

The value of kernel_id shoud be NULL instead of string 'None'.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/40199
Committed: http://github.com/openstack/glance/commit/ec07f0b437bef428a101073610e47f6b2c10dc1a
Submitter: Jenkins
Branch: master

commit ec07f0b437bef428a101073610e47f6b2c10dc1a
Author: Yufang Zhang <zhangyufang@360.cn>
Date: Mon Aug 5 18:28:30 2013 +0800

    Handle None value properties in glance-replicator

    bug 1208417

    In glance-replicator, all image properties in the master glance are
    synced to the slave. But there are circumstances(kernel_id or
    ramdisk_id, etc.) when image properties in the master are None.
    glance-relicator doesn't handle this issue, thus all such properties
    are trasnlated to the string 'None' in the slave glance, which is
    incorrect.

    This patch fixes this problem by add a check before post metadata to
    the slave glance. All None properties are translated to '' before
    posted to slave glance.

    Change-Id: I9b674db907f707ac4dce28c8a7e3d81fcce61193

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
Yang Yu (yuyangbj) wrote : I will be on vacation from 9/5 to 9/15, urgent call: 13811509950

I will be out of the office starting 2013-09-05 and will not return until
2013-09-15.

I will be on my marriage leave from 9/5 to 9/15, for any urgent issue
please call me before 9/7.

For daily work, please ask my scrum master Zhu Zhu for help.
For glance issue, please ask glance SME Feilong Wang for help.
For defect report, there will be no report next week.

Thierry Carrez (ttx)
Changed in glance:
milestone: havana-3 → 2013.2
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.