← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~julian-edwards/maas/next-server-wrong-bug-1081692 into lp:maas

 

Julian Edwards has proposed merging lp:~julian-edwards/maas/next-server-wrong-bug-1081692 into lp:maas.

Commit message:
Remove next-server from the DHCP config, it's not needed because the pserv is always on the same hardware as the DHCP server.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1081692 in MAAS: "The value of 'next-server' in the dhcp config is wrong."
  https://bugs.launchpad.net/maas/+bug/1081692

For more details, see:
https://code.launchpad.net/~julian-edwards/maas/next-server-wrong-bug-1081692/+merge/135579
-- 
https://code.launchpad.net/~julian-edwards/maas/next-server-wrong-bug-1081692/+merge/135579
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/next-server-wrong-bug-1081692 into lp:maas.
=== modified file 'docs/configure.rst'
--- docs/configure.rst	2012-11-20 21:46:37 +0000
+++ docs/configure.rst	2012-11-22 03:20:27 +0000
@@ -12,13 +12,11 @@
 existing DHCP server for the network will need its configuration
 altered to allow MAAS to enlist and control nodes automatically.
 
-At the very least the next-server should point to the MAAS controller
-host address and the filename should be set to pxelinux.0
+At the very least the filename should be set to pxelinux.0.
 
 The configuration entry may look something like this::
 
    subnet 192.168.122.0 netmask 255.255.255.0 {
-       next-server 192.168.122.136;
        filename "pxelinux.0";
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.122.255;

=== modified file 'src/provisioningserver/dhcp/config.py'
--- src/provisioningserver/dhcp/config.py	2012-08-21 15:59:48 +0000
+++ src/provisioningserver/dhcp/config.py	2012-11-22 03:20:27 +0000
@@ -28,7 +28,6 @@
 
 template_content = dedent("""\
     subnet {{subnet}} netmask {{subnet_mask}} {
-           next-server {{next_server}};
            filename "{{bootloader}}";
            option subnet-mask {{subnet_mask}};
            option broadcast-address {{broadcast_ip}};
@@ -53,7 +52,6 @@
 
     :param subnet: The base subnet declaration. e.g. 192.168.1.0
     :param subnet_mask: The mask for the above subnet, e.g. 255.255.255.0
-    :param next_server: The address of the TFTP server for PXE booting.
     :param broadcast_address: The broadcast IP address for the subnet,
         e.g. 192.168.1.255
     :param dns_servers: One or more IP addresses of the DNS server for the

=== modified file 'src/provisioningserver/dhcp/tests/test_writer.py'
--- src/provisioningserver/dhcp/tests/test_writer.py	2012-08-31 15:43:12 +0000
+++ src/provisioningserver/dhcp/tests/test_writer.py	2012-11-22 03:20:27 +0000
@@ -34,7 +34,6 @@
     test_args = (
         '--subnet', 'subnet',
         '--subnet-mask', 'subnet-mask',
-        '--next-server', 'next-server',
         '--broadcast-ip', 'broadcast-ip',
         '--dns-servers', 'dns-servers',
         '--router-ip', 'router-ip',
@@ -53,7 +52,7 @@
             script, stdout=PIPE, env=dict(PYTHONPATH=":".join(sys.path)))
         output, err = cmd.communicate()
         contains_all_params = ContainsAll(
-            ['subnet', 'subnet-mask', 'next-server', 'broadcast-ip',
+            ['subnet', 'subnet-mask', 'broadcast-ip',
              'omapi-key', 'dns-servers', 'router-ip',
              'ip-range-low', 'ip-range-high'])
         self.assertThat(output, contains_all_params)
@@ -66,7 +65,6 @@
             args, MatchesStructure.byEquality(
                 subnet='subnet',
                 subnet_mask='subnet-mask',
-                next_server='next-server',
                 broadcast_ip='broadcast-ip',
                 dns_servers='dns-servers',
                 router_ip='router-ip',
@@ -84,7 +82,6 @@
         contains_all_params = ContainsAll([
             'subnet',
             'subnet-mask',
-            'next-server',
             'broadcast-ip',
             'omapi-key',
             'dns-servers',
@@ -106,7 +103,6 @@
         contains_all_params = ContainsAll([
             'subnet',
             'subnet-mask',
-            'next-server',
             'broadcast-ip',
             'omapi-key',
             'dns-servers',

=== modified file 'src/provisioningserver/dhcp/writer.py'
--- src/provisioningserver/dhcp/writer.py	2012-09-18 15:30:59 +0000
+++ src/provisioningserver/dhcp/writer.py	2012-11-22 03:20:27 +0000
@@ -32,9 +32,6 @@
         "--subnet-mask", action="store", required=True, help=(
             "The mask for the subnet, e.g. 255.255.255.0"))
     parser.add_argument(
-        "--next-server", action="store", required=True, help=(
-            "The address of the TFTP server"))
-    parser.add_argument(
         "--broadcast-ip", action="store", required=True, help=(
             "The broadcast IP address for the subnet, e.g. 192.168.1.255"))
     parser.add_argument(