Re: how to determine when we'll enter the other deployment on reboot



On Mon, Feb 5, 2018 at 12:56 PM, Davis Roman <davis roman84 gmail com> wrote:
Perhaps the answer to my very first question regarding how to tell if a
deployment switch will occur on the next reboot is to look at the order of
commit entries in 'ostree admin status'

It appears to me that after performing a switch, the new commit is placed as
the first entry however the star is not pointing to it yet.

Yeah, that's how ostree manages it. The order of the entries in
"ostree admin status" corresponds to the list of deployments. The
first deployment (index 0) is the one you'll reboot into. I've never
had the need to run `ostree admin switch` except in cases where I need
to tell ostree to do something different. When a new deployment is
created (like from "ostree admin upgrade" or "ostree admin deploy"),
it gets put at the beginning of the list.

Here's a stupid script I wrote for Endless that implements a really
cheesy rollback by simply cycling around the list of deployments so
the previous one is first -
https://github.com/endlessm/eos-meta/blob/master/eos-tech-support/eos-rollback.

--
Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]