Merge lp:~gandelman-a/orchestra/850892 into lp:orchestra

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 303
Proposed branch: lp:~gandelman-a/orchestra/850892
Merge into: lp:orchestra
Diff against target: 90 lines (+33/-9)
2 files modified
debian/changelog (+5/-0)
provisioning-server/usr/sbin/orchestra-import-isos (+28/-9)
To merge this branch: bzr merge lp:~gandelman-a/orchestra/850892
Reviewer Review Type Date Requested Status
Andres Rodriguez Approve
Review via email: mp+83701@code.launchpad.net

Description of the change

This should merge better.

Sets default behavior to import_isos if no option has been specified.

Also, during import will check for an updated mini.iso and re-import distro if necessary, while preserving any systems and profiles that may be descendants of the original distro.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-11-28 19:24:42 +0000
3+++ debian/changelog 2011-11-28 22:19:26 +0000
4@@ -5,6 +5,11 @@
5 /etc/avahi/services/orchestra_provisioning_server.service
6 Advertise the orchestra provisioning service via avahi (LP: #893189)
7
8+ [ Adam Gandelman ]
9+ * orchestra-import-isos: import ISOs by default if no option specified
10+ Check for updates for existing ISOs, download + update distro if necessary.
11+ (LP: #850892)
12+
13 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 28 Nov 2011 14:23:39 -0500
14
15 orchestra (2.24-0ubuntu1) precise; urgency=low
16
17=== modified file 'provisioning-server/usr/sbin/orchestra-import-isos'
18--- provisioning-server/usr/sbin/orchestra-import-isos 2011-11-22 20:22:27 +0000
19+++ provisioning-server/usr/sbin/orchestra-import-isos 2011-11-28 22:19:26 +0000
20@@ -70,8 +70,11 @@
21 cobbler-ubuntu-import $r-$a
22 cobbler profile edit --name="$r-$a" --kopts="$KOPTS" --kickstart="$KSDIR/orchestra.preseed"
23 else
24+ # check archive for an updated ISO, update our cache if necessary
25+ cobbler-ubuntu-import -c $r-$a && cobbler-ubuntu-import -u $r-$a
26 # Make sure the profile is using the orchestra preseed
27 cobbler profile edit --name="$r-$a" --kickstart="$KSDIR/orchestra.preseed"
28+
29 fi
30 # Skip if cobbler already has this distro/arch profile
31 if ! (cobbler profile list | grep -qs " $r-$a-juju$"); then
32@@ -97,13 +100,18 @@
33
34 options:
35 -i | --import-isos Import the Ubuntu ISOs and update default
36- settings used for Orchestra.
37- -u | --update-settings Updates all profiles based based on new settings
38+ settings used for Orchestra. (default)
39+ -u | --update-settings Updates all profiles based on new settings
40 in /etc/orchestra/import_isos.
41- the --import process downloads and imports a list of Ubuntu releases, adding
42- the default Orchestra settings for each of the profiles. If the ISOs have
43- already been imported, update-settings will update all the profiles within
44- cobbler based on the modifications of /etc/orchestra/import_isos.
45+
46+ The --import process downloads and imports a list of Ubuntu releases,
47+ adding the default Orchestra settings for each of the profiles. If a
48+ release has already been imported but is out of date, the updated ISO
49+ will be downloaded again and reimported.
50+
51+ If the ISOs have already been imported, update-settings will update all
52+ the profiles within cobbler based on the modifications of
53+ /etc/orchestra/import_isos.
54
55 Example:
56 - ${0##*/} -i
57@@ -119,19 +127,30 @@
58 eval set -- "${getopt_out}" ||
59 bad_Usage
60
61+do_import_isos=false
62+do_update_settings=false
63+
64 while [ $# -ne 0 ]; do
65 cur=${1};
66 case "$cur" in
67 -h|--help) Usage ; exit 0;;
68- -i|--import-isos) import_isos;;
69- -u|--update-settings) update_settings;;
70+ -i|--import-isos) do_import_isos=true;;
71+ -u|--update-settings) do_update_settings=true;;
72 --) shift; break;;
73 esac
74 shift;
75 done
76
77 ## check arguments here
78-[ $# -ne 0 ] || bad_Usage
79+[ $# -ne 0 ] && bad_Usage
80+
81+# if no action specified, import by default
82+( ! $do_import_isos && ! $do_update_settings ) && do_import_isos=true
83+# do not allow import + update
84+( $do_import_isos && $do_update_settings ) && bad_Usage
85+
86+$do_import_isos && import_isos
87+$do_update_settings && update_settings
88
89 # Add management classes if new have being defined.
90 add_mgmt_classes

Subscribers

People subscribed via source and target branches