← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~clinton-fung/launchpad-buildd:restart-apparmor-after-upgrades into launchpad-buildd:master

 


Diff comments:

> 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
> @@ -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"],

Instead of doing this every time, is there some state that we can check to determine whether this is necessary or not and only then do the 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(


-- 
https://code.launchpad.net/~clinton-fung/launchpad-buildd/+git/launchpad-buildd/+merge/494587
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.



References