Merge lp:~adam-collard/ols-jenkaas/lxd-fixes into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Adam Collard
Status: Merged
Approved by: Adam Collard
Approved revision: 601
Merged at revision: 598
Proposed branch: lp:~adam-collard/ols-jenkaas/lxd-fixes
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 32 lines (+6/-5)
1 file modified
setup/seeded-slave (+6/-5)
To merge this branch: bzr merge lp:~adam-collard/ols-jenkaas/lxd-fixes
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+352905@code.launchpad.net

Commit message

Blood sweat and tears went into finding these small bugs. Clean up idempotency of setup-seeded-slave

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup/seeded-slave'
2--- setup/seeded-slave 2018-06-13 10:34:11 +0000
3+++ setup/seeded-slave 2018-08-10 18:16:26 +0000
4@@ -49,22 +49,23 @@
5 sudo apt-get install ${APT_OPTS} zfsutils-linux
6 POOL=lxd
7 POOL_SIZE=50
8- sudo systemctl stop lxd
9+ sudo systemctl stop lxd lxd.socket
10 sudo zpool destroy -f $POOL || true
11 LXD_INIT_OPTS="--storage-backend zfs --storage-create-loop $POOL_SIZE --storage-pool $POOL"
12- sudo rm -f /var/lib/lxd/lxd.db
13+ sudo rm -rf /var/lib/lxd/
14+ sudo systemctl start lxd
15 fi
16
17 sudo lxd init --auto $LXD_INIT_OPTS
18
19 # Cleanup from 2.0 release
20-rm -f /etc/default/lxd-bridge
21+[ -f /etc/default/lxd-bridge ] && sudo rm /etc/default/lxd-bridge
22
23 # Create the bridge
24-lxc network create lxdbr0 --force-local
25+lxc network create lxdbr0 --force-local || true
26
27 # Attach the default interface to the bridge
28-lxc network attach-profile lxdbr0 default eth0 --force-local
29+lxc network attach-profile lxdbr0 default eth0 --force-local || true
30
31 # Ensure lxd mounts can be used
32 UID=$(id -u)

Subscribers

People subscribed via source and target branches