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
diff --git a/src/charm.py b/src/charm.py
index c5f5c59..ad011d1 100755
--- a/src/charm.py
+++ b/src/charm.py
@@ -282,6 +282,8 @@ class LandscapeServerCharm(CharmBase):
282 landscape_ppa = self.model.config["landscape_ppa"]282 landscape_ppa = self.model.config["landscape_ppa"]
283283
284 try:284 try:
285 # This package is responsible for the hanging installs and ignores env vars
286 apt.remove_package(["needrestart"])
285 # Add the Landscape Server PPA and install via apt.287 # Add the Landscape Server PPA and install via apt.
286 check_call(["add-apt-repository", "-y", landscape_ppa])288 check_call(["add-apt-repository", "-y", landscape_ppa])
287 apt.add_package(["landscape-server", "landscape-hashids"])289 apt.add_package(["landscape-server", "landscape-hashids"])

Subscribers

People subscribed via source and target branches

to all changes: