bootc icon indicating copy to clipboard operation
bootc copied to clipboard

`bootc status --booted` does not show booted deployment only

Open henrywang opened this issue 1 year ago • 1 comments

bootc status --booted shows both booted and rollback deployments. bootc version: bootc-202404082017.g593a932258-1.el9.x86_64

    apiVersion: org.containers.bootc/v1alpha1
    kind: BootcHost
    metadata:
      name: host
    spec:
      image:
        image: quay.io/redhat_emp1/centos-bootc-dev-test:efvi
        transport: registry
      bootOrder: default
    status:
      staged: null
      booted:
        image:
          image:
            image: quay.io/redhat_emp1/centos-bootc-dev-test:efvi
            transport: registry
          version: stream9.20240408.0
          timestamp: null
          imageDigest: sha256:321f50bfe1d7357b96c5ae1bd167a73c8e35da3148c588647e28706af2f84ba6
        cachedUpdate: null
        incompatible: false
        pinned: false
        ostree:
          checksum: ef81c60b6c0e7c3646b2065b8a2fa820583d047dff2af5bb393f2de3a7fdb159
          deploySerial: 0
      rollback:
        image:
          image:
            image: localhost/centos-bootc-dev-test:efvi
            transport: registry
          version: stream9.20240408.0
          timestamp: null
          imageDigest: sha256:8567933fb840bd38804f9f0226d6edec9630d46506cdf83347152ee6961ec621
        cachedUpdate: null
        incompatible: false
        pinned: false
        ostree:
          checksum: daf537165510cd1c77b389a38d3cce5c0cd20bb83594219b3d57b6df833376dd
          deploySerial: 0
      rollbackQueued: false
      type: bootcHost

henrywang avatar Apr 10 '24 12:04 henrywang

Confirmed, the code for the status command doesn't consult that flag at all today:

https://github.com/containers/bootc/blob/593a93225813f6c99afd66010f0edb8539dc2415/lib/src/status.rs#L302-L327

The --booted flag is available in StatusOpts.booted, but note the only thing we consult in opts above is the json flag; the booted flag is never read.

jeckersb avatar Apr 10 '24 14:04 jeckersb