[openstack-dev] [nova] Two questions about 'backup' API
wingwj at gmail.com
Thu Jun 26 12:07:55 UTC 2014
I tested the 'backup' API recently and got two questions about it:
1. Why 'daily' & 'weekly' appear in code comments & novaclient about
The 'backup_type' parameter is only a tag for this backup(image).
And there isn't corresponding validation for 'backup_type' about these two
Moreover, there is also no periodic_task for 'backup' in compute host.
(It's fair to leave the choice to other third-parts system)
So, why we leave 'daily | weekly' example in code comments and novaclient?
IMO it may lead confusion that Nova will do more actions for 'daily|weekly'
2. Is it necessary to backup instance when 'rotation' is equal to 0?
Let's look at related codes in nova/compute/manager.py:
# def backup_instance(self, context, image_id, instance, backup_type,
# self._do_snapshot_instance(context, image_id, instance, rotation)
# self._rotate_backups(context, instance, backup_type, rotation)
I knew Nova will delete all backup images according the 'backup_type'
parameter when 'rotation' equals to 0.
But according the logic above, Nova will generate one new backup in
_do_snapshot_instance(), and delete it in _rotate_backups()..
It's weird to snapshot a useless backup firstly IMO.
We need to add one new branch here: if 'rotation' is equal to 0, no need to
backup, just rotate it.
So, what's your opinions? Look forward to your suggestion.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev