Issue #9522 has been updated by Brice Figureau.

Nan Liu wrote:
> Patch provided:
> https://github.com/nanliu/puppet/tree/ticket/2.7.x/9522

I'm sorry, I also fixed this 3 days ago, check my patches for #9164 and #7982 
all in Pull request 113:
https://github.com/puppetlabs/puppet/pull/113

----------------------------------------
Bug #9522: Puppet Network device error handling and config parsing. 
https://projects.puppetlabs.com/issues/9522

Author: Nan Liu
Status: In Topic Branch Pending Merge
Priority: Normal
Assignee: 
Category: 
Target version: 2.7.x
Affected Puppet version: 2.7.3
Keywords: 
Branch: 


Discovered when working against F5. Puppet network config uses a custom error 
class that was not declared:

    /usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:68:in 
`parse': uninitialized constant 
Puppet::Util::NetworkDevice::Config::ConfigurationError (NameError)
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:46:in `each'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:46:in `parse'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:44:in `open'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:44:in `parse'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:35:in `read'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:28:in 
`initialize'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:7:in `new'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:7:in `main'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/util/network_device/config.rb:11:in `devices'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/device.rb:164:in 
`main'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:315:in 
`run_command'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:307:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in `hook'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:307:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:402:in 
`exit_on_fail'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:307:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in 
`execute'
        from /usr/bin/puppet:4

config.rb needs:

    class ConfigurationError < Puppet::Error; end

Also for the configuration - is rejected for hostnames: foo-bar.puppetlabs.lan 
is invalid, while foo.bar.puppetlabs.lan is ok:

    when /^\[([\w.]+)\]\s*$/ # [device.fqdn]


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to