[openstack-dev] [nova][api] Is this a potential issue
Jiang, Yunhong
yunhong.jiang at intel.com
Fri Nov 15 21:54:09 UTC 2013
> -----Original Message-----
> From: Dan Smith [mailto:dms at danplanet.com]
> Sent: Friday, November 15, 2013 7:30 AM
> To: OpenStack Development Mailing List (not for usage questions);
> isaku.yamahata at gmail.com
> Subject: Re: [openstack-dev] [nova][api] Is this a potential issue
>
> > You're not missing anything. But I think that's a bug, or at least an
> > unexpected change in behaviour from how it used to work. If you
> follow
> > instance_update() in nova.db.sqlalchemy.api just the presence of
> > expected_task_state triggers the check. So we may need to find a way
> to
> > pass that through with the save method.
>
> This came up recently. We decided that since we no longer have a kwargs
> dictionary to test for the presence or absence of that flag, that we
> would require setting it to a tuple, which is already supported for
> allowing multiple state possibilities. So, if you pass
> expected_task_state=(None,) then it will do the right thing.
>
> Make sense?
This should work, although I'm not sure if it's so clean. I will cook a patch for it.
--jyh
>
> --Dan
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list