Canonical Livepatch: Request for installation and auto-connection of a system-files plug

Hello,

The canonical-livepatch snap has added a new system-files plug etc-kernel-postinst-d. Please review and allow the use and auto-connection of this plug.

The purpose of this plug is to allow write access to the file /etc/kernel/postinst.d/y-livepatch-reboot-required. The system-files plug will allow write access in the following format: ``` etc-kernel-postinst-d: interface: system-files write: - /etc/kernel/postinst.d/y-livepatch-reboot-required ```

This is required to allow the canonical-livepatch snap to insert a hook in the /etc/kernel/postinst.d directory. This hook will run after every kernel package install, in order to influence automated reboots and system restart notifications when canonical-livepatch provides security coverage for vulnerabilities in the running kernel.

Inserting this script from the canonical-livepatch snap would allow the unattended-upgrades and update-notifier scripts in the kernel post-install directory to remove their Livepatch dependent code that violated separation of concerns. This would solve a long-standing bug while not compromising on the intended feature.


name: canonical-livepatch
description: Canonical Livepatch patches high and critical linux kernel vulnerabilities removing the immediate need to reboot to upgrade the kernel, instead allowing the downtime to be scheduled. It is a part of the Ubuntu Pro offering.

The Canonical Livepatch Client is an application that runs on your machine and periodically checks for patches.

See our docs at https://ubuntu.com/security/livepatch/docs/livepatch

snapcraft: PRIVATE
upstream: PRIVATE
upstream-relation: Canonical owned and managed snap. I am an engineer working on this project

plugs:
  etc-kernel-postinst-d:
    interface: system-files
    attributes:
      write: 
        - /etc/kernel/postinst.d/y-livepatch-reboot-required
    request-type: installation and auto-connection
    reasoning: Insert a script that runs after every kernel package install that   influences automatic reboots and system restart notifications. (See above for more details and context.

This request has been added to the queue for review by the @reviewers team.

Hello @prinsonf7,

Given the described needs for the application as well as the clear ownership of the given file, this is a +1 from me for granting auto-connection for the described system-files plug to the canonical-livepatch snap. What do other reviewers think?

1 Like

Hello @prinsonf7 :slight_smile:

As /etc/kernel/postinst.d/y-livepatch-reboot-required is clearley owned by the snap, this is a +1 from my side also, for auto-connecting etc-kernel-postinst-d to the canonical-livepatch snap.

1 Like

Hello all,

+2 votes for, 0 votes against, granting auto-connect of interface system-files as listed to snap canonical-livepatch. The publisher is vetted, this is now live.

Please let me know if you have any issues uploading a revision with the new system-files plug.

1 Like

Thank you very much @elisehdy and @yomonokio!

1 Like