Luke
2011-Dec-20 20:41 UTC
[Puppet Users] Network config module won''t work. -Mac address errors
Hello, I created a module for modifying the base network settings on a machine. However no matter what changes I make it keeps giving me the error "has different MAC address than expected, ignoring" when the network tries to startup. I am testing this out on the puppet learning VM. Does anyone see anything wrong with my code: init.pp -------------------------- define basehost ($ipaddress, $gateway, $hostname, $environ, $macaddress) { file { ''hosts'': path => ''/etc/hosts'', ensure => ''present'', owner => ''root'', group => ''root'', mode => ''644'', content => template("basehost/hosts.erb"), notify => Service[network], } file { ''resolv.conf'': path => ''/etc/resolv.conf'', ensure => ''present'', owner => ''root'', group => ''root'', mode => ''644'', content => template("basehost/resolv.conf.erb"), notify => Service[network], } file { ''network'': path => ''/etc/sysconfig/network'', ensure => ''present'', owner => ''root'', group => ''root'', mode => ''644'', content => template("basehost/network.erb"), notify => Service[network], } file { ''ifcfg-eth0'': path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', ensure => ''present'', owner => ''root'', group => ''root'', mode => ''644'', content => template("basehost/ifcfg-eth0.erb"), notify => Service[network], } service { network: ensure => "running", hasstatus => "true", hasrestart => "true", restart => "/etc/init.d/network restart", } } hosts.erb ---------------------------- # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ %>.mydomain.local manage.<%= environ %>.mydomain.net ::1 localhost6.localdomain6 localhost6 resolve.conf.erb ---------------- search <%= environ %>.mydomain.local nameserver 10.180.0.2 nameserver 10.180.0.4 network.erb ------------------ NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local GATEWAY=<%= gateway %> ifcfg-eth0.erb ---------------- # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=static IPADDR=<%= ipaddress %> NETMASK=255.255.255.0 ONBOOT=yes HWADDR=<%= macaddress %> Gets kicked off using: basehost {''basehostsetup'': ipaddress => ''10.148.0.32'', gateway => ''10.148.0.1'', hostname => ''myhostname'', environ => ''test'', macaddress => ''00:50:56:ac:40:8a'', } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Charles Buckley
2011-Dec-20 20:46 UTC
Re: [Puppet Users] Network config module won''t work. -Mac address errors
Hello, What are the VM''s definitions of its network interfaces? Also, if you are trying Linux, what are the contents of /etc/udev/rules.d/70-persistent-net.rules ? Charles Buckley On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutaylor@gmail.com> wrote:> Hello, > > I created a module for modifying the base network settings on a > machine. However no matter what changes I make it keeps giving me the > error "has different MAC address than expected, ignoring" when the > network tries to startup. > > I am testing this out on the puppet learning VM. > > Does anyone see anything wrong with my code: > > init.pp > > -------------------------- > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > $macaddress) { > > > > > file { ''hosts'': > path => ''/etc/hosts'', > ensure => ''present'', > owner => ''root'', > group => ''root'', > mode => ''644'', > content => template("basehost/hosts.erb"), > notify => Service[network], > > } > > file { ''resolv.conf'': > path => ''/etc/resolv.conf'', > ensure => ''present'', > owner => ''root'', > group => ''root'', > mode => ''644'', > content => template("basehost/resolv.conf.erb"), > notify => Service[network], > > } > > > file { ''network'': > path => ''/etc/sysconfig/network'', > ensure => ''present'', > owner => ''root'', > group => ''root'', > mode => ''644'', > content => template("basehost/network.erb"), > notify => Service[network], > > } > > file { ''ifcfg-eth0'': > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > ensure => ''present'', > owner => ''root'', > group => ''root'', > mode => ''644'', > content => template("basehost/ifcfg-eth0.erb"), > notify => Service[network], > > } > > service { network: > ensure => "running", > hasstatus => "true", > hasrestart => "true", > restart => "/etc/init.d/network restart", > } > > } > > > hosts.erb > ---------------------------- > > # Do not remove the following line, or various programs > # that require network functionality will fail. > 127.0.0.1 localhost.localdomain localhost > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > %>.mydomain.local manage.<%= environ %>.mydomain.net > ::1 localhost6.localdomain6 localhost6 > > > > resolve.conf.erb > ---------------- > > search <%= environ %>.mydomain.local > nameserver 10.180.0.2 > nameserver 10.180.0.4 > > > > network.erb > > ------------------ > > > NETWORKING=yes > NETWORKING_IPV6=no > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > GATEWAY=<%= gateway %> > > > > ifcfg-eth0.erb > > ---------------- > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > DEVICE=eth0 > BOOTPROTO=static > IPADDR=<%= ipaddress %> > NETMASK=255.255.255.0 > ONBOOT=yes > HWADDR=<%= macaddress %> > > > > Gets kicked off using: > > basehost {''basehostsetup'': > ipaddress => ''10.148.0.32'', > gateway => ''10.148.0.1'', > hostname => ''myhostname'', > environ => ''test'', > macaddress => ''00:50:56:ac:40:8a'', > } > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke
2011-Dec-21 15:05 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
Hello Thank you for your reply. I don''t seem to have a 70-persistent-net.rules. I have a 60-net.rules with ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/ rename_device" SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug" What do you mean by VM definition. I made sure that it was in the right vlan etc. One thing that I noticed is that the puppet learning VM is set to flexible while the rest of them are set to E1000. On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote:> Hello, > > What are the VM''s definitions of its network interfaces? > > Also, if you are trying Linux, what are the contents of > /etc/udev/rules.d/70-persistent-net.rules ? > > Charles Buckley > > > > > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote: > > Hello, > > > I created a module for modifying the base network settings on a > > machine. However no matter what changes I make it keeps giving me the > > error "has different MAC address than expected, ignoring" when the > > network tries to startup. > > > I am testing this out on the puppet learning VM. > > > Does anyone see anything wrong with my code: > > > init.pp > > > -------------------------- > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > > $macaddress) { > > > file { ''hosts'': > > path => ''/etc/hosts'', > > ensure => ''present'', > > owner => ''root'', > > group => ''root'', > > mode => ''644'', > > content => template("basehost/hosts.erb"), > > notify => Service[network], > > > } > > > file { ''resolv.conf'': > > path => ''/etc/resolv.conf'', > > ensure => ''present'', > > owner => ''root'', > > group => ''root'', > > mode => ''644'', > > content => template("basehost/resolv.conf.erb"), > > notify => Service[network], > > > } > > > file { ''network'': > > path => ''/etc/sysconfig/network'', > > ensure => ''present'', > > owner => ''root'', > > group => ''root'', > > mode => ''644'', > > content => template("basehost/network.erb"), > > notify => Service[network], > > > } > > > file { ''ifcfg-eth0'': > > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > > ensure => ''present'', > > owner => ''root'', > > group => ''root'', > > mode => ''644'', > > content => template("basehost/ifcfg-eth0.erb"), > > notify => Service[network], > > > } > > > service { network: > > ensure => "running", > > hasstatus => "true", > > hasrestart => "true", > > restart => "/etc/init.d/network restart", > > } > > > } > > > hosts.erb > > ---------------------------- > > > # Do not remove the following line, or various programs > > # that require network functionality will fail. > > 127.0.0.1 localhost.localdomain localhost > > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > > %>.mydomain.local manage.<%= environ %>.mydomain.net > > ::1 localhost6.localdomain6 localhost6 > > > resolve.conf.erb > > ---------------- > > > search <%= environ %>.mydomain.local > > nameserver 10.180.0.2 > > nameserver 10.180.0.4 > > > network.erb > > > ------------------ > > > NETWORKING=yes > > NETWORKING_IPV6=no > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > > GATEWAY=<%= gateway %> > > > ifcfg-eth0.erb > > > ---------------- > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > > DEVICE=eth0 > > BOOTPROTO=static > > IPADDR=<%= ipaddress %> > > NETMASK=255.255.255.0 > > ONBOOT=yes > > HWADDR=<%= macaddress %> > > > Gets kicked off using: > > > basehost {''basehostsetup'': > > ipaddress => ''10.148.0.32'', > > gateway => ''10.148.0.1'', > > hostname => ''myhostname'', > > environ => ''test'', > > macaddress => ''00:50:56:ac:40:8a'', > > } > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Charles Buckley
2011-Dec-21 16:03 UTC
Re: [Puppet Users] Re: Network config module won''t work. -Mac address errors
Hello, That is not quite what I am asking. Your VM configures a set of parameters for the system to use when you build out the VM environment. One of those values is that macaddr of the server. (Not just the driver). These settings look to all be on the VM guest. The host table. resolv.conf. What I am trying to determine is why you are feeding it a macaddr, at all. If you were creating the VM guest, I could see feeding it a macaddr. But, here you are trying to change the macaddr of an existing guest. (basically, if you bring up the VM network properties, you will likely find that the macaddr below is different than the one the VM host has in the guest properties.) Where did you acquire the macaddr below to use for this? Charles Buckley On Wed, Dec 21, 2011 at 8:05 AM, Luke <lutaylor@gmail.com> wrote:> Hello Thank you for your reply. > > I don''t seem to have a 70-persistent-net.rules. I have a 60-net.rules > with > > ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/ > rename_device" > SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug" > > What do you mean by VM definition. I made sure that it was in the > right vlan etc. One thing that I noticed is that the puppet learning > VM is set to flexible while the rest of them are set to E1000. > > On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > Hello, > > > > What are the VM''s definitions of its network interfaces? > > > > Also, if you are trying Linux, what are the contents of > > /etc/udev/rules.d/70-persistent-net.rules ? > > > > Charles Buckley > > > > > > > > > > > > > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote: > > > Hello, > > > > > I created a module for modifying the base network settings on a > > > machine. However no matter what changes I make it keeps giving me the > > > error "has different MAC address than expected, ignoring" when the > > > network tries to startup. > > > > > I am testing this out on the puppet learning VM. > > > > > Does anyone see anything wrong with my code: > > > > > init.pp > > > > > -------------------------- > > > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > > > $macaddress) { > > > > > file { ''hosts'': > > > path => ''/etc/hosts'', > > > ensure => ''present'', > > > owner => ''root'', > > > group => ''root'', > > > mode => ''644'', > > > content => template("basehost/hosts.erb"), > > > notify => Service[network], > > > > > } > > > > > file { ''resolv.conf'': > > > path => ''/etc/resolv.conf'', > > > ensure => ''present'', > > > owner => ''root'', > > > group => ''root'', > > > mode => ''644'', > > > content => template("basehost/resolv.conf.erb"), > > > notify => Service[network], > > > > > } > > > > > file { ''network'': > > > path => ''/etc/sysconfig/network'', > > > ensure => ''present'', > > > owner => ''root'', > > > group => ''root'', > > > mode => ''644'', > > > content => template("basehost/network.erb"), > > > notify => Service[network], > > > > > } > > > > > file { ''ifcfg-eth0'': > > > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > > > ensure => ''present'', > > > owner => ''root'', > > > group => ''root'', > > > mode => ''644'', > > > content => template("basehost/ifcfg-eth0.erb"), > > > notify => Service[network], > > > > > } > > > > > service { network: > > > ensure => "running", > > > hasstatus => "true", > > > hasrestart => "true", > > > restart => "/etc/init.d/network restart", > > > } > > > > > } > > > > > hosts.erb > > > ---------------------------- > > > > > # Do not remove the following line, or various programs > > > # that require network functionality will fail. > > > 127.0.0.1 localhost.localdomain localhost > > > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > > > %>.mydomain.local manage.<%= environ %>.mydomain.net > > > ::1 localhost6.localdomain6 localhost6 > > > > > resolve.conf.erb > > > ---------------- > > > > > search <%= environ %>.mydomain.local > > > nameserver 10.180.0.2 > > > nameserver 10.180.0.4 > > > > > network.erb > > > > > ------------------ > > > > > NETWORKING=yes > > > NETWORKING_IPV6=no > > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > > > GATEWAY=<%= gateway %> > > > > > ifcfg-eth0.erb > > > > > ---------------- > > > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > > > DEVICE=eth0 > > > BOOTPROTO=static > > > IPADDR=<%= ipaddress %> > > > NETMASK=255.255.255.0 > > > ONBOOT=yes > > > HWADDR=<%= macaddress %> > > > > > Gets kicked off using: > > > > > basehost {''basehostsetup'': > > > ipaddress => ''10.148.0.32'', > > > gateway => ''10.148.0.1'', > > > hostname => ''myhostname'', > > > environ => ''test'', > > > macaddress => ''00:50:56:ac:40:8a'', > > > } > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Puppet Users" group. > > > To post to this group, send email to puppet-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > > puppet-users+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/puppet-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke
2011-Dec-21 20:30 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
Hi, The macaddress in the vm is set to automatic but the populated value matches exactly the value that I put into the file, that is where I got it from (in fact I checked the ifconfig-eth0 before creating the file and it had the same values that I specified). On Dec 21, 12:03 pm, Charles Buckley <rijrun...@gmail.com> wrote:> Hello, > > That is not quite what I am asking. Your VM configures a set of > parameters for the > system to use when you build out the VM environment. One of those values is > that > macaddr of the server. (Not just the driver). > > These settings look to all be on the VM guest. The host table. > resolv.conf. > > What I am trying to determine is why you are feeding it a macaddr, at > all. If you > were creating the VM guest, I could see feeding it a macaddr. But, here you > are trying > to change the macaddr of an existing guest. (basically, if you bring up the > VM > network properties, you will likely find that the macaddr below is > different than the > one the VM host has in the guest properties.) > > Where did you acquire the macaddr below to use for this? > > Charles Buckley > > > > > > > > On Wed, Dec 21, 2011 at 8:05 AM, Luke <lutay...@gmail.com> wrote: > > Hello Thank you for your reply. > > > I don''t seem to have a 70-persistent-net.rules. I have a 60-net.rules > > with > > > ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/ > > rename_device" > > SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug" > > > What do you mean by VM definition. I made sure that it was in the > > right vlan etc. One thing that I noticed is that the puppet learning > > VM is set to flexible while the rest of them are set to E1000. > > > On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > > Hello, > > > > What are the VM''s definitions of its network interfaces? > > > > Also, if you are trying Linux, what are the contents of > > > /etc/udev/rules.d/70-persistent-net.rules ? > > > > Charles Buckley > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote: > > > > Hello, > > > > > I created a module for modifying the base network settings on a > > > > machine. However no matter what changes I make it keeps giving me the > > > > error "has different MAC address than expected, ignoring" when the > > > > network tries to startup. > > > > > I am testing this out on the puppet learning VM. > > > > > Does anyone see anything wrong with my code: > > > > > init.pp > > > > > -------------------------- > > > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > > > > $macaddress) { > > > > > file { ''hosts'': > > > > path => ''/etc/hosts'', > > > > ensure => ''present'', > > > > owner => ''root'', > > > > group => ''root'', > > > > mode => ''644'', > > > > content => template("basehost/hosts.erb"), > > > > notify => Service[network], > > > > > } > > > > > file { ''resolv.conf'': > > > > path => ''/etc/resolv.conf'', > > > > ensure => ''present'', > > > > owner => ''root'', > > > > group => ''root'', > > > > mode => ''644'', > > > > content => template("basehost/resolv.conf.erb"), > > > > notify => Service[network], > > > > > } > > > > > file { ''network'': > > > > path => ''/etc/sysconfig/network'', > > > > ensure => ''present'', > > > > owner => ''root'', > > > > group => ''root'', > > > > mode => ''644'', > > > > content => template("basehost/network.erb"), > > > > notify => Service[network], > > > > > } > > > > > file { ''ifcfg-eth0'': > > > > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > > > > ensure => ''present'', > > > > owner => ''root'', > > > > group => ''root'', > > > > mode => ''644'', > > > > content => template("basehost/ifcfg-eth0.erb"), > > > > notify => Service[network], > > > > > } > > > > > service { network: > > > > ensure => "running", > > > > hasstatus => "true", > > > > hasrestart => "true", > > > > restart => "/etc/init.d/network restart", > > > > } > > > > > } > > > > > hosts.erb > > > > ---------------------------- > > > > > # Do not remove the following line, or various programs > > > > # that require network functionality will fail. > > > > 127.0.0.1 localhost.localdomain localhost > > > > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > > > > %>.mydomain.local manage.<%= environ %>.mydomain.net > > > > ::1 localhost6.localdomain6 localhost6 > > > > > resolve.conf.erb > > > > ---------------- > > > > > search <%= environ %>.mydomain.local > > > > nameserver 10.180.0.2 > > > > nameserver 10.180.0.4 > > > > > network.erb > > > > > ------------------ > > > > > NETWORKING=yes > > > > NETWORKING_IPV6=no > > > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > > > > GATEWAY=<%= gateway %> > > > > > ifcfg-eth0.erb > > > > > ---------------- > > > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > > > > DEVICE=eth0 > > > > BOOTPROTO=static > > > > IPADDR=<%= ipaddress %> > > > > NETMASK=255.255.255.0 > > > > ONBOOT=yes > > > > HWADDR=<%= macaddress %> > > > > > Gets kicked off using: > > > > > basehost {''basehostsetup'': > > > > ipaddress => ''10.148.0.32'', > > > > gateway => ''10.148.0.1'', > > > > hostname => ''myhostname'', > > > > environ => ''test'', > > > > macaddress => ''00:50:56:ac:40:8a'', > > > > } > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Puppet Users" group. > > > > To post to this group, send email to puppet-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > puppet-users+unsubscribe@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/puppet-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke
2011-Dec-22 19:21 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
I mean does the code look ok? Are we thinking that it is a prob with the vm config on the esx side? On Dec 21, 4:30 pm, Luke <lutay...@gmail.com> wrote:> Hi, > > The macaddress in the vm is set to automatic but the populated value > matches exactly the value that I put into the file, that is where I > got it from (in fact I checked the ifconfig-eth0 before creating the > file and it had the same values that I specified). > > On Dec 21, 12:03 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > > > > > > > > Hello, > > > That is not quite what I am asking. Your VM configures a set of > > parameters for the > > system to use when you build out the VM environment. One of those values is > > that > > macaddr of the server. (Not just the driver). > > > These settings look to all be on the VM guest. The host table. > > resolv.conf. > > > What I am trying to determine is why you are feeding it a macaddr, at > > all. If you > > were creating the VM guest, I could see feeding it a macaddr. But, here you > > are trying > > to change the macaddr of an existing guest. (basically, if you bring up the > > VM > > network properties, you will likely find that the macaddr below is > > different than the > > one the VM host has in the guest properties.) > > > Where did you acquire the macaddr below to use for this? > > > Charles Buckley > > > On Wed, Dec 21, 2011 at 8:05 AM, Luke <lutay...@gmail.com> wrote: > > > Hello Thank you for your reply. > > > > I don''t seem to have a 70-persistent-net.rules. I have a 60-net.rules > > > with > > > > ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/ > > > rename_device" > > > SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug" > > > > What do you mean by VM definition. I made sure that it was in the > > > right vlan etc. One thing that I noticed is that the puppet learning > > > VM is set to flexible while the rest of them are set to E1000. > > > > On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > > > Hello, > > > > > What are the VM''s definitions of its network interfaces? > > > > > Also, if you are trying Linux, what are the contents of > > > > /etc/udev/rules.d/70-persistent-net.rules ? > > > > > Charles Buckley > > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote: > > > > > Hello, > > > > > > I created a module for modifying the base network settings on a > > > > > machine. However no matter what changes I make it keeps giving me the > > > > > error "has different MAC address than expected, ignoring" when the > > > > > network tries to startup. > > > > > > I am testing this out on the puppet learning VM. > > > > > > Does anyone see anything wrong with my code: > > > > > > init.pp > > > > > > -------------------------- > > > > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > > > > > $macaddress) { > > > > > > file { ''hosts'': > > > > > path => ''/etc/hosts'', > > > > > ensure => ''present'', > > > > > owner => ''root'', > > > > > group => ''root'', > > > > > mode => ''644'', > > > > > content => template("basehost/hosts.erb"), > > > > > notify => Service[network], > > > > > > } > > > > > > file { ''resolv.conf'': > > > > > path => ''/etc/resolv.conf'', > > > > > ensure => ''present'', > > > > > owner => ''root'', > > > > > group => ''root'', > > > > > mode => ''644'', > > > > > content => template("basehost/resolv.conf.erb"), > > > > > notify => Service[network], > > > > > > } > > > > > > file { ''network'': > > > > > path => ''/etc/sysconfig/network'', > > > > > ensure => ''present'', > > > > > owner => ''root'', > > > > > group => ''root'', > > > > > mode => ''644'', > > > > > content => template("basehost/network.erb"), > > > > > notify => Service[network], > > > > > > } > > > > > > file { ''ifcfg-eth0'': > > > > > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > > > > > ensure => ''present'', > > > > > owner => ''root'', > > > > > group => ''root'', > > > > > mode => ''644'', > > > > > content => template("basehost/ifcfg-eth0.erb"), > > > > > notify => Service[network], > > > > > > } > > > > > > service { network: > > > > > ensure => "running", > > > > > hasstatus => "true", > > > > > hasrestart => "true", > > > > > restart => "/etc/init.d/network restart", > > > > > } > > > > > > } > > > > > > hosts.erb > > > > > ---------------------------- > > > > > > # Do not remove the following line, or various programs > > > > > # that require network functionality will fail. > > > > > 127.0.0.1 localhost.localdomain localhost > > > > > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > > > > > %>.mydomain.local manage.<%= environ %>.mydomain.net > > > > > ::1 localhost6.localdomain6 localhost6 > > > > > > resolve.conf.erb > > > > > ---------------- > > > > > > search <%= environ %>.mydomain.local > > > > > nameserver 10.180.0.2 > > > > > nameserver 10.180.0.4 > > > > > > network.erb > > > > > > ------------------ > > > > > > NETWORKING=yes > > > > > NETWORKING_IPV6=no > > > > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > > > > > GATEWAY=<%= gateway %> > > > > > > ifcfg-eth0.erb > > > > > > ---------------- > > > > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > > > > > DEVICE=eth0 > > > > > BOOTPROTO=static > > > > > IPADDR=<%= ipaddress %> > > > > > NETMASK=255.255.255.0 > > > > > ONBOOT=yes > > > > > HWADDR=<%= macaddress %> > > > > > > Gets kicked off using: > > > > > > basehost {''basehostsetup'': > > > > > ipaddress => ''10.148.0.32'', > > > > > gateway => ''10.148.0.1'', > > > > > hostname => ''myhostname'', > > > > > environ => ''test'', > > > > > macaddress => ''00:50:56:ac:40:8a'', > > > > > } > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Puppet Users" group. > > > > > To post to this group, send email to puppet-users@googlegroups.com. > > > > > To unsubscribe from this group, send email to > > > > > puppet-users+unsubscribe@googlegroups.com. > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/puppet-users?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Puppet Users" group. > > > To post to this group, send email to puppet-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > > puppet-users+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke
2012-Jan-17 13:35 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
The code appears to be fine. The issue is with VMware it doesn''t like me replacing the network config files but if I manually edit them it seems to be fine. Is it possible to have puppet just edit the contents of files instead of completely replacing them? Does anyone else have problems with file replacement messing with things? On Dec 22 2011, 3:21 pm, Luke <lutay...@gmail.com> wrote:> I mean does the code look ok? > > Are we thinking that it is a prob with the vm config on the esx side? > > On Dec 21, 4:30 pm, Luke <lutay...@gmail.com> wrote: > > > > > > > > > Hi, > > > The macaddress in the vm is set to automatic but the populated value > > matches exactly the value that I put into the file, that is where I > > got it from (in fact I checked the ifconfig-eth0 before creating the > > file and it had the same values that I specified). > > > On Dec 21, 12:03 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > > > Hello, > > > > That is not quite what I am asking. Your VM configures a set of > > > parameters for the > > > system to use when you build out the VM environment. One of those values is > > > that > > > macaddr of the server. (Not just the driver). > > > > These settings look to all be on the VM guest. The host table. > > > resolv.conf. > > > > What I am trying to determine is why you are feeding it a macaddr, at > > > all. If you > > > were creating the VM guest, I could see feeding it a macaddr. But, here you > > > are trying > > > to change the macaddr of an existing guest. (basically, if you bring up the > > > VM > > > network properties, you will likely find that the macaddr below is > > > different than the > > > one the VM host has in the guest properties.) > > > > Where did you acquire the macaddr below to use for this? > > > > Charles Buckley > > > > On Wed, Dec 21, 2011 at 8:05 AM, Luke <lutay...@gmail.com> wrote: > > > > Hello Thank you for your reply. > > > > > I don''t seem to have a 70-persistent-net.rules. I have a 60-net.rules > > > > with > > > > > ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="/lib/udev/ > > > > rename_device" > > > > SUBSYSTEM=="net", RUN+="/etc/sysconfig/network-scripts/net.hotplug" > > > > > What do you mean by VM definition. I made sure that it was in the > > > > right vlan etc. One thing that I noticed is that the puppet learning > > > > VM is set to flexible while the rest of them are set to E1000. > > > > > On Dec 20, 4:46 pm, Charles Buckley <rijrun...@gmail.com> wrote: > > > > > Hello, > > > > > > What are the VM''s definitions of its network interfaces? > > > > > > Also, if you are trying Linux, what are the contents of > > > > > /etc/udev/rules.d/70-persistent-net.rules ? > > > > > > Charles Buckley > > > > > > On Tue, Dec 20, 2011 at 1:41 PM, Luke <lutay...@gmail.com> wrote: > > > > > > Hello, > > > > > > > I created a module for modifying the base network settings on a > > > > > > machine. However no matter what changes I make it keeps giving me the > > > > > > error "has differentMACaddressthan expected, ignoring" when the > > > > > > network tries to startup. > > > > > > > I am testing this out on the puppet learning VM. > > > > > > > Does anyone see anything wrong with my code: > > > > > > > init.pp > > > > > > > -------------------------- > > > > > > > define basehost ($ipaddress, $gateway, $hostname, $environ, > > > > > > $macaddress) { > > > > > > > file { ''hosts'': > > > > > > path => ''/etc/hosts'', > > > > > > ensure => ''present'', > > > > > > owner => ''root'', > > > > > > group => ''root'', > > > > > > mode => ''644'', > > > > > > content => template("basehost/hosts.erb"), > > > > > > notify => Service[network], > > > > > > > } > > > > > > > file { ''resolv.conf'': > > > > > > path => ''/etc/resolv.conf'', > > > > > > ensure => ''present'', > > > > > > owner => ''root'', > > > > > > group => ''root'', > > > > > > mode => ''644'', > > > > > > content => template("basehost/resolv.conf.erb"), > > > > > > notify => Service[network], > > > > > > > } > > > > > > > file { ''network'': > > > > > > path => ''/etc/sysconfig/network'', > > > > > > ensure => ''present'', > > > > > > owner => ''root'', > > > > > > group => ''root'', > > > > > > mode => ''644'', > > > > > > content => template("basehost/network.erb"), > > > > > > notify => Service[network], > > > > > > > } > > > > > > > file { ''ifcfg-eth0'': > > > > > > path => ''/etc/sysconfig/network-scripts/ifcfg-eth0'', > > > > > > ensure => ''present'', > > > > > > owner => ''root'', > > > > > > group => ''root'', > > > > > > mode => ''644'', > > > > > > content => template("basehost/ifcfg-eth0.erb"), > > > > > > notify => Service[network], > > > > > > > } > > > > > > > service { network: > > > > > > ensure => "running", > > > > > > hasstatus => "true", > > > > > > hasrestart => "true", > > > > > > restart => "/etc/init.d/network restart", > > > > > > } > > > > > > > } > > > > > > > hosts.erb > > > > > > ---------------------------- > > > > > > > # Do not remove the following line, or various programs > > > > > > # that require network functionality will fail. > > > > > > 127.0.0.1 localhost.localdomain localhost > > > > > > <%= ipaddress %> <%= hostname %> <%= hostname %>.<%= environ > > > > > > %>.mydomain.local manage.<%= environ %>.mydomain.net > > > > > > ::1 localhost6.localdomain6 localhost6 > > > > > > > resolve.conf.erb > > > > > > ---------------- > > > > > > > search <%= environ %>.mydomain.local > > > > > > nameserver 10.180.0.2 > > > > > > nameserver 10.180.0.4 > > > > > > > network.erb > > > > > > > ------------------ > > > > > > > NETWORKING=yes > > > > > > NETWORKING_IPV6=no > > > > > > HOSTNAME=<%= hostname %>.<%= environ %>.mydomain.local > > > > > > GATEWAY=<%= gateway %> > > > > > > > ifcfg-eth0.erb > > > > > > > ---------------- > > > > > > > # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] > > > > > > DEVICE=eth0 > > > > > > BOOTPROTO=static > > > > > > IPADDR=<%= ipaddress %> > > > > > > NETMASK=255.255.255.0 > > > > > > ONBOOT=yes > > > > > > HWADDR=<%= macaddress %> > > > > > > > Gets kicked off using: > > > > > > > basehost {''basehostsetup'': > > > > > > ipaddress => ''10.148.0.32'', > > > > > > gateway => ''10.148.0.1'', > > > > > > hostname => ''myhostname'', > > > > > > environ => ''test'', > > > > > > macaddress => ''00:50:56:ac:40:8a'', > > > > > > } > > > > > > > -- > > > > > > You received this message because you are subscribed to the Google > > > > Groups > > > > > > "Puppet Users" group. > > > > > > To post to this group, send email to puppet-users@googlegroups.com. > > > > > > To unsubscribe from this group, send email to > > > > > > puppet-users+unsubscribe@googlegroups.com. > > > > > > For more options, visit this group at > > > > > >http://groups.google.com/group/puppet-users?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > > "Puppet Users" group. > > > > To post to this group, send email to puppet-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > puppet-users+unsubscribe@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ger Apeldoorn
2012-Jan-19 14:38 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
If you omit the macaddress in the ifcfg-eth0 file, it should work properly if there are no persistent network configs. On Redhat, the 70-persistent-net.rules assigns a specific ethx device to a specific nic. Your ''ignoring'' messages strongly point in the direction of such a mechanism. So if you have a template with a macaddress, the 70-persistent-net.rules file always assigns eth0 to it. The nic in the cloned machine (with a new mac) will be named eth1. I do not use puppet to configure the network, but made a script that combines a few parts of PE and configures the network too. (See http://www.gerapeldoorn.nl/freelance/linux-automation for the script..) Regards, Ger. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AQkU3kahyncJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke
2012-Feb-02 20:10 UTC
[Puppet Users] Re: Network config module won''t work. -Mac address errors
Thanks for your help. I removed the mac. The issue actually turned out to be I needed to do a dos2unix on my template files :{ On Jan 19, 10:38 am, Ger Apeldoorn <i...@gerapeldoorn.nl> wrote:> If you omit the macaddress in the ifcfg-eth0 file, it should work properly > if there are no persistent network configs. > > On Redhat, the 70-persistent-net.rules assigns a specific ethx device to a > specific nic. Your ''ignoring'' messages strongly point in the direction of > such a mechanism. > > So if you have a template with a macaddress, the 70-persistent-net.rules > file always assigns eth0 to it. The nic in the cloned machine (with a new > mac) will be named eth1. > > I do not use puppet to configure the network, but made a script that > combines a few parts of PE and configures the network too. > > (Seehttp://www.gerapeldoorn.nl/freelance/linux-automationfor the script..) > > Regards, > Ger.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.