Merge lp:~andreserl/maas/maas_lp1553791 into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 4737
Proposed branch: lp:~andreserl/maas/maas_lp1553791
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 232 lines (+24/-24)
11 files modified
HACKING.txt (+3/-3)
INSTALL.txt (+1/-1)
Makefile (+3/-3)
buildout.cfg (+2/-2)
docs/development/cluster-registration.rst (+1/-1)
etc/maas/templates/dhcp/dhcpd.conf.template (+3/-3)
services/rackd/run (+2/-2)
src/provisioningserver/dhcp/tests/test_notifier.py (+2/-2)
src/provisioningserver/utils/fs.py (+4/-4)
src/provisioningserver/utils/tests/test_fs.py (+2/-2)
src/provisioningserver/utils/tests/test_script.py (+1/-1)
To merge this branch: bzr merge lp:~andreserl/maas/maas_lp1553791
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+288300@code.launchpad.net

Commit message

Change maas-provision to maas-rack

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Just mentioned this in my other review, lol. Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HACKING.txt'
--- HACKING.txt 2016-02-04 10:00:05 +0000
+++ HACKING.txt 2016-03-07 14:36:44 +0000
@@ -226,7 +226,7 @@
226you want to boot some real hardware. By default, it's set to start up on226you want to boot some real hardware. By default, it's set to start up on
227port 5244 for testing purposes. Make these changes::227port 5244 for testing purposes. Make these changes::
228228
229 * Use ``bin/maas-provision`` to change the tftp-port setting to 69229 * Use ``bin/maas-rack`` to change the tftp-port setting to 69
230 * Install the ``authbind``package:230 * Install the ``authbind``package:
231231
232 $ sudo apt-get install authbind232 $ sudo apt-get install authbind
@@ -285,9 +285,9 @@
285configuration to do. First, run this tool to generate a configuration that285configuration to do. First, run this tool to generate a configuration that
286will work with MAAS::286will work with MAAS::
287287
288 $ maas-provision generate-dhcp-config [options]288 $ maas-rack generate-dhcp-config [options]
289289
290Run ``maas-provision generate-dhcp-config -h`` to see the options. You will290Run ``maas-rack generate-dhcp-config -h`` to see the options. You will
291need to provide various IP details such as the range of IP addresses to assign291need to provide various IP details such as the range of IP addresses to assign
292to clients. You can use the generated output to configure your system's ISC292to clients. You can use the generated output to configure your system's ISC
293DHCP server, by inserting the configuration in the ``/var/lib/maas/dhcpd.conf``293DHCP server, by inserting the configuration in the ``/var/lib/maas/dhcpd.conf``
294294
=== modified file 'INSTALL.txt'
--- INSTALL.txt 2016-03-01 19:02:08 +0000
+++ INSTALL.txt 2016-03-07 14:36:44 +0000
@@ -131,7 +131,7 @@
131Once you have copied the secret, you can install it in the Cluster131Once you have copied the secret, you can install it in the Cluster
132Controller. At the command line, type::132Controller. At the command line, type::
133133
134 $ sudo maas-provision134 $ sudo maas-rack
135135
136Once installed, you will need to reconfigure the Cluster Controller136Once installed, you will need to reconfigure the Cluster Controller
137to correctly point to the API hostname or IP address of the Region137to correctly point to the API hostname or IP address of the Region
138138
=== modified file 'Makefile'
--- Makefile 2016-03-04 18:09:49 +0000
+++ Makefile 2016-03-07 14:36:44 +0000
@@ -52,7 +52,7 @@
52 bin/database \52 bin/database \
53 bin/maas \53 bin/maas \
54 bin/maas-probe-dhcp \54 bin/maas-probe-dhcp \
55 bin/maas-provision \55 bin/maas-rack \
56 bin/maas-region-admin \56 bin/maas-region-admin \
57 bin/twistd.rack \57 bin/twistd.rack \
58 bin/twistd.region \58 bin/twistd.region \
@@ -129,13 +129,13 @@
129 $(buildout) install testing-test129 $(buildout) install testing-test
130 @touch --no-create $@130 @touch --no-create $@
131131
132bin/maas-probe-dhcp bin/maas-provision bin/twistd.rack: \132bin/maas-probe-dhcp bin/maas-rack bin/twistd.rack: \
133 bin/buildout buildout.cfg versions.cfg setup.py133 bin/buildout buildout.cfg versions.cfg setup.py
134 $(buildout) install rack134 $(buildout) install rack
135 @touch --no-create $@135 @touch --no-create $@
136136
137bin/test.rack: \137bin/test.rack: \
138 bin/buildout buildout.cfg versions.cfg setup.py bin/maas-provision138 bin/buildout buildout.cfg versions.cfg setup.py bin/maas-rack
139 $(buildout) install rack-test139 $(buildout) install rack-test
140 @touch --no-create $@140 @touch --no-create $@
141141
142142
=== modified file 'buildout.cfg'
--- buildout.cfg 2016-02-04 10:34:29 +0000
+++ buildout.cfg 2016-03-07 14:36:44 +0000
@@ -190,13 +190,13 @@
190eggs =190eggs =
191entry-points =191entry-points =
192 maas-probe-dhcp=provisioningserver.dhcp.probe:main192 maas-probe-dhcp=provisioningserver.dhcp.probe:main
193 maas-provision=provisioningserver.__main__:main193 maas-rack=provisioningserver.__main__:main
194 twistd.rack=twisted.scripts.twistd:run194 twistd.rack=twisted.scripts.twistd:run
195extra-paths =195extra-paths =
196 ${common:extra-paths}196 ${common:extra-paths}
197scripts =197scripts =
198 maas-probe-dhcp198 maas-probe-dhcp
199 maas-provision199 maas-rack
200 twistd.rack200 twistd.rack
201initialization =201initialization =
202 ${common:initialization}202 ${common:initialization}
203203
=== modified file 'docs/development/cluster-registration.rst'
--- docs/development/cluster-registration.rst 2016-02-04 10:00:05 +0000
+++ docs/development/cluster-registration.rst 2016-03-07 14:36:44 +0000
@@ -23,7 +23,7 @@
2323
24The cluster obviously needs to know where the region controller is, and24The cluster obviously needs to know where the region controller is, and
25this is configured in a file ``/etc/maas/rackd.conf``. This should25this is configured in a file ``/etc/maas/rackd.conf``. This should
26only ever be modified via the ``maas-provision`` command.26only ever be modified via the ``maas-rack`` command.
2727
28.. _first-cluster:28.. _first-cluster:
2929
3030
=== modified file 'etc/maas/templates/dhcp/dhcpd.conf.template'
--- etc/maas/templates/dhcp/dhcpd.conf.template 2016-03-02 05:03:06 +0000
+++ etc/maas/templates/dhcp/dhcpd.conf.template 2016-03-07 14:36:44 +0000
@@ -89,7 +89,7 @@
89 set cllt = binary-to-ascii(10, 32, "", encode-int(lease-time, 32));89 set cllt = binary-to-ascii(10, 32, "", encode-int(lease-time, 32));
90 set clht = pick-first-value(option host-name, "(none)");90 set clht = pick-first-value(option host-name, "(none)");
91 execute(91 execute(
92 "sudo", "maas-provision", "dhcp-notify",92 "sudo", "maas-rack", "dhcp-notify",
93 "--action", "commit", "--mac", clhw,93 "--action", "commit", "--mac", clhw,
94 "--ip-family", "ipv4", "--ip", clip,94 "--ip-family", "ipv4", "--ip", clip,
95 "--lease-time", cllt, "--hostname", clht);95 "--lease-time", cllt, "--hostname", clht);
@@ -98,7 +98,7 @@
98 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));98 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
99 set clip = binary-to-ascii(10, 8, ".", leased-address);99 set clip = binary-to-ascii(10, 8, ".", leased-address);
100 execute(100 execute(
101 "sudo", "maas-provision", "dhcp-notify",101 "sudo", "maas-rack", "dhcp-notify",
102 "--action", "expiry", "--mac", clhw,102 "--action", "expiry", "--mac", clhw,
103 "--ip-family", "ipv4", "--ip", clip);103 "--ip-family", "ipv4", "--ip", clip);
104}104}
@@ -106,7 +106,7 @@
106 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));106 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
107 set clip = binary-to-ascii(10, 8, ".", leased-address);107 set clip = binary-to-ascii(10, 8, ".", leased-address);
108 execute(108 execute(
109 "sudo", "maas-provision", "dhcp-notify",109 "sudo", "maas-rack", "dhcp-notify",
110 "--action", "release", "--mac", clhw,110 "--action", "release", "--mac", clhw,
111 "--ip-family", "ipv4", "--ip", clip);111 "--ip-family", "ipv4", "--ip", clip);
112}112}
113113
=== modified file 'services/rackd/run'
--- services/rackd/run 2016-02-10 20:24:35 +0000
+++ services/rackd/run 2016-03-07 14:36:44 +0000
@@ -19,12 +19,12 @@
1919
20# Configure the rack's UUID to match sampledata, and also use a high20# Configure the rack's UUID to match sampledata, and also use a high
21# port for TFTP to match this branch's etc/services.21# port for TFTP to match this branch's etc/services.
22bin/maas-provision config \22bin/maas-rack config \
23 --uuid adfd3977-f251-4f2c-8d61-745dbd690bf2 \23 --uuid adfd3977-f251-4f2c-8d61-745dbd690bf2 \
24 --tftp-port 524424 --tftp-port 5244
2525
26# Wait for the installation of the shared-secret.26# Wait for the installation of the shared-secret.
27until bin/maas-provision check-for-shared-secret; do sleep 2; done27until bin/maas-rack check-for-shared-secret; do sleep 2; done
2828
29# Exec the Provisioning Server.29# Exec the Provisioning Server.
30script="$(readlink -f bin/twistd.rack)"30script="$(readlink -f bin/twistd.rack)"
3131
=== modified file 'src/provisioningserver/dhcp/tests/test_notifier.py'
--- src/provisioningserver/dhcp/tests/test_notifier.py 2016-02-17 20:26:00 +0000
+++ src/provisioningserver/dhcp/tests/test_notifier.py 2016-03-07 14:36:44 +0000
@@ -1,7 +1,7 @@
1# Copyright 2014-2015 Canonical Ltd. This software is licensed under the1# Copyright 2014-2015 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4"""Tests for maas-provision dhcp-notify command."""4"""Tests for maas-rack dhcp-notify command."""
55
6__all__ = []6__all__ = []
77
@@ -67,7 +67,7 @@
67 self.addCleanup(service.stopService)67 self.addCleanup(service.stopService)
6868
69 call_and_check([69 call_and_check([
70 "%s/bin/maas-provision" % root,70 "%s/bin/maas-rack" % root,
71 "dhcp-notify",71 "dhcp-notify",
72 '--action', action,72 '--action', action,
73 '--mac', mac,73 '--mac', mac,
7474
=== modified file 'src/provisioningserver/utils/fs.py'
--- src/provisioningserver/utils/fs.py 2016-02-26 00:03:29 +0000
+++ src/provisioningserver/utils/fs.py 2016-03-07 14:36:44 +0000
@@ -56,9 +56,9 @@
5656
5757
58def get_maas_provision_command():58def get_maas_provision_command():
59 """Return path to the maas-provision command.59 """Return path to the maas-rack command.
6060
61 In production mode this will just return 'maas-provision', but in61 In production mode this will just return 'maas-rack', but in
62 development mode it will return the path for the current development62 development mode it will return the path for the current development
63 environment.63 environment.
64 """64 """
@@ -66,9 +66,9 @@
66 from provisioningserver.config import is_dev_environment66 from provisioningserver.config import is_dev_environment
67 if is_dev_environment():67 if is_dev_environment():
68 from maastesting import root68 from maastesting import root
69 return os.path.join(root, "bin", "maas-provision")69 return os.path.join(root, "bin", "maas-rack")
70 else:70 else:
71 return "maas-provision"71 return "maas-rack"
7272
7373
74def _write_temp_file(content, filename):74def _write_temp_file(content, filename):
7575
=== modified file 'src/provisioningserver/utils/tests/test_fs.py'
--- src/provisioningserver/utils/tests/test_fs.py 2016-02-26 00:38:54 +0000
+++ src/provisioningserver/utils/tests/test_fs.py 2016-03-07 14:36:44 +0000
@@ -313,13 +313,13 @@
313 def test__returns_just_command_for_production(self):313 def test__returns_just_command_for_production(self):
314 self.patch(provisioningserver.config, "is_dev_environment")314 self.patch(provisioningserver.config, "is_dev_environment")
315 provisioningserver.config.is_dev_environment.return_value = False315 provisioningserver.config.is_dev_environment.return_value = False
316 self.assertEqual("maas-provision", get_maas_provision_command())316 self.assertEqual("maas-rack", get_maas_provision_command())
317317
318 def test__returns_full_path_for_development(self):318 def test__returns_full_path_for_development(self):
319 self.patch(provisioningserver.config, "is_dev_environment")319 self.patch(provisioningserver.config, "is_dev_environment")
320 provisioningserver.config.is_dev_environment.return_value = True320 provisioningserver.config.is_dev_environment.return_value = True
321 self.assertEqual(321 self.assertEqual(
322 root.rstrip("/") + "/bin/maas-provision",322 root.rstrip("/") + "/bin/maas-rack",
323 get_maas_provision_command())323 get_maas_provision_command())
324324
325325
326326
=== modified file 'src/provisioningserver/utils/tests/test_script.py'
--- src/provisioningserver/utils/tests/test_script.py 2015-12-03 23:28:19 +0000
+++ src/provisioningserver/utils/tests/test_script.py 2016-03-07 14:36:44 +0000
@@ -194,7 +194,7 @@
194194
195 def test_script_executable(self):195 def test_script_executable(self):
196 content = factory.make_string()196 content = factory.make_string()
197 script = [os.path.join(bindir, "maas-provision"), 'atomic-write']197 script = [os.path.join(bindir, "maas-rack"), 'atomic-write']
198 target_file = self.make_file()198 target_file = self.make_file()
199 script.extend(('--filename', target_file, '--mode', '615'))199 script.extend(('--filename', target_file, '--mode', '615'))
200 cmd = Popen(script, stdin=PIPE, env=select_c_utf8_locale())200 cmd = Popen(script, stdin=PIPE, env=select_c_utf8_locale())