[openstack-dev] [nova] Two questions about 'backup' API
Vishvananda Ishaya
vishvananda at gmail.com
Wed Jul 2 18:42:11 UTC 2014
On Jun 26, 2014, at 6:58 PM, wu jiang <wingwj at gmail.com> wrote:
> Hi Vish, thanks for your reply.
>
> About Q1, I mean that Nova doesn't have extra processions/works for 'daily'/'weekly' than other backup_types like '123'/'test'.
> The 'daily' & 'weekly' don't have unique places in the API than any other else.
>
> But we gave them as examples in code comments especially in novaclient.
>
> A few users asked me why their instances were not backup-ed automatically, they thought we have a timing task to do this if the 'backup_type' equals to 'daily'/'weekly' because we prompt them to use it..
> Therefore, it's useless and inclined to make confusion for this API IMO. No need to show them in code comments & novaclient.
>
> P.S. So maybe 'backup_name'/'backup_tag' is a better name, but we can't modify the API for compatibility..
Yes the name is confusing.
Vish
>
>
> Thanks.
>
> WingWJ
>
>
> On Fri, Jun 27, 2014 at 5:20 AM, Vishvananda Ishaya <vishvananda at gmail.com> wrote:
> On Jun 26, 2014, at 5:07 AM, wu jiang <wingwj at gmail.com> wrote:
>
> > 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.
>
> The tag affects the cleanup of old copies, so if you do a tag of ‘weekly’ and
> the rotation is 3, it will insure you only have 3 copies that are tagged weekly.
> You could also have 3 copies of the daily tag as well.
>
> >
> > 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.
>
> That makes sense I suppose.
>
> Vish
>
> >
> >
> > So, what's your opinions? Look forward to your suggestion.
> > Thanks.
> >
> > WingWJ
> >
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140702/2ecaacae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140702/2ecaacae/attachment.pgp>
More information about the OpenStack-dev
mailing list