[openstack-dev] [nova] Two questions about 'backup' API
wu jiang
wingwj at gmail.com
Thu Jun 26 12:07:55 UTC 2014
Hi all,
I tested the 'backup' API recently and got two questions about it:
1. Why 'daily' & 'weekly' appear in code comments & novaclient about
'backup_type' parameter?
The 'backup_type' parameter is only a tag for this backup(image).
And there isn't corresponding validation for 'backup_type' about these two
types.
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'
backup request.
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,
rotation):
#
# 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.
Thanks.
WingWJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140626/f6ab7a7f/attachment.html>
More information about the OpenStack-dev
mailing list