Merge lp:~thomir-deactivatedaccount/adt-cloud-worker/uci-nova-testbed-fixes into lp:~canonical-ci-engineering/adt-cloud-worker/uci-nova

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 9
Merged at revision: 7
Proposed branch: lp:~thomir-deactivatedaccount/adt-cloud-worker/uci-nova-testbed-fixes
Merge into: lp:~canonical-ci-engineering/adt-cloud-worker/uci-nova
Diff against target: 44 lines (+19/-0)
1 file modified
uci-nova (+19/-0)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/adt-cloud-worker/uci-nova-testbed-fixes
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Joe Talbott (community) Approve
Review via email: mp+256369@code.launchpad.net

This proposal supersedes a proposal from 2015-04-15.

Commit message

Include fixes from pitti's vm-setup script. Should improve pass rate.

Description of the change

Include fixes from pitti's vm-setup script. Should improve pass rate.

To post a comment you must log in.
8. By Thomi Richards

Fix typo.

Revision history for this message
Joe Talbott (joetalbott) wrote :

This looks okay to me.

review: Approve
9. By Thomi Richards

Always reboot.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'uci-nova'
--- uci-nova 2015-04-05 03:56:32 +0000
+++ uci-nova 2015-04-15 18:53:11 +0000
@@ -193,6 +193,11 @@
193 193
194 # generate cloud-init user data; mostly for manage_etc_hosts, but also get194 # generate cloud-init user data; mostly for manage_etc_hosts, but also get
195 # rid of some unnecessary stuff in the VM195 # rid of some unnecessary stuff in the VM
196 #
197 # NOTE: The "#cloud-config" at the top of this file tells cloud-init that this is
198 # a config file, as opposed to a shell script (which must start with "#!"). Don't
199 # Do what I did and think "commented out code! DELETE!" and then wonder why nothing
200 # works. - Thomi
196 local userdata=`mktemp`201 local userdata=`mktemp`
197 cat <<EOF > $userdata202 cat <<EOF > $userdata
198#cloud-config203#cloud-config
@@ -203,8 +208,20 @@
203 ssh_enabled: True208 ssh_enabled: True
204209
205runcmd:210runcmd:
211 # Make apt faster:
206 - echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/90nolanguages212 - echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/90nolanguages
207 - echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/autopkgtest213 - echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/autopkgtest
214 # provides kmods like scsi_debug or mac80211_hwsim
215 - apt-get install -y linux-generic
216 # some tests use a lot of /dev/random, avoid hangs
217 - apt-get install -y haveged
218 # We need python to run the auxverb helper - install it iff it's missing:
219 - if ! sh -c 'type python3 >/dev/null 2>&1 || type python >/dev/null 2>&1'; then apt-get install -y --no-install-recommends python3-minimal; fi
220 # Remove some packages we don't need
221 - for p in accountsservice apt-xapian-index cryptsetup landscape-client landscape-common open-vm-tools w3m vim-runtime aptitude-common command-not-found-data manpages ntfs-3g sosreport ubuntu-release-upgrader-core; do apt-get --auto-remove -y purge \$p || true; done
222 - apt-get clean
223 # Do a dist-upgrade:
224 - DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
208EOF225EOF
209226
210 EXTRA_OPTS=''227 EXTRA_OPTS=''
@@ -282,6 +299,8 @@
282 cleanup299 cleanup
283 exit 1300 exit 1
284 fi301 fi
302
303 reboot
285304
286}305}
287306

Subscribers

People subscribed via source and target branches

to all changes: