launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07059
[Merge] lp:~smoser/maas/vdenv.mini-fixes into lp:maas
Scott Moser has proposed merging lp:~smoser/maas/vdenv.mini-fixes into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~smoser/maas/vdenv.mini-fixes/+merge/101464
minor vdenv changes
vdenv/TODO: add the maas port to the forwarded ports in ssh command suggestion
vdenv/api-list.py: set the right password by default, so 'api-list.py' works
vdenv/zimmer-build/buidl: fix --help from failing
vdenv/zimmer-build/ud-build.txt
* do not preseed cobbler/server_nad_next_server
instead, we update it on cobbler start. The real reason for this is that
the iscsi code in the initramfs does not have dns in it, so it needs IP address
for cobbler 'server'
* modify cobbler's initjob to update its' ip address on every start.
* remove ubuntu-orchestra-logging-server, as should be provided by maas now
--
https://code.launchpad.net/~smoser/maas/vdenv.mini-fixes/+merge/101464
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~smoser/maas/vdenv.mini-fixes into lp:maas.
=== modified file 'vdenv/TODO'
--- vdenv/TODO 2012-03-15 22:55:06 +0000
+++ vdenv/TODO 2012-04-11 00:10:24 +0000
@@ -7,7 +7,7 @@
- start ssh connection to remote system with a bunch of ports
forwarded for vnc connections and http to the zimmer box
ssh -C home-jimbo \
- $(t=98; for((i=0;i<5;i++)); do p=$(printf "%02d" "$i"); echo -L $t$p:localhost:59$p; done ; echo -L${t}80:192.168.123.2:80)
+ $(t=98; for((i=0;i<5;i++)); do p=$(printf "%02d" "$i"); echo -L $t$p:localhost:59$p; done ; echo -L${t}80:192.168.123.2:80 -L${t}81:localhost:5240)
- tell orchestra to point to a different proxy server
- document or fix annoying ssh key entries (juju prompt for add and change)
- get serial consoles to log file for domains
=== modified file 'vdenv/api-list.py'
--- vdenv/api-list.py 2012-03-12 16:40:38 +0000
+++ vdenv/api-list.py 2012-04-11 00:10:24 +0000
@@ -17,7 +17,7 @@
host = "192.168.123.2"
user = "cobbler"
-password = "cobbler"
+password = "xcobbler"
if len(sys.argv) >= 2:
host = sys.argv[1]
if len(sys.argv) >= 3:
=== modified file 'vdenv/zimmer-build/build'
--- vdenv/zimmer-build/build 2012-03-13 07:52:47 +0000
+++ vdenv/zimmer-build/build 2012-04-11 00:10:24 +0000
@@ -56,7 +56,7 @@
--save D put pristine copies of things in D
default: $DEF_SAVE_D
--ud-file F use user-data file F
- default: $DEF_USER_DATA
+ default: $DEF_UD_FILE
--import-keys K import ssh keys
values are 'auto', 'lp:<id>', or path to file
EOF
=== modified file 'vdenv/zimmer-build/ud-build.txt'
--- vdenv/zimmer-build/ud-build.txt 2012-03-20 14:22:16 +0000
+++ vdenv/zimmer-build/ud-build.txt 2012-04-11 00:10:24 +0000
@@ -16,7 +16,6 @@
echo === $(date) ====
debconf-set-selections <<EOF
- cobbler cobbler/server_and_next_server string zimmer-server
cobbler cobbler/password password xcobbler
cloud-init cloud-init/datasources multiselect NoCloud
EOF
@@ -41,7 +40,6 @@
pkgs="$pkgs distro-info" # (LP: #960142)
pkgs="$pkgs libvirt-bin" # for power control via virsh
pkgs="$pkgs cobbler-web" # for debugging and ease of use of cobbler
- pkgs="$pkgs ubuntu-orchestra-logging-server" # (LP: #960149)
pkgs="$pkgs maas" # main maas package
apt_get update
apt_get install ${pkgs}
@@ -58,6 +56,48 @@
ln -sf ${fname##*/}.zimmer "$fname"
fi
+ # hack /etc/init/cobbler.conf to always update its IP address on start
+ cat >> /etc/init/cobbler.conf <<"ENDCOB"
+ #### added by zimmer-build ######
+ pre-start script
+ #set -x; exec >/tmp/cobbler-pre.out 2>/tmp/cobbler-pre.err
+ found=""
+ fn="/etc/cobbler/cobbler-server"
+
+ # if user wants to manage this, then just remove that file
+ [ -f "$fn" ] || exit 0
+
+ [ -e "$fn" ] && read found < "$fn" || :
+ [ -n "$found" -a "$found" != "auto" ] ||
+ found=$(ifconfig eth0 2>/dev/null |
+ awk '$0 ~ /inet addr:/ { sub(/.*:/,"",$2); print $2; }')
+
+ [ -z "$found" ] && exit 0
+
+ sed -i.start -e "s/^next_server: .*$/next_server: $found/" \
+ -e "s/^server: *..*..*..*$/server: $found/" \
+ /etc/cobbler/settings
+
+ cmp /etc/cobbler/settings.start /etc/cobbler/settings >/dev/null &&
+ rm -f /etc/cobbler/settings.start || :
+ end script
+
+ post-start script
+ #set -x; exec >/tmp/cobbler-start.out 2>/tmp/cobbler-start.err
+ [ -f /etc/cobbler/settings.start ] || exit 0
+ rm -f /etc/cobbler/settings.start
+ while : ; do
+ cobbler system list >/dev/null || :
+ [ $? -eq 155 ] || break
+ sleep 1
+ done
+ cobbler sync || :
+ maas-import-isos --update || :
+ end script
+ ENDCOB
+
+ echo "auto" >> /etc/cobbler/cobbler-server
+
cat >> /etc/maas/import_isos <<END
RELEASES="precise"
ARCHES="i386 amd64"
Follow ups