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



While attempting to find the answer to my first question, I have now stumbled upon some new questions which I know have puzzled me in the past.

So here are my sequence of steps.

1. I take note of my current ostree status
2. I then take a look at the contents of my uEnv.txt file
3. In 'ostree admin status' the commit next to the star does not match the commit that uEnv.txt claims i should be booting into.
4. I then perform a switch in order to boot into the alternative deployment
5. I later check the current ostree status and I notice that the star points to the other deployment ( which make sense to me since I perform a switch)
6. I look at the contents of uEnv.txt and it's now pointing to an entirely different commit and I'm not sure why.

I would greatly appreciate if I can get some help trying to explain this. Thank you!


root@hon-grip-aio-200-01939A:/# ostree admin status
* poky 810b3f6c054df8f1c8a10ab1b5a9cb6de3150bb5304278ea0ebc1f0cb3d79b95.2
    origin refspec: 810b3f6c054df8f1c8a10ab1b5a9cb6de3150bb5304278ea0ebc1f0cb3d79b95
  poky 3e2b0445740e693008fab7a631f51cb0561f0f7dc3f249f0a275d8556f7ad2c0.1
    origin refspec: 3e2b0445740e693008fab7a631f51cb0561f0f7dc3f249f0a275d8556f7ad2c0
root@hon-grip-aio-200-01939A:/# 
root@hon-grip-aio-200-01939A:/# ls /boot/
loader  loader.1  ostree
root@hon-grip-aio-200-01939A:/# cat /boot/loader.1/uEnv.txt 
kernel_image=/ostree/poky-dcae119e8f737fa666ec8db603897bf3cadd8a5db4f75124d809f540a0fd9258/boot.itb
bootdir=/ostree/poky-dcae119e8f737fa666ec8db603897bf3cadd8a5db4f75124d809f540a0fd9258/
bootargs=ostree=/ostree/boot.1/poky/dcae119e8f737fa666ec8db603897bf3cadd8a5db4f75124d809f540a0fd9258/0
root@hon-grip-aio-200-01939A:/# 
root@hon-grip-aio-200-01939A:/# ostree admin switch 3e2b0445740e693008fab7a631f51cb0561f0f7dc3f249f0a275d8556f7ad2c0


Copying /etc changes: 5 modified, 3 removed, 13 added
Transaction complete; bootconfig swap: yes deployment count change: 0
Deleting ref '(null):810b3f6c054df8f1c8a10ab1b5a9cb6de3150bb5304278ea0ebc1f0cb3d79b95'
root@hon-grip-aio-200-01939A:/# 
root@hon-grip-aio-200-01939A:/# ostree admin status
  poky 3e2b0445740e693008fab7a631f51cb0561f0f7dc3f249f0a275d8556f7ad2c0.2
    origin refspec: 3e2b0445740e693008fab7a631f51cb0561f0f7dc3f249f0a275d8556f7ad2c0
* poky 810b3f6c054df8f1c8a10ab1b5a9cb6de3150bb5304278ea0ebc1f0cb3d79b95.2
    origin refspec: 810b3f6c054df8f1c8a10ab1b5a9cb6de3150bb5304278ea0ebc1f0cb3d79b95
root@hon-grip-aio-200-01939A:/# 
root@hon-grip-aio-200-01939A:/# ls /boot/
loader  loader.0  ostree
root@hon-grip-aio-200-01939A:/# cat /boot/loader.0/uEnv.txt 
kernel_image=/ostree/poky-2e281e7d3ba5228a382e97ccba47878d1f17b87902fd6ca0b39e1305fbfae6bb/boot.itb
bootdir=/ostree/poky-2e281e7d3ba5228a382e97ccba47878d1f17b87902fd6ca0b39e1305fbfae6bb/
bootargs=ostree=/ostree/boot.0/poky/2e281e7d3ba5228a382e97ccba47878d1f17b87902fd6ca0b39e1305fbfae6bb/0
root@hon-grip-aio-200-01939A:/#

On Mon, Feb 5, 2018 at 9:54 AM, Davis Roman <davis roman84 gmail com> wrote:
Hello,

We're currently using "ostree admin switch <REF>" to prepare our machine to enter a new deployment once a reboot occurs.

One of our application developers asked me how it is possible for them to check if we'll enter a new deployment once a reboot takes place. 

They're not  satisfied with me running the switch command and then informing them via IPC that a switch is about to occur.

Instead they'd rather run some command themselves or check something in the filesystem to know if a switch is about to happen.

Is there any easy way to do this?

Thank you,

Davis

  



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