Comment 9 for bug 1627597

Revision history for this message
Bhagyashri Shewale (bhagyashri-shewale) wrote :

Hi All,

I want to propose 3 solution when rotation parameter is 0 while taking instance backup.

Solution 1: If user passed rotation 0 to create instance backup then avoid the backup image creation at api side and delete all the previous backup images in api side itself.

Pros: 1. Solution 1 will require minimum changes in code and will not make call to the compute node.

Cons: 2. The drawback of this solution is, it might impact on the response time if there are too many backups for that instance.

Solution 2: Avoid the backup image creation at api side and call the compute node by passing the image_id parameter as None and delete all the previous backup images at the compute node for the given instance.

Cons : 1. This solution need maximum changes at several places.
       2. Calling the compute node only for previous backup image deletion doesn't make any sense.

Solution 3: Change the api-spec that rotation parameter value should be greater than 0.

Pros: 1. Minimal changes required

Cons: 1. User will need to delete the last backup image explicitly.

To get the backup images of the specific instance for the explicit deletion, user needs to find out by using the following command:

$ glance image-list --property-filter <KEY=VALUE>

For example: $ glance image-list --property-filter instance_uuid=6d2b9b03-929e-4f9c-9977-05f3c2f3a47c

I want to recommend solution 1 and 3 is better one out of the three solutions.

Please let me know your opinions about the same.