launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #33142
[Merge] ~clinton-fung/launchpad-buildd:restart-apparmor-after-upgrades into launchpad-buildd:master
Clinton Fung has proposed merging ~clinton-fung/launchpad-buildd:restart-apparmor-after-upgrades into launchpad-buildd:master.
Commit message:
Add a restart of host apparmor after guest upgrades to reload profiles.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~clinton-fung/launchpad-buildd/+git/launchpad-buildd/+merge/494587
Add a restart of host apparmor after guest upgrades to reload profiles.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~clinton-fung/launchpad-buildd:restart-apparmor-after-upgrades into launchpad-buildd:master.
diff --git a/lpbuildd/target/run_ci.py b/lpbuildd/target/run_ci.py
index 54aca19..fde95b7 100644
--- a/lpbuildd/target/run_ci.py
+++ b/lpbuildd/target/run_ci.py
@@ -1,6 +1,7 @@
# Copyright 2022 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
+import subprocess
import logging
import os
@@ -65,6 +66,16 @@ class RunCIPrepare(
self.backend.run(["apt-get", "-y", "install"] + deps)
if self.backend.supports_snapd:
self.snap_store_set_proxy()
+ result = subprocess.run(
+ ["sudo", "service", "apparmor", "restart"],
+ capture_output=True,
+ text=True,
+ check=False
+ )
+ print("Command output:")
+ print(result.stdout)
+ print("Command errors (if any):")
+ print(result.stderr)
for snap_name, channel in sorted(self.args.channels.items()):
if snap_name not in ("lxd", "lpci"):
self.backend.run(
Follow ups