Merge ~ack/maas:1941050-3.0 into maas:3.0

Proposed by Alberto Donato
Status: Merged
Approved by: Alberto Donato
Approved revision: d1b50a519612ff51952d9922998947982088946c
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ack/maas:1941050-3.0
Merge into: maas:3.0
Diff against target: 37 lines (+8/-6)
2 files modified
src/metadataserver/tests/test_vendor_data.py (+2/-1)
src/metadataserver/vendor_data.py (+6/-5)
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Review via email: mp+407671@code.launchpad.net

Commit message

LP:1941050 always install lxd from latest/stable when deploying a LXD VM host

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/metadataserver/tests/test_vendor_data.py b/src/metadataserver/tests/test_vendor_data.py
index e8fddfd..becbf22 100644
--- a/src/metadataserver/tests/test_vendor_data.py
+++ b/src/metadataserver/tests/test_vendor_data.py
@@ -396,7 +396,8 @@ class TestGenerateKVMPodConfiguration(MAASServerTestCase):
396 "runcmd",396 "runcmd",
397 [397 [
398 "apt autoremove --purge --yes lxd lxd-client lxcfs",398 "apt autoremove --purge --yes lxd lxd-client lxcfs",
399 "snap install lxd --channel=4.0",399 "snap install lxd --channel=latest",
400 "snap refresh lxd --channel=latest",
400 f'lxd init --auto --network-address=[::] --trust-password="{password}"',401 f'lxd init --auto --network-address=[::] --trust-password="{password}"',
401 ],402 ],
402 ),403 ),
diff --git a/src/metadataserver/vendor_data.py b/src/metadataserver/vendor_data.py
index dabf7e1..931e890 100644
--- a/src/metadataserver/vendor_data.py
+++ b/src/metadataserver/vendor_data.py
@@ -177,13 +177,14 @@ def generate_kvm_pod_configuration(node):
177 key=LXD_PASSWORD_METADATA_KEY,177 key=LXD_PASSWORD_METADATA_KEY,
178 defaults={"value": password},178 defaults={"value": password},
179 )179 )
180 # when installing LXD, make sure no deb packages conflict with the snap180 # When installing LXD, ensure no deb packages are installed, since they
181 # installation. If the snap is not already installed (as in bionic, install181 # would conflict with the snap. Also, ensure that the snap version is
182 # 4.0 which is enough for features required by MAAS). If it's already182 # the latest, since MAAS requires features not present in the one
183 # installed (as in focal), just keep the existing version.183 # installed by default in Focal.
184 yield "runcmd", [184 yield "runcmd", [
185 "apt autoremove --purge --yes lxd lxd-client lxcfs",185 "apt autoremove --purge --yes lxd lxd-client lxcfs",
186 "snap install lxd --channel=4.0",186 "snap install lxd --channel=latest",
187 "snap refresh lxd --channel=latest",
187 f'lxd init --auto --network-address=[::] --trust-password="{password}"',188 f'lxd init --auto --network-address=[::] --trust-password="{password}"',
188 ]189 ]
189190

Subscribers

People subscribed via source and target branches