backup image fails

Bug #1065060 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

I use Folsom releale.
I set OpenStack with Glance.

When I try to do a backup image of an instance, I get an error in nova-compute logs and in Glance log.

I use this API request to do a backup :
curl -i http://192.168.146.6:8774/v2/83a649b306f64942a3068f6a4fcf0eda/servers/8cc97452-f176-4c8a-b670-8dd40b8f944f/action -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 2cb3661781174a97864f8abe5612da2a" -d '{"createBackup": {"name": "Backup 1", "backup_type": "daily", "rotation": 2}}'
The snapshot is created but the older backup are not deleted.

I opened two bug, this one for Glance and another one for Nova :
https://bugs.launchpad.net/nova/+bug/1065053

Glance API logs :

2012-10-10 16:11:33 DEBUG glance.registry [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Updating image metadata for image 602a5d39-e371-46e3-8fb3-2601acde7c70... update_image_metadata /opt/stack/glance/glance/registry/__init__.py:144
2012-10-10 16:11:33 DEBUG glance.common.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/602a5d39-e371-46e3-8fb3-2601acde7c70 _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:33 DEBUG glance.registry.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request PUT /images/602a5d39-e371-46e3-8fb3-2601acde7c70 HTTP 200 request id req-11949b15-ef57-4b48-a1ac-ae4cd5cca863 do_request /opt/stack/glance/glance/registry/client.py:94
2012-10-10 16:11:33 DEBUG glance.common.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/602a5d39-e371-46e3-8fb3-2601acde7c70 _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:33 DEBUG glance.registry.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request GET /images/602a5d39-e371-46e3-8fb3-2601acde7c70 HTTP 200 request id req-a74a4361-a16c-4b32-951e-9f3267e03972 do_request /opt/stack/glance/glance/registry/client.py:94
2012-10-10 16:11:33 DEBUG glance.api.v1.images [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Setting image 602a5d39-e371-46e3-8fb3-2601acde7c70 to status 'saving' _upload /opt/stack/glance/glance/api/v1/images.py:426
2012-10-10 16:11:33 DEBUG glance.registry [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Updating image metadata for image 602a5d39-e371-46e3-8fb3-2601acde7c70... update_image_metadata /opt/stack/glance/glance/registry/__init__.py:144
2012-10-10 16:11:33 DEBUG glance.common.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/602a5d39-e371-46e3-8fb3-2601acde7c70 _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:33 DEBUG glance.registry.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request PUT /images/602a5d39-e371-46e3-8fb3-2601acde7c70 HTTP 200 request id req-1b61c99e-ec5d-4c02-a571-054e856392d2 do_request /opt/stack/glance/glance/registry/client.py:94
2012-10-10 16:11:33 DEBUG glance.api.v1.images [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Uploading image data for image 602a5d39-e371-46e3-8fb3-2601acde7c70 to file store _upload /opt/stack/glance/glance/api/v1/images.py:431
2012-10-10 16:11:34 DEBUG glance.store.filesystem [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Wrote 25165824 bytes to /opt/stack/data/glance/images/602a5d39-e371-46e3-8fb3-2601acde7c70 with checksum 26ef441b0b1afe9fcf6ac40ae009be86 add /opt/stack/glance/glance/store/filesystem.py:227
2012-10-10 16:11:34 DEBUG glance.api.v1.images [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Updating image 602a5d39-e371-46e3-8fb3-2601acde7c70 data. Checksum set to 26ef441b0b1afe9fcf6ac40ae009be86, size set to 25165824 _upload /opt/stack/glance/glance/api/v1/images.py:457
2012-10-10 16:11:34 DEBUG glance.registry [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Updating image metadata for image 602a5d39-e371-46e3-8fb3-2601acde7c70... update_image_metadata /opt/stack/glance/glance/registry/__init__.py:144
2012-10-10 16:11:34 DEBUG glance.common.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/602a5d39-e371-46e3-8fb3-2601acde7c70 _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:34 DEBUG glance.registry.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request PUT /images/602a5d39-e371-46e3-8fb3-2601acde7c70 HTTP 200 request id req-71c878a0-464f-400d-93da-bd26cba7d77d do_request /opt/stack/glance/glance/registry/client.py:94
2012-10-10 16:11:34 DEBUG glance.registry [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Updating image metadata for image 602a5d39-e371-46e3-8fb3-2601acde7c70... update_image_metadata /opt/stack/glance/glance/registry/__init__.py:144
2012-10-10 16:11:34 DEBUG glance.common.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/602a5d39-e371-46e3-8fb3-2601acde7c70 _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:34 DEBUG glance.registry.client [4a2cded3-48fb-4836-a623-a710ad08d0f7 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request PUT /images/602a5d39-e371-46e3-8fb3-2601acde7c70 HTTP 200 request id req-7ad6b0ec-7d65-4e1c-b142-0e541252abe5 do_request /opt/stack/glance/glance/registry/client.py:94
2012-10-10 16:11:34 16887 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: GET //v1/images/detail Accept: process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:45
2012-10-10 16:11:34 16887 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:58
2012-10-10 16:11:34 16887 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:70
2012-10-10 16:11:34 16887 DEBUG glance.api.middleware.version_negotiation [-] new uri /v1/images/detail process_request /opt/stack/glance/glance/api/middleware/version_negotiation.py:71
2012-10-10 16:11:35 DEBUG glance.api.policy [d4eff4f4-6f55-4718-a05e-7bf4e0b0deda 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Loaded policy rules: {u'default': [], u'manage_image_cache': [[u'role:admin']]} load_rules /opt/stack/glance/glance/api/policy.py:63
2012-10-10 16:11:35 DEBUG glance.common.client [d4eff4f4-6f55-4718-a05e-7bf4e0b0deda 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Constructed URL: http://0.0.0.0:9191/images/detail?property-instance_uuid=8cc97452-f176-4c8a-b670-8dd40b8f944f&property-backup_type=daily&limit=20&property-image_type=backup&marker=None&is_public=none _construct_url /opt/stack/glance/glance/common/client.py:464
2012-10-10 16:11:35 ERROR glance.registry.client [d4eff4f4-6f55-4718-a05e-7bf4e0b0deda 0729338e3e4e473496778822e78c8fd3 83a649b306f64942a3068f6a4fcf0eda] Registry request GET /images/detail Exception
2012-10-10 16:11:35 16887 TRACE glance.registry.client Traceback (most recent call last):
2012-10-10 16:11:35 16887 TRACE glance.registry.client File "/opt/stack/glance/glance/registry/client.py", line 89, in do_request
2012-10-10 16:11:35 16887 TRACE glance.registry.client action, **kwargs)
2012-10-10 16:11:35 16887 TRACE glance.registry.client File "/opt/stack/glance/glance/common/client.py", line 63, in wrapped
2012-10-10 16:11:35 16887 TRACE glance.registry.client return func(self, *args, **kwargs)
2012-10-10 16:11:35 16887 TRACE glance.registry.client File "/opt/stack/glance/glance/common/client.py", line 444, in do_request
2012-10-10 16:11:35 16887 TRACE glance.registry.client headers=headers)
2012-10-10 16:11:35 16887 TRACE glance.registry.client File "/opt/stack/glance/glance/common/client.py", line 80, in wrapped
2012-10-10 16:11:35 16887 TRACE glance.registry.client return func(self, method, url, body, headers)
2012-10-10 16:11:35 16887 TRACE glance.registry.client File "/opt/stack/glance/glance/common/client.py", line 574, in _do_request
2012-10-10 16:11:35 16887 TRACE glance.registry.client raise exception.Invalid(res.read())
2012-10-10 16:11:35 16887 TRACE glance.registry.client Invalid: 400 Bad Request
2012-10-10 16:11:35 16887 TRACE glance.registry.client
2012-10-10 16:11:35 16887 TRACE glance.registry.client Invalid marker format
2012-10-10 16:11:35 16887 TRACE glance.registry.client
2012-10-10 16:11:35 16887 TRACE glance.registry.client
2012-10-10 16:11:35 16887 TRACE glance.registry.client

Revision history for this message
Édouard Thuleau (ethuleau) wrote :

I investigated the problem and I think it's not Glance bug.
When I made a backup on VM, Nova requests Glance to get the list of backup image associated to the instance. And with this list, Nova can clean backup images according to rotation parameter.

To get this backup image list, Nova use the 'marker' and 'limit' parameters of Glance API.
But the first request sent by Nova sets the 'marker' parameter to 'None' and Glance doesn't accept this value and reponds with invalid parameter exception.

So I don't think it's a Glance bug. Or, do you think, Glance should accept 'marker' parameter seted to 'None' or 'none' like the 'is_public' parameter ?

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Based on what you said, this is not a Glance bug. The marker parameter is required to be an image identifier (the fact that is_public can be 'none' is unfortunate as that's an old hack to get around some silly behavior).

Changed in glance:
status: New → Invalid
Mark McLoughlin (markmc)
tags: removed: folsom-backport-potential
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.