Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow-hotplug section mangles interfaces file #11

Closed
adrienthebo opened this issue Nov 27, 2012 · 0 comments · Fixed by #284
Closed

allow-hotplug section mangles interfaces file #11

adrienthebo opened this issue Nov 27, 2012 · 0 comments · Fixed by #284
Assignees
Labels
bug Something isn't working
Milestone

Comments

@adrienthebo
Copy link
Member

The odd handling of allow-hotplug and allow-auto sections is causing those values to be improperly flushed.

root@ubuntu:/vagrant/puppet/manifests# puppet apply --trace /vagrant/puppet/manifests/test.pp`
 
Error: Could not prefetch network_config provider 'interfaces': undefined method `[]' for nil:NilClass
/etc/puppet/modules/network/lib/puppet/provider/network_config/interfaces.rb:164:in `parse_file'
/etc/puppet/modules/network/lib/puppet/provider/network_config/interfaces.rb:59:in `each'
/etc/puppet/modules/network/lib/puppet/provider/network_config/interfaces.rb:59:in `parse_file'
/etc/puppet/modules/filemapper/lib/puppetx/filemapper.rb:157:in `load_all_providers_from_disk'
/etc/puppet/modules/filemapper/lib/puppetx/filemapper.rb:156:in `each_pair'
/etc/puppet/modules/filemapper/lib/puppetx/filemapper.rb:156:in `load_all_providers_from_disk'
/etc/puppet/modules/filemapper/lib/puppetx/filemapper.rb:93:in `instances'
/etc/puppet/modules/filemapper/lib/puppetx/filemapper.rb:179:in `prefetch'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:284:in `prefetch'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:272:in `prefetch_if_necessary'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:376:in `traverse'
/usr/lib/ruby/vendor_ruby/puppet/transaction.rb:99:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:144:in `apply'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:122:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:178:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:121:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:179:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:265:in `apply_catalog'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:213:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:146:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:346:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:438:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:346:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:500:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:346:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:87:in `execute'
/usr/bin/puppet:4
node default {
 
  network_config { 'eth1':
    ensure    => 'present',
    family    => 'inet',
    ipaddress => '192.168.50.2',
    method    => 'static',
    netmask   => '255.255.255.0',
    onboot    => 'true',
  }
 
}
 
root@ubuntu:/vagrant/puppet/manifests# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:d2:e8:7b  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fed2:e87b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19865 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10612 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10252479 (10.2 MB)  TX bytes:1024905 (1.0 MB)
 
eth1      Link encap:Ethernet  HWaddr 08:00:27:9f:a6:0f  
          inet addr:192.168.50.2  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe9f:a60f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1403 errors:0 dropped:0 overruns:0 frame:0
          TX packets:695 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:273922 (273.9 KB)  TX bytes:125286 (125.2 KB)
 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:260 (260.0 B)  TX bytes:260 (260.0 B)
 
 
root@ubuntu:/vagrant/puppet/manifests# cat /etc/network/interfaces
# HEADER: This file is is being managed by puppet. Changes to
# HEADER: interfaces that are not being managed by puppet will persist;
# HEADER: however changes to interfaces that are being managed by puppet will
# HEADER: be overwritten. In addition, file order is NOT guaranteed.
# HEADER: Last generated at: Tue Nov 27 01:11:36 +0200 2012
 
 
# The following interfaces will be started on boot
auto eth0 eth1 lo
 
iface eth0 inet dhcp
allow-hotplug true
pre-up sleep 2
 
iface eth1 inet static
netmask 255.255.255.0
address 192.168.50.2
 
iface lo inet loopback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant