Re: [Puppet-dev] Puppet Network Devices...

45 views
Skip to first unread message

Nan Liu

unread,
Nov 12, 2012, 1:05:03 PM11/12/12
to puppet-dev
On Wed, Nov 7, 2012 at 8:43 AM, Gavin Williams <fatm...@gmail.com> wrote:
Afternoon all

I've been posting about this subject in Puppet Users, but thought it might be worth me posting here as it doesn't look like many users are actually using the Network Device functionality yet...

Basically, I'm trying to add support for NetApp filers as a Puppet Network Device...
I think I've made some pretty good progress, in that I've managed to successfully connect to our NetApp simulator, retrieve a load of facts which can be used down the line, and also today managed to successfully create/destroy volumes on the simulator using Puppet...

However following that brief period of success, I seem to have taken a step backwards :(

I've basically copied the type and provider for netapp_volume to create a netapp_qtree equivalent, tweaking as required.
It seems that running either the netapp_volume or netapp_qtree against an individual node works most of the time.
However when I try and combine the 2, I start seeing random errors such as:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/netapp_volume: Could not autoload puppet/provider/netapp_volume/netapp_volume: uninitialized constant Puppet::Util::NetworkDevice on node actint-star-nactl01



You can see the work around here: 

You can try exporting rubylib and if the problem is resolved before updating your code:

export RUBYLIB=path/to/netapp/lib
puppet device ... 

You have a line:
require 'puppet/util/network_device/netapp/NaServer'
 
Where's NaServer?


 My node config looks like:
 
node 'actint-star-nactl01' {

        # Testing qtree creation
        netapp_qtree { 'q_puppet_test1':
                ensure => present,
                volume => 'v_puppet_test',
                require => Netapp_volume['v_puppet_test1']
        }

        netapp_volume { 'v_puppet_test1':
                ensure => present,
                initsize => "1t",
                aggregate => "aggr01",
                spaceres => "none",
        }
}

The other challenge I seem to be hitting is that despite dropping resources from the manifest, they're still being queried as part of the puppet device run... I guess this could be due to the fact that Puppet is failing to download a catalogue at runtime, so is falling back to a cached version?

Puppet option --test is suppose to enable --no-usecacheonfailure. I would suggest to make things easier, comment out apply_to_device in the resource type, and start with puppet apply with a hard coded device connectivity and skip the puppet device -> puppet master part until you have completed most of the development.

Thanks,

Nan

Gavin Williams

unread,
Nov 13, 2012, 4:10:18 AM11/13/12
to puppe...@googlegroups.com
Nan

Cheers for the response.

However as it took soo long for this post to get onto the Puppet Developers list, I dropped into #puppet-dev on IRC, and with some assistance from Dominic managed to resolve the issue...

He identified that I was missing a couple of requires for Puppet::Provider and Puppet::Util::Network_device. Added those in, and it's now running as expected.
The thought behind the intermittent issue was that I've also been testing the f5 network device support, which depending on device run order may load the required libs into memory ahead of the netapp device... However if the NetApp device runs first, it's missing the required libs.

To answer your other question, NaServer is the NetApp Ruby library. Unfortunately it's not re-distributable, so cant include it in Git. However will include instructions on where to get it, and where to put it within the readme.

Regards
Gavin

Dawn Foster

unread,
Nov 13, 2012, 1:04:22 PM11/13/12
to puppet-dev
On Tue, Nov 13, 2012 at 1:10 AM, Gavin Williams <fatm...@gmail.com> wrote:
> Nan
>
> Cheers for the response.
>
> However as it took soo long for this post to get onto the Puppet Developers
> list, I dropped into #puppet-dev on IRC, and with some assistance from
> Dominic managed to resolve the issue...

Sorry about that. Your post was trapped in the moderation queue while
I was traveling internationally at LinuxCon. I didn't realize that no
one else was watching the queue while I was gone :)

I'll try to make sure someone keeps a closer watch on it next time.

For anyone else, if your post isn't hitting one of our mailing lists,
ping someone with IRC op access in #puppet, ping your favorite person
at Puppet Labs, or ping me on IRC, and we'll make sure it gets pushed
out.

Dawn

James Turnbull

unread,
Nov 13, 2012, 11:38:14 PM11/13/12
to puppe...@googlegroups.com
Yeah this is Nigel being sick, me being on AEST and Dawn being on the
road and others being flat out. We'll expand the pool a bit more to make
sure we don't have things in moderation for too long!

Sorry!

James


--
James Turnbull
Puppet Labs
1-503-734-8571
To schedule a meeting with me: http://doodle.com/jamtur01

Gavin Williams

unread,
Nov 14, 2012, 4:04:27 AM11/14/12
to puppe...@googlegroups.com
No worries, cheers for the response.

Will remember that trick for future... ;)

Cheers
Gav
Reply all
Reply to author
Forward
0 new messages