1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Mirantis Inc., Enea AB and others.
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Mon, 18 Dec 2017 02:03:01 +0200
11 Subject: [PATCH] maas: region: interface: default mode DHCP
13 Switch MaaS interface mode default from AUTO to DHCP.
14 This way, MaaS will not statically assign IPs *outside* the dynamic
15 reserved range, but instead DHCP will assign them *inside* the range.
17 One alternative would be to handle this via API calls, for each
18 node's PXE physical interface, but that overcomplicates things.
22 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
25 diff --git a/maas/region.sls b/maas/region.sls
30 - service: maas_region_services
32 +maas_interface_default_mode_dhcp:
34 + - name: "/usr/lib/python3/dist-packages/maasserver/models/node.py"
35 + - pattern: '^(\s+INTERFACE_LINK_TYPE)\.AUTO'
38 + - pkg: maas_region_packages
40 + - service: maas_region_services
42 {%- if region.get('enable_iframe', False) %}
44 /etc/apache2/conf-enabled/maas-http.conf: