Merge ~smoser/cloud-init:fix/lxd-only-create-network-if-noexist into cloud-init:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Chad Smith | ||||
Approved revision: | 01ce34e069827aa4cd0bac732acab119df90a901 | ||||
Merge reported by: | Chad Smith | ||||
Merged at revision: | 4ce6720104ec92d8d7c5aa993bf7ec405a2f53db | ||||
Proposed branch: | ~smoser/cloud-init:fix/lxd-only-create-network-if-noexist | ||||
Merge into: | cloud-init:master | ||||
Diff against target: |
277 lines (+120/-24) 2 files modified
cloudinit/config/cc_lxd.py (+56/-8) tests/unittests/test_handler/test_handler_lxd.py (+64/-16) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chad Smith | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Ryan Harper | Approve | ||
Review via email: mp+348005@code.launchpad.net |
Commit message
lxd: Delete default network and detach device if lxd-init created them.
Newer versions (3.0.1+) of lxd create the 'lxdbr0' network when
'lxd init --auto' is invoked.
When cloud-init is given a network configuration to pass on to
lxc and that config had no name specified or 'lxdbr0', then cloud-init
would fail to create the network as it already exists.
Similarly, we need to remove the device from the default profile
so that the attach code can work.
Also, add a _lxc method and use it to make sure we're getting the
--force-local flag everywhere.
LP: #1776958
Description of the change
see commit message
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
PASSED: Continuous integration, rev:c16f9104673 e1e8a1fdaa024cc 3511d5ad147c17 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 85/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 85/rebuild
https:/