Merge lp:~rvb/maas/bug-1021382 into lp:~maas-committers/maas/trunk

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: no longer in the source branch.
Merged at revision: 718
Proposed branch: lp:~rvb/maas/bug-1021382
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 39 lines (+11/-1)
2 files modified
src/maas/development.py (+10/-0)
src/maas/settings.py (+1/-1)
To merge this branch: bzr merge lp:~rvb/maas/bug-1021382
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+113723@code.launchpad.net

Commit message

Use absolute path in COMMISSIONING_SCRIPT.

Description of the change

This branch fixes the setting COMMISSIONING_SCRIPT which, in the production settings (src/maas/settings.py), should use an absolute path.

Similar to https://code.launchpad.net/~rvb/maas/maas-1.0-bug-1021382/+merge/113717, with an added import.

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maas/development.py'
2--- src/maas/development.py 2012-06-21 20:49:18 +0000
3+++ src/maas/development.py 2012-07-06 10:25:26 +0000
4@@ -12,6 +12,7 @@
5 __metaclass__ = type
6
7 import logging
8+import os
9 from os.path import abspath
10
11 from maas import (
12@@ -89,5 +90,14 @@
13 abspath("contrib/preseeds_v2"),
14 )
15
16+# The root directory of the MAAS project for this dev instance.
17+DEV_ROOT_DIRECTORY = os.path.join(
18+ os.path.dirname(__file__), os.pardir, os.pardir)
19+
20+
21+COMMISSIONING_SCRIPT = os.path.join(
22+ DEV_ROOT_DIRECTORY, 'etc/maas/commissioning-user-data')
23+
24+
25 # Allow the user to override settings in maas_local_settings.
26 import_local_settings()
27
28=== modified file 'src/maas/settings.py'
29--- src/maas/settings.py 2012-06-28 12:05:09 +0000
30+++ src/maas/settings.py 2012-07-06 10:25:26 +0000
31@@ -288,7 +288,7 @@
32 # The location of the commissioning script that is executed on nodes as
33 # part of commissioning. Only override this if you know what you are
34 # doing.
35-COMMISSIONING_SCRIPT = 'etc/maas/commissioning-user-data'
36+COMMISSIONING_SCRIPT = '/etc/maas/commissioning-user-data'
37
38 # The duration, in minutes, after which we consider a commissioning node
39 # to have failed and mark it as FAILED_TESTS.