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

Systemd Offline Upgrade Support #34

Merged
merged 53 commits into from
Oct 17, 2019
Merged

Systemd Offline Upgrade Support #34

merged 53 commits into from
Oct 17, 2019

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Sep 9, 2019

No description provided.

@mmstick
Copy link
Member Author

mmstick commented Sep 10, 2019

As soon as the most recent commit builds, this is ready for testing of both the CLI and GTK frontend.

@mmstick mmstick force-pushed the upgrade branch 12 times, most recently from e1bf5e1 to c979bb2 Compare September 11, 2019 21:06
@mmstick
Copy link
Member Author

mmstick commented Sep 11, 2019

  • Desktop notifications are now working.
  • LTS may dismiss the notifications in the info overview.

@mmstick mmstick force-pushed the upgrade branch 3 times, most recently from d8a754b to ba7576a Compare September 11, 2019 22:52
@mmstick
Copy link
Member Author

mmstick commented Sep 12, 2019

Ideally we should also merge pop-os/desktop#37 to increase the success rate of an upgrade with this, to guarantee that pop-desktop isn't autoremoved during or after an upgrade.

@mmstick mmstick force-pushed the upgrade branch 4 times, most recently from 90a6787 to b8d056c Compare October 14, 2019 16:04
Some debian packages are in the process of becoming transitional
packages for snaps. This causes offline upgrades to fail when a
transitonal debian package tries to use snapd to fetch and install a
snap version of the package on upgrade.

To solve this problem, we will be marking packages which have a
pre-depends on snapd as held packages. This will prevent these packages
from being upgraded during the offline upgrade.
It runs as a silent background service, which we should kill to prevent it from trying take control over
dpkg, and to display notifications.
Setting KillMode=none on the init service will prevent systemd from SIGTERM'ing the upgrade script.

Some extra dependencies and orderings were also defined for the services.
@mmstick mmstick force-pushed the upgrade branch 3 times, most recently from a4e1be8 to c20a0ee Compare October 15, 2019 20:10
The acpid service is masked during the upgrade so that the package can
successfully upgrade.

The /pop-upgrade files are now removed from the start, to prevent apt
sources from being reverted.

The sync command is used at the end to wait for any outputs to be flushed.
@leviport
Copy link
Member

It looks like pop-upgrades from 19.04 to 19.10 do not work unless the system is first fully updated with sudo apt update && sudo apt upgrade. Attached are console output and journalctl logs for a pop-upgrade release upgrade systemd -f performed on a fresh 19.04 install that didn't have software updates applied first.

darp5-1904-to-1910-journalctl.txt
darp5-1904-to-1910-terminal.txt

@mmstick
Copy link
Member Author

mmstick commented Oct 15, 2019

failed to rename "/var/cache/apt/archives/partial/linux-headers-5.0.0-31_5.0.0-31.33_all.deb" to "/var/cache/apt/archives/linux-headers-5.0.0-31_5.0.0-31.33_all.deb" }))

Does the source file exist?

@@ -1,8 +1,13 @@
#!/bin/sh
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

There are loads of unquoted variables here. I think this can be taken care of post-merge

_ => unreachable!(),
};

warn!("caught {} signal", signal);
Copy link
Member

Choose a reason for hiding this comment

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

You should not use global variables in signal handlers. If the logger is locked when the signal occurs, this could cause a deadlock. The atomic on the next line is okay because it has known ordering.

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.

4 participants