canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
52 stars 72 forks source link

Bug: Review usage of the reboot marker file #3199

Open dheyay opened 1 month ago

dheyay commented 1 month ago

Description of the bug

debian/ubuntu-pro-client.postinst defines mark_reboot_cmds_as_needed as well as REBOOT_CMD_MARKER_FILE. These might be tech debt from the package rename from commit 4ad6b5e and could be removed, unless there’s a good reason for these to remain?

Expected behavior

Make use of the marker file more clear if needed or replace with a better way to handle fips package updates on reboot

Current behavior

The marker file is currently only created in the debian/ubuntu-advantage-tools.postinst. Should the marker file instead be moved to check for FIPS only handling? Currently in reboot_cmds.py the use of the marker file is used for fips package updates.

To Reproduce

n/a

System information:

n/a

Additional context

n/a

orndorffgrant commented 1 month ago

The current reboot cmds does two things:

  1. if fips holds are detected on package upgrade - unhold them on next boot
    • question: do fips cloud images still hold fips packages?
    • if they do, it may make more sense as a timer job rather than an on-boot service
  2. on upgrade from trusty to xenial, run process_contract_deltas on next boot - related to livepatch
    • this might not be needed at all anymore (needs testing - ensure livepatch is in sensible state after a do-release-upgrade and reboot)

Also, we should use specific marker file names for specific situations rather the generic "reboot-cmds-needed"