Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback after bootc switch sets rollback deployment as default #946

Open
antheas opened this issue Dec 7, 2024 · 1 comment
Open

Rollback after bootc switch sets rollback deployment as default #946

antheas opened this issue Dec 7, 2024 · 1 comment
Labels
area/client Related to the client/CLI bug Something isn't working

Comments

@antheas
Copy link
Contributor

antheas commented Dec 7, 2024

On a fresh boot (no previous updates), running the following results in rebooting into the rollback deployment instead of the booted one

When calling rollback after switch, we expect to throw away the staged deployment. But instead, rollback throws it away and then sets the rollback deployment as default.

Bootc is built from #921

bazzite@antheas-ally-x:~$ sudo ./bootc status
● Booted image: ghcr.io/ublue-os/bazzite-deck:testing
        Digest: sha256:fbbeb28c7cc5c6d3240e8d019e9160f6796920c3f3d86305970d3f2729d94e75
       Version: testing-41.20241204.4 (2024-12-05 02:55:02 UTC)

  Rollback image: ghcr.io/ublue-os/bazzite-deck:stable
          Digest: sha256:f44bebbf15932d9edc4e0b28b91614be1e172dba004c0cad6f7a3d46c00837eb
         Version: 41.20241125 (2024-11-26 03:48:17 UTC)

# Rebase (notice indicator here is wrong; ball should be in staged)
bazzite@antheas-ally-x:~$ sudo ./bootc switch ghcr.io/ublue-os/bazzite-deck:testing-41.20241204.3
bazzite@antheas-ally-x:~$ sudo ./bootc status
  Staged image: ghcr.io/ublue-os/bazzite-deck:testing-41.20241204.3
        Digest: sha256:0f0c2d9eb66102d0878030853e5ffeb8b3360ece0fa6879c2e3b9db03eb31fe1
       Version: testing-41.20241204.3 (2024-12-05 01:56:42 UTC)

● Booted image: ghcr.io/ublue-os/bazzite-deck:testing
        Digest: sha256:fbbeb28c7cc5c6d3240e8d019e9160f6796920c3f3d86305970d3f2729d94e75
       Version: testing-41.20241204.4 (2024-12-05 02:55:02 UTC)

  Rollback image: ghcr.io/ublue-os/bazzite-deck:stable
          Digest: sha256:f44bebbf15932d9edc4e0b28b91614be1e172dba004c0cad6f7a3d46c00837eb
         Version: 41.20241125 (2024-11-26 03:48:17 UTC)

# Rollback, here again indicator is stuck on booted, but status --json lists next deployment to be rollback
bazzite@antheas-ally-x:~$ sudo ./bootc rollback
Next boot: rollback deployment
bazzite@antheas-ally-x:~$ sudo ./bootc status
● Booted image: ghcr.io/ublue-os/bazzite-deck:testing
        Digest: sha256:fbbeb28c7cc5c6d3240e8d019e9160f6796920c3f3d86305970d3f2729d94e75
       Version: testing-41.20241204.4 (2024-12-05 02:55:02 UTC)

  Rollback image: ghcr.io/ublue-os/bazzite-deck:stable
          Digest: sha256:f44bebbf15932d9edc4e0b28b91614be1e172dba004c0cad6f7a3d46c00837eb
         Version: 41.20241125 (2024-11-26 03:48:17 UTC)

Here are the status jsons before and after the switch

bazzite@antheas-ally-x:~$ sudo ./bootc status --json
{"apiVersion":"org.containers.bootc/v1","kind":"BootcHost","metadata":{"name":"host"},"spec":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:testing-41.20241204.3","transport":"registry"},"bootOrder":"default"},"status":{"staged":{"image":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:testing-41.20241204.3","transport":"registry"},"version":"testing-41.20241204.3","timestamp":"2024-12-05T01:56:42Z","imageDigest":"sha256:0f0c2d9eb66102d0878030853e5ffeb8b3360ece0fa6879c2e3b9db03eb31fe1"},"cachedUpdate":null,"incompatible":false,"pinned":false,"store":"ostreeContainer","ostree":{"checksum":"7f3937d3e9906f383a234b1fc82ebe01c79eda2242eac412973ee31c71fa6975","deploySerial":0}},"booted":{"image":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:testing","transport":"registry"},"version":"testing-41.20241204.4","timestamp":"2024-12-05T02:55:02Z","imageDigest":"sha256:fbbeb28c7cc5c6d3240e8d019e9160f6796920c3f3d86305970d3f2729d94e75"},"cachedUpdate":null,"incompatible":false,"pinned":false,"store":"ostreeContainer","ostree":{"checksum":"d4dabc03bbbda6ecee9e6b155c8657dc8fa28c718907c6553923aed279169ad8","deploySerial":1}},"rollback":{"image":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:stable","transport":"registry"},"version":"41.20241125","timestamp":"2024-11-26T03:48:17Z","imageDigest":"sha256:f44bebbf15932d9edc4e0b28b91614be1e172dba004c0cad6f7a3d46c00837eb"},"cachedUpdate":null,"incompatible":false,"pinned":false,"store":"ostreeContainer","ostree":{"checksum":"cc5ea15f6591d3e039bcf20d7f89130f1e2a8de29937d123e3db060696525c21","deploySerial":0}},"rollbackQueued":false,"type":"bootcHost"}}
sudo ./bootc status --json
{"apiVersion":"org.containers.bootc/v1","kind":"BootcHost","metadata":{"name":"host"},"spec":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:testing","transport":"registry"},"bootOrder":"rollback"},"status":{"staged":null,"booted":{"image":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:testing","transport":"registry"},"version":"testing-41.20241204.4","timestamp":"2024-12-05T02:55:02Z","imageDigest":"sha256:fbbeb28c7cc5c6d3240e8d019e9160f6796920c3f3d86305970d3f2729d94e75"},"cachedUpdate":null,"incompatible":false,"pinned":false,"store":"ostreeContainer","ostree":{"checksum":"d4dabc03bbbda6ecee9e6b155c8657dc8fa28c718907c6553923aed279169ad8","deploySerial":1}},"rollback":{"image":{"image":{"image":"ghcr.io/ublue-os/bazzite-deck:stable","transport":"registry"},"version":"41.20241125","timestamp":"2024-11-26T03:48:17Z","imageDigest":"sha256:f44bebbf15932d9edc4e0b28b91614be1e172dba004c0cad6f7a3d46c00837eb"},"cachedUpdate":null,"incompatible":false,"pinned":false,"store":"ostreeContainer","ostree":{"checksum":"cc5ea15f6591d3e039bcf20d7f89130f1e2a8de29937d123e3db060696525c21","deploySerial":0}},"rollbackQueued":true,"type":"bootcHost"}}

The issue was verified by rebooting and ending up in the rollback deployment.

@antheas
Copy link
Contributor Author

antheas commented Dec 7, 2024

I noticed it when testing the updater. Switching and then undoing the update lead to having a rollback queued.

Verified with commands manually that indeed the rollback deployment becomes default incorrectly.

@cgwalters cgwalters added bug Something isn't working area/client Related to the client/CLI labels Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client Related to the client/CLI bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants