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

provider on CentOS 6 #135

Closed
lukebigum opened this issue Jan 28, 2016 · 1 comment
Closed

provider on CentOS 6 #135

lukebigum opened this issue Jan 28, 2016 · 1 comment

Comments

@lukebigum
Copy link
Contributor

Following on from the second issue reported in #129, I'm modifying the redhat network_config provider to work on CentOS 6. I've ran into an issue where parameters that are undef in a Puppet manifest are being written to disk as "KEY=absent". The issue is reproduced in an acceptance test I've added to https://github.com/lukebigum/puppet-network:

git clone git@github.com:lukebigum/puppet-network.git
cd puppet-network
ln -s centos-65-x64.yml spec/acceptance/nodesets/default.yml
bundle exec rake acceptance

And an example of the failed test:

  1. network building various network configurations File "/etc/sysconfig/network-scripts/ifcfg-eth0" content should not match /^IPADDR=/
    Failure/Error: its(:content) { should_not match /^IPADDR=/ }
    expected "ONBOOT=yes\nslave=yes\nIPADDR=absent\nDEVICE=eth0\nNETMASK=absent\nHOTPLUG=yes\nmaster=bond0\nMTU=absent\ntype=Ethernet\nBOOTPROTO=static\n" not to match /^IPADDR=/
    Diff:
    @@ -1,2 +1,11 @@
    -/^IPADDR=/
    +ONBOOT=yes
    +slave=yes
    +IPADDR=absent
    +DEVICE=eth0
    +NETMASK=absent
    +HOTPLUG=yes
    +master=bond0
    +MTU=absent
    +type=Ethernet
    +BOOTPROTO=static

I can fudge it by explicitly filtering out "value != :absent", however there is another issue where the puppet type is not idempotent (continually applies) so I think there is something lower down interfering with the provider reading and writing Type parameters properly.

Is anyone able to assist?

@lukebigum
Copy link
Contributor Author

#136 now has the code to fix this.

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

1 participant