Skip to content

bootc status does not report unlocked status #474

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
travier opened this issue Apr 17, 2024 · 3 comments · May be fixed by #1258
Open

bootc status does not report unlocked status #474

travier opened this issue Apr 17, 2024 · 3 comments · May be fixed by #1258
Assignees
Labels
area/client Related to the client/CLI enhancement New feature or request triaged This looks like a valid issue

Comments

@travier
Copy link
Contributor

travier commented Apr 17, 2024

Running bootc usoverlay is not reflected in bootc status as far as I could see.

@travier travier added bug Something isn't working area/client Related to the client/CLI labels Apr 17, 2024
cgwalters pushed a commit to cgwalters/bootc that referenced this issue Nov 5, 2024
…2.144

build(deps): bump libc from 0.2.143 to 0.2.144
cgwalters pushed a commit to cgwalters/bootc that referenced this issue Nov 6, 2024
Bump to cap-std-ext 2.0, use rustix directly
@p5
Copy link
Contributor

p5 commented Apr 3, 2025

How would we want this to look?

I made an attempt at this issue, and implemented something that works. But I also noticed another issue which seems somewhat related (#1044), and I'm not quite sure if the implementation of one would impact another or if they are two distinct features.

❯ sudo ./target/debug/bootc status              
[sudo] password for admin: 
  Staged image: ghcr.io/rsturla/eternal-linux/lumina:42-nvidia-open
        Digest: sha256:e53063e967e52c07d7fffd1714fb3d5ff3f97675608ca007419ba1a68d2ba35f
       Version: 250403 (2025-04-03T01:44:51Z)

● Booted image: ghcr.io/rsturla/eternal-linux/lumina:42-nvidia-open
        Digest: sha256:438654e56f50129441905df1fa72f026478aff6e3850d77ec8c8dda3e5f91ebe
       Version: 250401 (2025-04-01T21:48:54Z)
      Unlocked: development

  Rollback image: ghcr.io/rsturla/eternal-linux/lumina:stable-nvidia-open
          Digest: sha256:79403bb8be5515a7937710310a68020724c25488ba687269832189e6375da227
         Version: 250329 (2025-03-29T01:44:28Z)

For the above, I'm using the value returned from Deployment.unlocked()

@cgwalters cgwalters added triaged This looks like a valid issue enhancement New feature or request and removed bug Something isn't working labels Apr 8, 2025
@cgwalters
Copy link
Collaborator

Something like this?

diff --git i/lib/src/spec.rs w/lib/src/spec.rs
index fb784570..975fd11d 100644
--- i/lib/src/spec.rs
+++ w/lib/src/spec.rs
@@ -53,6 +53,15 @@ pub enum Store {
     OstreeContainer,
 }
 
+#[derive(
+    clap::ValueEnum, Serialize, Deserialize, Copy, Clone, Debug, PartialEq, Eq, JsonSchema,
+)]
+#[serde(rename_all = "camelCase")]
+pub enum FilesystemOverlay {
+    Readonly,
+    ReadWrite,
+}
+
 #[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq, JsonSchema)]
 #[serde(rename_all = "camelCase")]
 /// The host specification
@@ -62,6 +71,9 @@ pub struct HostSpec {
     /// If set, and there is a rollback deployment, it will be set for the next boot.
     #[serde(default)]
     pub boot_order: BootOrder,
+    /// Matches the `ostree admin unlock` state
+    #[serde(default)]
+    usr_overlay: Option<FilesystemOverlay>,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
@@ -157,6 +169,8 @@ pub struct HostStatus {
     /// Set to true if the rollback entry is queued for the next boot.
     #[serde(default)]
     pub rollback_queued: bool,
+    #[serde(default)]
+    pub usr_overlay: Option<FilesystemOverlay>,
 
     /// The detected type of system
     #[serde(rename = "type")]

?

@cgwalters
Copy link
Collaborator

I made an attempt at this issue, and implemented something that works.

BTW feel free to drop even raw "git diff" style output in issues or on the chat channel to ask for early feedback too

p5 added a commit to rsturla/bootc that referenced this issue Apr 8, 2025
Closes bootc-dev#474

Displays the status of the usroverlay within bootc status.

Although not ideal, handles the displaying of the host's
filesystem within the image/ostree functions since otherwise
it may require the introduction of another "host" block within
the status output (i.e. having a "host", "staged", "booted"
and "rollback").

Signed-off-by: Robert Sturla <[email protected]>
@p5 p5 linked a pull request Apr 8, 2025 that will close this issue
p5 added a commit to rsturla/bootc that referenced this issue Apr 26, 2025
Closes bootc-dev#474

Displays the status of the usroverlay within bootc status.

Although not ideal, handles the displaying of the host's
filesystem within the image/ostree functions since otherwise
it may require the introduction of another "host" block within
the status output (i.e. having a "host", "staged", "booted"
and "rollback").

Signed-off-by: Robert Sturla <[email protected]>
p5 added a commit to rsturla/bootc that referenced this issue Apr 26, 2025
Closes bootc-dev#474

Displays the status of the usroverlay within bootc status.

Although not ideal, handles the displaying of the host's
filesystem within the image/ostree functions since otherwise
it may require the introduction of another "host" block within
the status output (i.e. having a "host", "staged", "booted"
and "rollback").

Signed-off-by: Robert Sturla <[email protected]>
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 enhancement New feature or request triaged This looks like a valid issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants