Comment 1 for bug 1065053

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

I investigated the problem and I think it's not only a Glance bug.

When we make a backup on VM through the compute API, Nova requests Glance to get the list of images precedently backuped for this instance. And with this list, Nova must clean backuped images according to rotation parameter.

The problem occurs when Nova request this backup images list from Glance.

Nova use the 'marker' and 'limit' parameters to get the metadata list page by page. And the first request to get the first page of the list, Nova sets the 'marker' parameter to 'None' and limit to '20' (see function https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1203).
But Glance doesn't accept requests with the parameter 'marker' seted to 'None' and reponds with 400 'Invalid: 400 Bad Request'.
And Nova doesn't catch this error. So the function '/opt/stack/nova/nova/compute/manager.py", line 1189, in _rotate_backups' fails.

I don't know if it's only a Nova Bug or if Glance should accept requests with 'marker' parameter seted to 'None' or 'none' like it accepts it for the 'is_public' parameter. But in any case, Nova should catch and raise correctly errors sended by Glance.