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

Implement state subcommand #2182

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

anmazzotti
Copy link
Contributor

Closes #2172

This simply dumps the installation state on stdout.

$ elemental state
date: "2024-09-09T12:33:25Z"
snapshotter:
    type: btrfs
    max-snaps: 4
    config: {}
efi:
    label: COS_GRUB
oem:
    label: COS_OEM
persistent:
    label: COS_PERSISTENT
recovery:
    label: COS_RECOVERY
    recovery:
        source: dir:///run/rootfsbase
        fs: squashfs
state:
    label: COS_STATE
    snapshots:
        1:
            source: dir:///run/rootfsbase
        2:
            source: oci://192.168.122.10:30000/elemental-os:dev-next
            digest: sha256:11cb5c6f7b6b9e4daff67ec3ec7fa4a028c24445f2e4834a78e93c75d73eb5c3
            active: true

@anmazzotti anmazzotti self-assigned this Sep 10, 2024
@anmazzotti anmazzotti force-pushed the implement_state_subcommand branch from e14198d to eea5af2 Compare September 12, 2024 07:57
@anmazzotti anmazzotti marked this pull request as ready for review September 12, 2024 07:57
@anmazzotti anmazzotti requested a review from a team as a code owner September 12, 2024 07:57
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
@anmazzotti anmazzotti force-pushed the implement_state_subcommand branch from f72d71d to ecfdba4 Compare September 12, 2024 12:45
Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good here!

@@ -13,7 +13,7 @@ elemental upgrade-recovery [flags]
--poweroff Shutdown the system after install
--reboot Reboot the system after install
--recovery-system.uri string Sets the recovery image source and its type (e.g. 'docker:registry.org/image:tag')
--snapshot-labels stringToString Add labels to the to the system (ex. --labels my-label=foo,my-other-label=bar) (default [])
--snapshot-labels stringToString Add labels to the to the system (ex. --snapshot-labels my-label=foo,my-other-label=bar) (default [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@anmazzotti anmazzotti merged commit fa2306d into rancher:main Sep 13, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Apply user defined labels to elemental managed snapshots (on install, upgrade, reset)
2 participants