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

Feature/notify method #93

Merged
merged 4 commits into from
Oct 26, 2022
Merged

Conversation

89luca89
Copy link
Contributor

@89luca89 89luca89 commented Oct 22, 2022

Hi all,

As discussed in the mailing list here: https://lists.opensuse.org/archives/list/[email protected]/thread/E6ZYOXFKRM5BODY25PEWZRBCMEFYS66W/

This pull request aims to add a notify method (reboot_via_notify) so that on MicroOS Desktop setups we can let the user know that the t-u timer applied updates successfully.
This should be a more suitable way to apply updates automatically on desktop setups where 3:30am reboots are not advisable.

This PR also adds Persistent=true to the systemd-timer, in order to ensure that updates are performed if the machine is in sleep/shutdown during the timer window.

This PR goes in hand with this other tool: https://github.com/89luca89/transactional-update-notifier
Which is the client/server app that is called by the reboot_via_notify method, in order to sent notifications to all logged user graphically.

To summarize this PR implements:

  • a new reboot_via_notify method in the t-u script
  • the correspondent reboot method to Reboot.cpp
  • persistence to the systemd-timer

Also the notifier tool supports reporting faliures, we can evaluate if using this feature or not in the t-u script

Signed-off-by: Luca Di Maio [email protected]

Copy link
Member

@sysrich sysrich left a comment

Choose a reason for hiding this comment

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

Yes yes a thousand times yes :)

@89luca89
Copy link
Contributor Author

Yes yes a thousand times yes :)

Thanks :)

This will require on MicroOS Desktop a specific settings for the reboot method (set to notify)
Probably could be provided as a separate package required by the desktop patterns? Not sure how we can provide this I'm not a packaging expert 😂

@laenion
Copy link
Collaborator

laenion commented Oct 23, 2022

Sorry for the delay, I'm currently on vacation. Will have a look at it on Tuesday when I'm back, but I can say already that I like the general idea a lot!

@laenion laenion merged commit 4bcaef3 into openSUSE:master Oct 26, 2022
@laenion
Copy link
Collaborator

laenion commented Oct 26, 2022

Released transactional-update 4.1.0 with this PR included and submitted to Factory: https://build.opensuse.org/request/show/1031369

Thanks a lot for your work, I'm really looking forward to use it!

@89luca89
Copy link
Contributor Author

Released transactional-update 4.1.0 with this PR included and submitted to Factory: https://build.opensuse.org/request/show/1031369

Thanks a lot for your work, I'm really looking forward to use it!

Thanks a lot for merging!

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Oct 27, 2022
https://build.opensuse.org/request/show/1031369
by user fos + dimstar_suse
- Version 4.1.0
  - t-u: Add a "setup-kdump" command; implements [jsc#PED-1441]
  - Export TRANSACTIONAL_UPDATE_ROOT (the path to the snapshot) in the update environment; implements [jsc#PED-1078]
  - Add support for "notify" reboot method for desktop use [gh#openSUSE/transactional-update#93]
  - Fix kdump initrd recreation detection; the check was performed in the active snapshot instead of the target snapshot
  - Document register command [bsc#1202900]
  - Avoid unnecessary snapshots for register command [bsc#1202901]
  - Various optimizations for register command
  - Remove bogus error message when triggering reboot
  - Rework /etc overlay documentation in "The Transactional Update Guide"
  - Fix incorrect manpage formatting
  - Remove leftover "salt" reboot method in configuration examp
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

Successfully merging this pull request may close these issues.

3 participants