Merge ~silverdrake11/landscape-charm:fix_install_hang2 into landscape-charm:main

Proposed by Kevin Nasto
Status: Merged
Merged at revision: 5acc177ebfdebad07a37c164cc83a3d4b2010cf0
Proposed branch: ~silverdrake11/landscape-charm:fix_install_hang2
Merge into: landscape-charm:main
Diff against target: 13 lines (+2/-0)
1 file modified
src/charm.py (+2/-0)
Reviewer Review Type Date Requested Status
Bas de Bruijne (community) Approve
Landscape Pending
Review via email: mp+454996@code.launchpad.net

Commit message

Fix hanging installs issue

Description of the change

I was able to recreate this by juju deploying several times and wait for the hang. Killing needrestart actually unblocks the install. I confirmed that all the necessary env vars are being passed to subprocess via the apt.v0 library, but still needrestart is ignoring them for some reason

To post a comment you must log in.
Revision history for this message
Kevin Nasto (silverdrake11) wrote :

Note that installing needrestart again after the installs will not work, because it'll scan the processes and the popup will show again

Revision history for this message
Bas de Bruijne (basdbruijne) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/charm.py b/src/charm.py
2index c5f5c59..ad011d1 100755
3--- a/src/charm.py
4+++ b/src/charm.py
5@@ -282,6 +282,8 @@ class LandscapeServerCharm(CharmBase):
6 landscape_ppa = self.model.config["landscape_ppa"]
7
8 try:
9+ # This package is responsible for the hanging installs and ignores env vars
10+ apt.remove_package(["needrestart"])
11 # Add the Landscape Server PPA and install via apt.
12 check_call(["add-apt-repository", "-y", landscape_ppa])
13 apt.add_package(["landscape-server", "landscape-hashids"])

Subscribers

People subscribed via source and target branches

to all changes: