-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add user defined labels to snapshot info #2175
Add user defined labels to snapshot info #2175
Conversation
75d1e86
to
d8b2a8f
Compare
d8b2a8f
to
fd434a9
Compare
After install: # Autogenerated file by elemental client, do not edit
date: "2024-09-09T08:43:38Z"
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
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
active: true
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install After upgrade: # Autogenerated file by elemental client, do not edit
date: "2024-09-09T08:45:57Z"
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
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install
2:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:248b22b3dc24b730d1487df31c32fb527c40a95c74ea69c2d233d877a4e81d67
active: true
date: "2024-09-09T08:45:57Z"
fromAction: upgrade After upgrade+recovery: # Autogenerated file by elemental client, do not edit
date: "2024-09-09T08:50:48Z"
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
date: "2024-09-09T08:50:48Z"
fromAction: upgrade
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install
2:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:248b22b3dc24b730d1487df31c32fb527c40a95c74ea69c2d233d877a4e81d67
date: "2024-09-09T08:45:57Z"
fromAction: upgrade
3:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:248b22b3dc24b730d1487df31c32fb527c40a95c74ea69c2d233d877a4e81d67
active: true
date: "2024-09-09T08:50:48Z"
fromAction: upgrade After upgrade recovery only: # Autogenerated file by elemental client, do not edit
date: "2024-09-09T08:54:49Z"
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
labels:
myLabel: foobar
date: "2024-09-09T08:54:49Z"
fromAction: upgrade-recovery
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T08:43:38Z"
fromAction: install
2:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:248b22b3dc24b730d1487df31c32fb527c40a95c74ea69c2d233d877a4e81d67
date: "2024-09-09T08:45:57Z"
fromAction: upgrade
3:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:248b22b3dc24b730d1487df31c32fb527c40a95c74ea69c2d233d877a4e81d67
active: true
date: "2024-09-09T08:50:48Z"
fromAction: upgrade After reset (from recovery partition): # Autogenerated file by elemental client, do not edit
date: "2024-09-09T08:56:44Z"
snapshotter:
type: btrfs
max-snaps: 4
config: {}
oem:
label: COS_OEM
persistent:
label: COS_PERSISTENT
recovery:
label: COS_RECOVERY
recovery:
source: dir:///run/rootfsbase
fs: squashfs
labels:
myLabel: foobar
date: "2024-09-09T08:54:49Z"
fromAction: upgrade-recovery
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
active: true
labels:
myLabel: foobar
myOtherLabel: barfoo
date: "2024-09-09T08:56:44Z"
fromAction: reset |
455bc4d
to
883c8d6
Compare
FYI the documentation regarding labels is missing, since the end-user is not going to be able to conveniently use them. |
3e202aa
to
c80daa8
Compare
Noticed a bit late the environment variables were always empty, that needed a custom decoder, it's better now:
# Autogenerated file by elemental client, do not edit
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
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T12:31:50Z"
fromAction: install
state:
label: COS_STATE
snapshots:
1:
source: dir:///run/rootfsbase
labels:
myLabel: foo
myOtherLabel: bar
date: "2024-09-09T12:31:50Z"
fromAction: install
2:
source: oci://192.168.122.10:30000/elemental-os:dev-next
digest: sha256:11cb5c6f7b6b9e4daff67ec3ec7fa4a028c24445f2e4834a78e93c75d73eb5c3
active: true
labels:
myLabel: bar
myOtherLabel: foo
date: "2024-09-09T12:33:25Z"
fromAction: upgrade |
c80daa8
to
7c18ecb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit, looks good!
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>
Co-authored-by: Fredrik Lönnegren <fredrik.lonnegren@gmail.com> Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
3b1700a
to
802c7a0
Compare
Part of #2172