Puppet: System Administration Automated

Support

Ticket #1152 (new defect)

Opened 6 months ago

Last modified 5 months ago

interface{} fails on RHEL

Reported by: apenney Assigned to: luke
Priority: normal Milestone:
Component: interface Version: 0.24.2
Severity: normal Keywords: interface rhel
Cc: Triage Stage: Accepted
Attached Patches: Code Complexity: Unknown

Description (Last modified by luke)

I've been doing some work on why interface{} fails on a RHEL5.2 server, and so far I've done the below patch to fix most of the problems. I am having the trouble that a puppetd --test --trace run says that name is undefined now, but as you can see it's listed below. I've exhausted my debugging for the moment, I can't figure out what is going on as I don't understand the prefetching, but hopefully someone can proceed from the below.

diff -u /usr/lib/ruby/site_ruby/1.8/puppet/type/interface.rb interface.rb
--- /usr/lib/ruby/site_ruby/1.8/puppet/type/interface.rb	2008-02-27 12:54:50.000000000 -0500
+++ interface.rb	2008-03-21 09:28:41.000000000 -0400
@@ -3,8 +3,9 @@
 
 	@doc = "Create configuration for IP address aliases and loopback addresses."
 
-	newparam(:name, :namevar => true) do
+	newparam(:name) do
 		desc "The ipaddress to add to alias or loopback/dummy interface"
+		isnamevar
 	end
 
     ensurable
@@ -38,6 +39,14 @@
 		newvalue(:false)
 	end
 
+	newproperty(:bootproto) do
+		desc "Method used to determine protocol used to obtain configuration."
+		newvalue(:none)
+		newvalue(:bootp)
+		newvalue(:dhcp)
+		newvalue(:static)
+	end
+
 	newproperty(:ifnum) do
 		desc "If not automatically configuring the dummy interface or
               and alias. This is use to force a given number to be used"
@@ -51,6 +60,23 @@
 		desc "Interface options."
 	end
 
+	newproperty(:network) do
+		desc "Network address for the interface."
+	end
+
+	newproperty(:broadcast) do
+		desc "Broadcast address for the interface."
+	end
+
+	newproperty(:gateway) do
+		desc "Gateway address for the interface."
+	end
+
+	newproperty(:type) do
+		desc "Gateway address for the interface."
+		newvalue (:Ethernet)
+	end
+
     newparam(:target) do
         include Puppet::Util::Warnings
         desc "The path to the file this resource creates."

Change History

03/21/08 14:55:06 changed by apenney

diff -u /usr/lib/ruby/site_ruby/1.8/puppet/type/interface.rb interface.rb
--- /usr/lib/ruby/site_ruby/1.8/puppet/type/interface.rb	2008-02-27 12:54:50.000000000 -0500
+++ interface.rb	2008-03-21 09:28:41.000000000 -0400
@@ -3,8 +3,9 @@
 
 	@doc = "Create configuration for IP address aliases and loopback addresses."
 
-	newparam(:name, :namevar => true) do
+	newparam(:name) do
 		desc "The ipaddress to add to alias or loopback/dummy interface"
+		isnamevar
 	end
 
     ensurable
@@ -38,6 +39,14 @@
 		newvalue(:false)
 	end
 
+	newproperty(:bootproto) do
+		desc "Method used to determine protocol used to obtain configuration."
+		newvalue(:none)
+		newvalue(:bootp)
+		newvalue(:dhcp)
+		newvalue(:static)
+	end
+
 	newproperty(:ifnum) do
 		desc "If not automatically configuring the dummy interface or
               and alias. This is use to force a given number to be used"
@@ -51,6 +60,23 @@
 		desc "Interface options."
 	end
 
+	newproperty(:network) do
+		desc "Network address for the interface."
+	end
+
+	newproperty(:broadcast) do
+		desc "Broadcast address for the interface."
+	end
+
+	newproperty(:gateway) do
+		desc "Gateway address for the interface."
+	end
+
+	newproperty(:type) do
+		desc "Gateway address for the interface."
+		newvalue (:Ethernet)
+	end
+
     newparam(:target) do
         include Puppet::Util::Warnings
         desc "The path to the file this resource creates."

04/10/08 22:26:17 changed by luke

  • owner changed from community to luke.
  • description changed.
  • stage changed from Unreviewed to Accepted.

04/24/08 07:23:12 changed by luke

  • component changed from library to interface.