Feature #744

more flexible interface type

Added by Chris MacLeod almost 5 years ago. Updated almost 5 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:-
Target version:0.24.0
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

Description

the current template for the interface type for the linux provider doesn’t allow changing of the netmask nor the bootproto.

it also only supports aliases (bridges) rather than vlans, base interfaces and bridges.

The template patch should look something like this:

Index: linux.rb

—– linux.rb (revision 2732) +++ linux.rb (working copy) @@ -11,9 +11,9 @@

 ALIAS_TEMPLATE = ERB.new <<-ALIAS

DEVICE=<%= self.device %> ONBOOT=<%= self.on_boot %> -BOOTPROTO=none +BOOTPROTO=<%= self.bootproto %> IPADDR=<%= self.name %> -NETMASK=255.255.255.255 +NETMASK=<%= self.netmask %> BROADCAST= ALIAS

though to support vlans it needs an additional line VLAN=yes in /etc/sysconfig/network

the loopback template should work for all cases as it, though the current implementation in >=rhel4 is for the netmask to be set to 127.255.255.255 (vs 255.255.255.255) the latter is a workaround for problems with gated and martians.

History

Updated by Chris MacLeod almost 5 years ago

Index: linux.rb
===================================================================
--- linux.rb    (revision 2732)
+++ linux.rb    (working copy)
@@ -11,9 +11,9 @@
     ALIAS_TEMPLATE = ERB.new <<-ALIAS
 DEVICE=<%= self.device %>
 ONBOOT=<%= self.on_boot %>
-BOOTPROTO=none
+BOOTPROTO=<%= self.bootproto %>
 IPADDR=<%= self.name %>
-NETMASK=255.255.255.255
+NETMASK=<%= self.netmask %>
 BROADCAST=
 ALIAS

Updated by Luke Kanies almost 5 years ago

Please attach patches as attachments from now on.

Updated by Chris MacLeod almost 5 years ago

I was wrong in my earlier statement about vlan support. VLAN=yes can be set (and should be set) in the specified interface file rather than /etc/sysconfig/network

Updated by Luke Kanies almost 5 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

Applied in r2736.

Also available in: Atom PDF