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

Bogus error - Could not evaluate: Unable to support multiple interfaces in a single file #38

Closed
ddcrjlalumiere opened this issue May 20, 2013 · 13 comments

Comments

@ddcrjlalumiere
Copy link

OS: CentOS 6.3
Puppet version (client): 2.7.17
Puppet version (master): 3.0.0
puppet-network version: 0.4.0

I got the following error in my Puppet logs, but the interface is only defined once in the manifest. This is an intermittent error, it does not occur in a reproducible fashion AFAICT.

Sun May 19 03:39:24 +0000 2013 /Network_config[lo:6] (err): Could not evaluate: Unable to support multiple interfaces [lo:6,lo:6] in a single file /etc/sysconfig/network-scripts/ifcfg-lo:6

After which a new error popped up (although the odd "method static->loopback" behavior always happens even on "clean" runs):

Sun May 19 04:09:24 +0000 2013 /Network_config[lo:6]/method (notice): method changed 'static' to 'loopback'
Sun May 19 04:09:24 +0000 2013 Puppet::Type::Network_config::ProviderRedhat (err): redhat is in an error state, refusing to flush file /etc/sysconfig/network-scripts/ifcfg-lo:6

Here's the manifest that is generating the ifcfg files.

class proxy::dev {

  network_config { 'lo:1':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.18',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
    }

  network_config { 'lo:2':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.19',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

  network_config { 'lo:3':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.20',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

  network_config { 'lo:4':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.21',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

  network_config { 'lo:5':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.22',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

  network_config { 'lo:6':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.23',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

  network_config { 'lo:7':
    ensure      => 'present',
    family      => 'inet',
    method      => 'loopback',
    ipaddress   => '10.12.16.24',
    netmask     => '255.255.255.255',
    onboot      => 'true',
    reconfigure => 'true',
  }

}

The ifcfg files created all look identical except for the fourth octet of the IP and the virtual interface identifier:

IPADDR=10.12.16.##
DEVICE=lo:#
ONBOOT=yes
BOOTPROTO=loopback
HOTPLUG=yes
NETMASK=255.255.255.255
@ericsakowski
Copy link
Contributor

This sounds like #36, the fix for which was merged yesterday afternoon. Check your network-scripts directory for ifcfg-*.bak or ~ or .swp files, etc. Updating to the latest revision should get rid of this error.

@ddcrjlalumiere
Copy link
Author

Turns out this is slightly reproducible, it seems to happen the second run after the daemon is started; but not if the daemon is restarted by hand before before the normal splay time.

Check your network-scripts directory for ifcfg-*.bak or ~ or .swp files, etc.

None there, only the desired configurations.

$ sudo ls -1a /etc/sysconfig/network-scripts/*ifcfg*
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network-scripts/ifcfg-lo
/etc/sysconfig/network-scripts/ifcfg-lo:1
/etc/sysconfig/network-scripts/ifcfg-lo:2
/etc/sysconfig/network-scripts/ifcfg-lo:3
/etc/sysconfig/network-scripts/ifcfg-lo:4
/etc/sysconfig/network-scripts/ifcfg-lo:5
/etc/sysconfig/network-scripts/ifcfg-lo:6
/etc/sysconfig/network-scripts/ifcfg-lo:7

Updating to the latest revision should get rid of this error.

I'll give it a try and report back. Thanks.

@ericsakowski
Copy link
Contributor

FWIW after adding a missing } for 'lo:1': to proxy::dev I get all the interfaces without any errors reported:
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:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3821 (3.7 KiB) TX bytes:3821 (3.7 KiB)

lo:1 Link encap:Local Loopback
inet addr:10.12.16.18 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:2 Link encap:Local Loopback
inet addr:10.12.16.19 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:3 Link encap:Local Loopback
inet addr:10.12.16.20 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:4 Link encap:Local Loopback
inet addr:10.12.16.21 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:5 Link encap:Local Loopback
inet addr:10.12.16.22 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:6 Link encap:Local Loopback
inet addr:10.12.16.23 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

lo:7 Link encap:Local Loopback
inet addr:10.12.16.24 Mask:255.255.255.255
UP LOOPBACK RUNNING MTU:16436 Metric:1

@ddcrjlalumiere
Copy link
Author

FWIW after adding a missing } for 'lo:1': to proxy::dev I get all the interfaces without any errors reported:

Sorry about that, copy and paste error, the actual manifest has the closing brace. Updated the description.

@ddcrjlalumiere
Copy link
Author

After updating to commit 48e71d1 version I'm seeing this in the logs (sorry for the multiple runs, had trouble importing it completely at first):

[Tue May 21 14:37:49 +0000 2013 Puppet (notice): Starting Puppet client version 2.7.17
Tue May 21 14:37:50 +0000 2013 /File[/var/lib/puppet/lib/puppet/provider/network_config/redhat.rb]/content (notice): content changed '{md5}fd7b4d67c097907160b41a1d058b3b55' to '{md5}2c88ca7f72e13453ae62be8256b85181'
Tue May 21 14:37:55 +0000 2013 Puppet (err): Could not prefetch network_config provider 'redhat': No resource and no name in property hash in redhat instance
Tue May 21 14:37:55 +0000 2013 /Network_config[lo:6]/ensure (notice): created
Tue May 21 14:37:55 +0000 2013 /Network_config[lo:6] (err): Could not evaluate: No resource and no name in property hash in redhat instance
Tue May 21 14:37:55 +0000 2013 /Network_config[lo:3]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:37:59 +0000 2013 /Network_config[lo:1]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:37:59 +0000 2013 /Network_config[lo:2]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:38:00 +0000 2013 /Network_config[lo:7]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:38:05 +0000 2013 /Network_config[lo:5]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:38:06 +0000 2013 /Network_config[lo:4]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 14:38:06 +0000 2013 Puppet (notice): Finished catalog run in 13.60 seconds
Tue May 21 15:03:13 +0000 2013 Puppet (notice): Starting Puppet client version 2.7.17
Tue May 21 15:03:14 +0000 2013 /File[/var/lib/puppet/lib/puppet/parser/functions/compact_hash.rb]/ensure (notice): defined content as '{md5}6e141a3652e3a6791a4974b1858397a1'
Tue May 21 15:03:14 +0000 2013 /File[/var/lib/puppet/lib/facter/network.rb]/ensure (notice): defined content as '{md5}c2962f5830469464ee403224ae8762c0'
Tue May 21 15:03:21 +0000 2013 Puppet (err): Could not prefetch network_config provider 'redhat': No resource and no name in property hash in redhat instance
Tue May 21 15:03:21 +0000 2013 /Network_config[lo:6]/ensure (notice): created
Tue May 21 15:03:21 +0000 2013 /Network_config[lo:6] (err): Could not evaluate: No resource and no name in property hash in redhat instance
Tue May 21 15:03:21 +0000 2013 /Network_config[lo:3]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:24 +0000 2013 /Network_config[lo:1]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:24 +0000 2013 /Network_config[lo:2]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:25 +0000 2013 /Network_config[lo:7]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:29 +0000 2013 /Network_config[lo:5]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:30 +0000 2013 /Network_config[lo:4]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Tue May 21 15:03:30 +0000 2013 Puppet (notice): Finished catalog run in 13.38 seconds

Not sure why it is trying to create the interfaces as those files already exist from earlier Puppet runs:

$ sudo ls -1a /etc/sysconfig/network-scripts/*ifcfg-lo\:*
/etc/sysconfig/network-scripts/ifcfg-lo:1
/etc/sysconfig/network-scripts/ifcfg-lo:2
/etc/sysconfig/network-scripts/ifcfg-lo:3
/etc/sysconfig/network-scripts/ifcfg-lo:4
/etc/sysconfig/network-scripts/ifcfg-lo:5
/etc/sysconfig/network-scripts/ifcfg-lo:6
/etc/sysconfig/network-scripts/ifcfg-lo:7

@ericsakowski
Copy link
Contributor

I am not able to reproduce this...I'd restart puppet on master and node and then follow this snippet from the puppet-network README if you haven't already:

Note: you many also need to update your master's plugins (run on your puppet master):

puppet agent -t --noop

Or on puppet 2.7/3.x:

puppet plugin download

@adrienthebo
Copy link
Member

@ddcrjlalumiere to confirm, the existing contents of lo:6 were not different from the other loopback interfaces?

@ddcrjlalumiere
Copy link
Author

That's correct. Files have only been generated by this module and aside from the DEVICE and IPADDR lines all are identical. I don't have any clues as to why lo:6 gets special treatment :-/

$ sudo cat /etc/sysconfig/network-scripts/ifcfg-lo\:{1,6} | sort | uniq -c
      2 BOOTPROTO=loopback
      1 DEVICE=lo:1
      1 DEVICE=lo:6
      2 HOTPLUG=yes
      1 IPADDR=10.12.16.18
      1 IPADDR=10.12.16.23
      2 NETMASK=255.255.255.255
      2 ONBOOT=yes

I tried restarting the puppetmaster and ensured it had up to date plugins locally, to no avail.

@ericsakowski
Copy link
Contributor

As in issue 39, I was finally able to reproduce the 'Provider in an error state' by running a puppet 2.7 client against a puppet 3.0 master:

err: Could not prefetch network_config provider 'redhat': No resource and no name in property hash in redhat instance
notice: /Stage[main]/Profile::Proxy_dev/Network_config[lo:6]/ensure: created
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:6]: Could not evaluate: No resource and no name in property hash in redhat instance
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:3]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:1]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:2]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:7]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:5]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
err: /Stage[main]/Profile::Proxy_dev/Network_config[lo:4]/ensure: change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
notice: Finished catalog run in 0.18 seconds

@ericsakowski
Copy link
Contributor

ok that was a red herring...after all this i went back and tested 2.7 node on 2.7 master and still get the same 'error state' and prefetch errors.

@ddcrjlalumiere
Copy link
Author

I spun up a fresh client to run this manifest against and here's what I got in the logs, none of the interfaces were created:

Fri May 24 18:08:09 +0000 2013 Puppet (notice): Starting Puppet client version 2.7.17
Fri May 24 18:08:10 +0000 2013 /File[/var/lib/puppet/lib/puppet/provider/network_config/redhat.rb]/content (notice): content changed '{md5}fd7b4d67c097907160b41a1d058b3b55' to '{md5}2c88ca7f72e13453ae62be8256b85181'
Fri May 24 18:08:10 +0000 2013 /File[/var/lib/puppet/lib/puppet/parser/functions/compact_hash.rb]/ensure (notice): defined content as '{md5}6e141a3652e3a6791a4974b1858397a1'
Fri May 24 18:08:10 +0000 2013 /File[/var/lib/puppet/lib/facter/network.rb]/ensure (notice): defined content as '{md5}c2962f5830469464ee403224ae8762c0'
Fri May 24 18:08:10 +0000 2013 /File[/var/lib/puppet/lib/puppetx]/ensure (notice): created
Fri May 24 18:08:10 +0000 2013 /File[/var/lib/puppet/lib/puppetx/filemapper.rb]/ensure (notice): defined content as '{md5}461dbcb13325f04996f9ae5e0cea1406'
Fri May 24 18:08:17 +0000 2013 Puppet (err): Could not prefetch network_config provider 'redhat': No resource and no name in property hash in redhat instance
Fri May 24 18:08:17 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:6]/ensure (notice): created
Fri May 24 18:08:17 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:6] (err): Could not evaluate: No resource and no name in property hash in redhat instance
Fri May 24 18:08:17 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:3]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:27 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:1]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:27 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:2]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:34 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:7]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:40 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:5]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:41 +0000 2013 /Stage[main]/Proxy::Dev/Network_config[lo:4]/ensure (err): change from absent to present failed: Puppet::Type::Network_config::ProviderRedhat is in an error state
Fri May 24 18:08:41 +0000 2013 Puppet (notice): Finished catalog run in 28.55 seconds

Let me know if there's anything else it would be useful for me to try.

@adrienthebo
Copy link
Member

@ddcrjlalumiere I think that #40 might have fixed this, could you check the latest version of master and see if that resolves your issue?

@ddcrjlalumiere
Copy link
Author

Yes, the latest version of master seems to have made things happy. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants