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

hook/plugin support #85

Closed
lnussel opened this issue Jun 22, 2022 · 3 comments
Closed

hook/plugin support #85

lnussel opened this issue Jun 22, 2022 · 3 comments

Comments

@lnussel
Copy link
Member

lnussel commented Jun 22, 2022

Similar to snapper it would be helpful if transactional-update/tukit had support for plugins resp hooks. To be able to execute custom actions on open/close/set-default. My use case would be updating the bootloader config that way.

Atm I'm using a hack

+      for script in /usr/lib/snapper/plugins/[0-9]*; do
+              tukit ${TUKIT_OPTS} call "${SNAPSHOT_ID}" env TRANSACTIONAL_UPDATE_PLUGIN=1 "$script" create-snapshot / btrfs "$SNAPSHOT_ID" |& tee -a ${LOGFILE}
+      done
+      for script in /usr/lib/snapper/plugins/[0-9]*; do
+              tukit ${TUKIT_OPTS} call "${SNAPSHOT_ID}" env TRANSACTIONAL_UPDATE_PLUGIN=1 "$script" set-default / btrfs "$SNAPSHOT_ID" |& tee -a ${LOGFILE}
+      done
@lnussel
Copy link
Member Author

lnussel commented Apr 4, 2023

agreed in offline discussion to try to use the default-snapshot hook of snapper instead

@lnussel
Copy link
Member Author

lnussel commented Apr 5, 2023

transactional-update would still need to call snapper for set-default-snapshot first

laenion added a commit to laenion/transactional-update that referenced this issue Apr 13, 2023
This allows to execute snapper plugins as required in [poo#127160] and
[gh#openSUSE#85].
laenion added a commit to laenion/transactional-update that referenced this issue Apr 27, 2023
This allows to execute snapper plugins as required in [poo#127160] and
[gh#openSUSE#85].
laenion added a commit to laenion/transactional-update that referenced this issue May 2, 2023
This allows to execute snapper plugins as required in [poo#127160] and
[gh#openSUSE#85].
laenion added a commit to laenion/transactional-update that referenced this issue May 8, 2023
This change makes it possible to run on systems with different boot
managers (such as systemd-boot). These will still need some other
integration though.

[gh#openSUSE#85] / [poo#127154]
laenion pushed a commit that referenced this issue May 8, 2023
snapper has been extended and makes it possible to set the read-write
state and the default snapshot via the modify command now. Use this new
functionality to correctly trigger the snapper hooks as required for
[poo#127160] / [gh##85] /
[gh##105].
laenion added a commit that referenced this issue May 8, 2023
This change makes it possible to run on systems with different boot
managers (such as systemd-boot). These will still need some other
integration though.

[gh##85] / [poo#127154]
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue May 10, 2023
https://build.opensuse.org/request/show/1085717
by user fos + dimstar_suse
- Version 4.2.1
  - Implement "apply" command to switch into new snapshot directly
    [jsc#PED-3912]
  - Use new snapper functionality to set default snapshot - this
    makes it possible to execute hooks as requested in
    [poo#127160], [gh#openSUSE/transactional-update#85] and
    [gh#openSUSE/transactional-update#105].
  - Don't hardcode GRUB2 [gh#openSUSE/transactional-update#100] /
    [poo#127154]
  - Fix cleanup handler
  - Fix unmounting temporary mounts
  - Prevent loosing track of snapshots in certain rollback
    scenarios - these would not be marked for deletion otherwise
  - Document "notify" reboot method
- Minimal required snapper version is 0.8.10 now, for the new
  snapper functionality there is a backwards compatibility layer.
- Conflict with health-checker < 1.8 - the "
@lnussel
Copy link
Member Author

lnussel commented Oct 26, 2023

fixed via snapper hooks meanwhile

@lnussel lnussel closed this as completed Oct 26, 2023
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