Call l23network init for interface config
l23network base class now has fixes for networkmanager which was creating some issues with interface gateways. Includes a workaround for disabling bonding kernel module because it gets enabled automatically in l23network class initialization. (details in LP#1541028) Change-Id: Ib50c2d3672f7e10cff5cc3c29d7b3dbf5d428a86 Closes-Bug: #1538757
This commit is contained in:
parent
d2a14d4898
commit
fba0825d97
|
@ -27,8 +27,12 @@ def puppetApply(classes):
|
|||
command = ["puppet", "apply", "-d", "-v", "--logdest",
|
||||
"/var/log/puppet/fuelmenu-puppet.log"]
|
||||
input = []
|
||||
# TODO(mattymo): Convert puppet resource types to consts
|
||||
for cls in classes:
|
||||
if cls['type'] == "resource":
|
||||
if cls['type'] == "literal":
|
||||
input.extend(cls["name"])
|
||||
continue
|
||||
elif cls['type'] == "resource":
|
||||
input.extend([cls["class"], "{", '"%s":' % cls["name"]])
|
||||
elif cls['type'] == "class":
|
||||
input.extend(["class", "{", '"%s":' % cls["class"]])
|
||||
|
|
|
@ -229,15 +229,34 @@ class interfaces(urwid.WidgetWrap):
|
|||
return False
|
||||
|
||||
self.parent.footer.set_text("Applying changes... (May take up to 20s)")
|
||||
|
||||
# Build puppet resources to apply l23network puppet module to enable
|
||||
# network changes
|
||||
puppetclasses = []
|
||||
|
||||
#If there is a gateway configured in /etc/sysconfig/network, unset it
|
||||
# FIXME(mattymo): install_bondtool param does not work (LP#1541028)
|
||||
# The following 4 lines should be removed when fixed.
|
||||
disable_bond = {
|
||||
'type': "literal",
|
||||
'name': 'K_mod <| title == "bonding" |> {ensure => absent} '}
|
||||
puppetclasses.append(disable_bond)
|
||||
|
||||
# If there is a gateway configured in /etc/sysconfig/network, unset it
|
||||
expr = '^GATEWAY=.*'
|
||||
replace.replaceInFile("/etc/sysconfig/network", expr, "")
|
||||
|
||||
# Initialize l23network class for NetworkManager fixes
|
||||
l23network = {'type': "resource",
|
||||
'class': "class",
|
||||
'name': "l23network",
|
||||
'params': {'install_bondtool': False}}
|
||||
puppetclasses.append(l23network)
|
||||
|
||||
# Prepare l23network interface configuration
|
||||
l3ifconfig = {'type': "resource",
|
||||
'class': "l23network::l3::ifconfig",
|
||||
'name': self.activeiface}
|
||||
|
||||
if responses["onboot"].lower() == "no":
|
||||
params = {"ipaddr": "none",
|
||||
"gateway": ""}
|
||||
|
|
Loading…
Reference in New Issue