Merge lp:~jtv/maas/pkg-new-tgt-link into lp:~maas-maintainers/maas/packaging

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 259
Proposed branch: lp:~jtv/maas/pkg-new-tgt-link
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 36 lines (+10/-1)
1 file modified
debian/maas-cluster-controller.postinst (+10/-1)
To merge this branch: bzr merge lp:~jtv/maas/pkg-new-tgt-link
Reviewer Review Type Date Requested Status
Graham Binns (community) Approve
Review via email: mp+213578@code.launchpad.net

Commit message

Configure tgt to re-configure MAAS iSCSI targets on reboot.

Description of the change

This is similar to what we had for the old import script, though of course the symlink now points to the new storage location.

The other difference is that the link needs to be created not only on initial installation, but on upgrade as well. A link created by older versions of the package won't do, because of the change in storage location.

Jeroen

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

[0]

Commit message needs a "previously on Breaking MAAS" section. :)

Otherwise LGTM.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

/var/lib/maas/boot-resources/current/ -> On clean installs this directory is not present right? We should make sure this also gets created.

 mkdir -p /etc/tgt/conf.d /var/lib/maas/boot-resources/current/

Revision history for this message
Raphaƫl Badin (rvb) wrote :

You probably need to add a changelog entry for this change.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Tuesday 01 Apr 2014 22:15:01 you wrote:
> You probably need to add a changelog
entry for this change.

s/probably/definitely/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/maas-cluster-controller.postinst'
2--- debian/maas-cluster-controller.postinst 2014-03-31 02:43:20 +0000
3+++ debian/maas-cluster-controller.postinst 2014-04-01 04:21:46 +0000
4@@ -21,6 +21,14 @@
5 chmod -R 775 /var/log/maas/oops
6 }
7
8+configure_maas_tgt() {
9+ # Ensure that iSCSI targets get re-defined on reboot.
10+ # Creates a softlink in /etc/tgt/conf.d/ that points to the current
11+ # boot images' tgt configuration.
12+ mkdir -p /etc/tgt/conf.d
13+ ln -sf /var/lib/maas/boot-resources/current/maas.tgt /etc/tgt/conf.d/maas.conf
14+}
15+
16 extract_cluster_uuid(){
17 # Extract ClUSTER_UUID setting from config file $1. This will work
18 # both the cluster celery config (which is python) and the cluster
19@@ -123,8 +131,8 @@
20
21
22 if [ "$1" = "configure" ] && [ -z "$2" ]; then
23- # logging
24 create_log_dir
25+ configure_maas_tgt
26 fi
27
28 if [ "$1" = "configure" ]; then
29@@ -132,6 +140,7 @@
30 create_log_dir
31 fi
32
33+ configure_maas_tgt
34 configure_pserv_generator
35
36 # These config files may contain a private cluster UUID. Only maas

Subscribers

People subscribed via source and target branches