Skip to content

Why rpm-ostree status output doesn't prints unique deployment IDs while listing deployments ? #5373

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

Open
lazysegtree opened this issue May 4, 2025 · 1 comment

Comments

@lazysegtree
Copy link

Its hard to tell which deployment is being referred to when listing deployments using rpm-ostree status. I have to use --json all the time

Note - Some info is hidden due to privacy concerns

For example

[kuknitin@flamingo-preprod-load-balancer-02529 ~ 04:29:46]
$ rpm-ostree status
State: idle
warning: Failed to query journal: couldn't find current boot in journal
Deployments:
  5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c
                  Version: 9.1709 (2025-02-08T05:38:44Z)
                     Diff: 2 upgraded, 1 downgraded, 8 added
          LayeredPackages: <HIDDEN>
            LocalPackages: <HIDDEN>

  5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c
                  Version: 9.1709 (2025-02-08T05:38:44Z)
          LayeredPackages: <HIDDEN>
            LocalPackages: <HIDDEN>

● 5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c
                  Version: 9.1709 (2025-02-08T05:38:44Z)
               LiveCommit: b0ce5f00fc50e0c3903600121d06388acc6509916ab3ce39dadd7b50391e632f
                 LiveDiff: 1 upgraded, 1 downgraded, 4 added
          LayeredPackages: <HIDDEN>
            LocalPackages: <HIDDEN>
                 Unlocked: transient
[kuknitin@flamingo-preprod-load-balancer-02529 ~ 04:32:58]
$

All deployments have same timestamp, and same origin commit. But they have different packages.

Its very hard for me to know which exact deployment has which diff, and which exact deployment is active.

I have to use this

[kuknitin@flamingo-preprod-load-balancer-02529 ~ 04:18:33]
$ rpm-ostree status --json | jq .deployments | jq '.[] | "ID \(.id) Origin(BaseCommit) \(.origin) Checksum \(.checksum)  Booted \(.booted) LiveReplaced \(."live-replaced") Timestamp \(.timestamp)"'
"ID evergreen-34980438b43c440182208758721d6cec60d5898f393783d28022a7c1417cae95.0 Origin(BaseCommit) 5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c Checksum 34980438b43c440182208758721d6cec60d5898f393783d28022a7c1417cae95  Booted false LiveReplaced null Timestamp 1746330458"
"ID evergreen-b0ce5f00fc50e0c3903600121d06388acc6509916ab3ce39dadd7b50391e632f.0 Origin(BaseCommit) 5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c Checksum b0ce5f00fc50e0c3903600121d06388acc6509916ab3ce39dadd7b50391e632f  Booted false LiveReplaced null Timestamp 1746025273"
"ID evergreen-74a45211f00577986ea929f27a608a26f6275d0a47ca1623fe91f81380793f2c.0 Origin(BaseCommit) 5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c Checksum 74a45211f00577986ea929f27a608a26f6275d0a47ca1623fe91f81380793f2c  Booted true LiveReplaced b0ce5f00fc50e0c3903600121d06388acc6509916ab3ce39dadd7b50391e632f Timestamp 1745329711"
[kuknitin@flamingo-preprod-load-balancer-02529 ~ 04:19:19]
$

Since we have a deployment ID, why not show that in rpm-ostree status ? Even the timestamp is the same in the output ? How can some figure out which exact deployment is being referred from the rpm-ostree status output ?

@lazysegtree
Copy link
Author

For example if I want to figure out which deployment has this diff " Diff: 2 upgraded, 1 downgraded, 8 added", I have to list all deployement commits via above jq, and then do rpm-ostree db diff <commit1> <commit2> for all 3 pairs of commits and then figure out which deployment was being referred by rpm-ostree status for this

5d9e3491e72c773fbbe291ac591ca1e9726347e142f345887ce929b4154a6f9c
                  Version: 9.1709 (2025-02-08T05:38:44Z)
                     Diff: 2 upgraded, 1 downgraded, 8 added
          LayeredPackages: <HIDDEN>
            LocalPackages: <HIDDEN>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant