coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
856 stars 195 forks source link

PendingCommit displayed after rollback 🔙 #732

Open dustymabe opened 7 years ago

dustymabe commented 7 years ago

I'm seeing PendingCommit when I don't know if I should.

I started with an image based on https://kojipkgs.fedoraproject.org/compose/twoweek/Fedora-Atomic-25-20170327.0/compose/CloudImages/x86_64/images/Fedora-Atomic-25-20170327.0.x86_64.qcow2

I then wanted to deploy a specific commit from the updates stream:

# ostree admin set-origin --index 0 fedora-atomic https://kojipkgs.fedoraproject.org/atomic/25/ fedora-atomic/25/x86_64/updates/docker-host
# rpm-ostree deploy d5a64a6df8e2d47d85f2ffb1b5c38df3cf90aebee176159737aad2fccd850c15

I think rolled that back:

# rpm-ostree rollback --reboot

And I end up with something like:

State: idle
Deployments:
● fedora-atomic:fedora-atomic/25/x86_64/updates/docker-host
             Version: 25.89 (2017-03-26 21:04:50)
              Commit: 6a71adb06bc296c19839e951c38dc0b71ee5d7a82262fef9612f256f0c2a70da
       PendingCommit: d5a64a6df8e2d47d85f2ffb1b5c38df3cf90aebee176159737aad2fccd850c15
      PendingVersion: 25.95 (2017-04-02 20:35:00)
              OSName: fedora-atomic

  fedora-atomic:fedora-atomic/25/x86_64/updates/docker-host
             Version: 25.95 (2017-04-02 20:35:00)
              Commit: d5a64a6df8e2d47d85f2ffb1b5c38df3cf90aebee176159737aad2fccd850c15
              OSName: fedora-atomic

The PendingCommit information seems a bit confusing to me since I did a rollback.

cgwalters commented 7 years ago

Yeah, currently the PendingCommit appears when the ref differs in any way. Not sure offhand what to change this - maybe we could omit it if it's older, but that has its own level of magic.

dustymabe commented 7 years ago

If I reboot in this state it won't boot into the PendingCommit, right?

cgwalters commented 7 years ago

Correct; PendingCommit is just showing that the commit the ref is pointing to is different from the deployment's commit.

dustymabe commented 7 years ago

I'm seeing this again in a state where I don't think I should. I just installed F26AH and ran rpm-ostree upgrade --preview and here is what I see from status:

[root@brix ~]# rpm-ostree upgrade --preview
Updating from: (null)

8 metadata, 19 content objects fetched; 7795 KiB transferred in 6 seconds                                            
[root@brix ~]# 
[root@brix ~]# rpm-ostree status
State: idle
Deployments:
● fedora-atomic:fedora/26/x86_64/atomic-host
             Version: 26.56 (2017-06-05 14:49:31)
              Commit: 8b7f29341413f79bacba9f99da595ce0c2b63c94d6b118d3ab3fc18b4b72837d
       PendingCommit: a7971029de6fd83bd367ed4a280f37c87cdf56220e7e9c188f5a9c54bcc2c849
      PendingVersion: 26.58 (2017-06-07 14:57:32)
[root@brix ~]# 
[root@brix ~]# 
[root@brix ~]# rpm -q rpm-ostree
rpm-ostree-2017.5-2.fc26.x86_64

also not sure where the Updating from: (null) is coming from. Might have to do with the how we are creating the ISO or how the default kickstart within the ISO is configured.

cgwalters commented 7 years ago

upgrade --preview is currently expected to do this too; it writes the new commit to the ref, but with partial data.

dustymabe commented 7 years ago

upgrade --preview is currently expected to do this too; it writes the new commit to the ref, but with partial data.

do you consider the side effect of that (showing pending commit information) to be a bug? What's the use of the PendingCommit/PendingVersion information?

cgwalters commented 7 years ago

Yes, I'd say it's a bug. The original PR/commit explains the intent: https://github.com/projectatomic/rpm-ostree/pull/595