sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #08560
Re: [Merge] ~alexsander-souza/maas:lp2016908_enable_apparmor into maas:master
Diff comments:
> diff --git a/src/provisioningserver/kernel_opts.py b/src/provisioningserver/kernel_opts.py
> index 7ecbcf7..5730052 100644
> --- a/src/provisioningserver/kernel_opts.py
> +++ b/src/provisioningserver/kernel_opts.py
> @@ -111,13 +112,23 @@ def compose_purpose_opts(params):
> "cc:{'datasource_list': ['MAAS']}end_cc",
> # Read by cloud-init.
> "cloud-config-url=%s" % params.preseed_url,
> - # Disable apparmor in the ephemeral environment. This addresses
> - # MAAS bug LP: #1677336 due to LP: #1408106
> - "apparmor=0",
> ]
> return kernel_params
>
>
> +def compose_apparmor_opts(params):
> + JAMMY_VER = 22.04
> + if params.osystem == "ubuntu":
> + di = UbuntuDistroInfo()
> + if di.valid(params.release) and (
> + float(di.version(params.release).removesuffix(" LTS")) < JAMMY_VER
+1, I just replaced `di.valid()' with `x in codenames` to avoid calling `get_all()` twice (one here another inside `di.valid()`)
> + ):
> + # Disable apparmor in the ephemeral environment. This addresses
> + # MAAS bug LP: #1677336 due to LP: #1408106
> + return ["apparmor=0"]
> + return []
> +
> +
> def compose_arch_opts(params):
> """Return any architecture-specific options required"""
> arch_subarch = f"{params.arch}/{params.subarch}"
--
https://code.launchpad.net/~alexsander-souza/maas/+git/maas/+merge/443301
Your team MAAS Committers is subscribed to branch maas:master.