[openstack-dev] [heat][tripleo] User Initiated Rollback

Dan Prince dprince at redhat.com
Thu Dec 3 13:11:41 UTC 2015


On Wed, 2015-12-02 at 16:02 +0000, Steven Hardy wrote:
> So, chatting with Giulio today about https://bugs.launchpad.net/heat/
> +bug/1521944
> has be thinking about $subject.
> 
> The root case of that issue is essentially a corner case of a stack-
> update,
> combined with some coupling within the Neutron API which prevents the
> update traversal from working.
> 
> But it raises the broader question of what a "rollback" actually is,
> and
> how a user can potentially use it to get out of the kind of mess
> described
> in that bug (where, otherwise, your only option is to delete the
> entire
> stack).
> 
> Currently, we treat rollback as a special type of update, where, if
> an
> in-progress update fails, we then try to update again, to the
> previous
> stack definition[1], but as Giulio has discovered, there are times
> when
> that doesn't work, because what you actually want is to recover the
> existing resource from the backup stack, not create a new one with
> the same
> properties.

Is there more information about this case (a bug perhaps)? Presumably
it is an OpenStack resource you are talking about here... like a Nova
Server or Neutron Network Port?


> 
> Then, looking at convergence, we have a different definition of
> rollback,
> it's not yet clear to me how this should behave in a similar
> scenario, e.g
> when the resource we want to roll back to failed to get deleted but
> still
> exists (so, the resource is FAILED, but the underlying resource is
> fine)?
> 
> Finally, the interface to rollback - atm you have to know before
> something
> fails that you'd like to enable rollback for a specific update.  This
> seems
> suboptimal, since invariably by the time you know you need rollback,
> it's
> too late.  Can we enable a user-initiated rollback from a FAILED
> state, via
> one of:
> 
>  - Introduce a new heat API that allows an explicit heat stack-
> rollback?
>  - (ab)use PATCH to trigger rollback on heat stack-update -x --
> rollback=True?
> 
> The former approach fits better with the current stack.Stack
> implementation, because the ROLLBACK stack state already exists.  The
> latter has the advantage that it doesn't need a new API so might be
> backportable.
> 
> Any thoughts on how we might proceed to make this situation better,
> and
> enable folks to roll back in the least destructive way possible when
> they
> end up in a FAILED state?

>From a TripleO standpoint I would really like to end up in a place
where we aren't thinking of Heat as a rollback tool and more of a make
it so tool. I think there might be a small case for the
"infrastructure" side where Heat is creating OpenStack objects for us
(servers and ports). We'd like not to destroy/replace these when we
update the "infrastructure" pieces of our stack and if things go badly
on an update you just want to stay in the (hopefully still working)
previous state.

On the configuration (currently software deployments driving puppet) I
would very much like to have Heat be a make-it so tool that does what
we tell it. If I wanted to roll back the configuration I would prefer
to simply do another heat stack-update with the previous
parameters/manifests/etc. Or perhaps more drastically, delete the
entire configuration stack and heat stack-create with the previous one.
Puppet is meant to be idempotent so re-running a previously working
manifests might be just what you want. This wouldn't cover all cases
for rollback... and there are certainly things where you'd want a
custom ad-hoc puppet snippet or bash script to run before you did a
follow up heat stack-update to put things back like they were. For
these cases I think perhaps workflow tools to perhaps help drive our
Heat configuration orchestration could work well.

Dan

> 
> Steve
> 
> [1] https://github.com/openstack/heat/blob/master/heat/engine/stack.p
> y#L1331
> [2] https://github.com/openstack/heat/blob/master/heat/engine/stack.p
> y#L1143
> 
> _____________________________________________________________________
> _____
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubs
> cribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list