Ask Your Question
0

cannot load puppet_x/eos/utils/helpers

asked 2016-08-29 18:12:32 -0500

tomas gravatar image

Hi all

I am a network engineer trying to learn puppet playing with Arista switches so I am quite newbie here.

I have installed the puppet entreprise agent and rbeapi into my virtual EOS switch following some internet guides:

veos1#show extensions
Name Version/Release Status extension
puppet-agent-1.5.2-1.eos4.i386.swix 1.5.2/1.eos4 A, I 1
rbeapi-puppet-aio-0.5.1-1.swix 0.5.1/1.eos4 A, I 4
A: available | NA: not available | I: installed | NI: not installed | F: forced
veos1#
veos1#show version
Arista vEOS
...
Software image version: 4.14.9.1M
Architecture: i386
Internal build version: 4.14.9.1M-2777182.41491M
Internal build ID: 3e3af617-163c-4ee5-b090-6645a34f707d
Uptime: 15 minutes
Total memory: 1473728 kB
Free memory: 69380 kB
veos1#
....
-bash-4.1# puppet -V
4.5.2
-bash-4.1#

My puppet master is a debian stretch/sid VM using Puppet Open Source:

root@puppetmaster:~# puppet -V
4.6.0
root@puppetmaster:~#

I managed to get the veos registered in the puppetmaster and started to play with different eos resources.

root@puppetmaster:/etc/puppet/code/environments/production/manifests# cat site.pp
node 'veos1.thomarite.org' {
file { '/tmp/tomas-test':
ensure => 'file',
}

eosvlan { '30'
: ensure => 'present',
enable => 'true',
vlan
name => 'TEST-v30',
}
eosvlan { '10'
: ensure => 'present'
, enable => 'true',
vlan
name => 'TEST-v10',
}
eosinterface { 'Vlan10':
ensure => 'present',
enable => 'true',
}
eos
ipinterface { 'Vlan10':
ensure => 'present',
address => '10.10.10.1/24',
mtu => '1500',
}
}
root@puppetmaster:/etc/puppet/code/environments/production/manifests#

I have managed to create vlans, interfaces fine but I fail trying to create an IP interface using resource eos_ipinterface. This is the error I see:

-bash-4.1# puppet agent -t --noop
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement,
Could not autoload puppet/type/eosipinterface: cannot load such file -- puppetx/eos/utils/helpers at
/etc/puppet/code/environments/production/manifests/site.pp:20:3 on node veos1.thomarite.org
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
-bash-4.1#

It seems it is path issue in my Debian puppet master. Initially, I had problems to make the veos to register and sync the plugins, but got it "fixed" after creating some soft links. See below my puppet path variable and soft links in place.

root@puppetmaster:~# puppet config print | grep -i path
path = none
environmentpath = /etc/puppetlabs/code/environments
modulepath = /etc/puppetlabs/code/environments/production/modules:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
basemodulepath = /etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules
factpath = /opt/puppetlabs/puppet/cache/lib/facter:/opt/puppetlabs/puppet/cache/facts
root@puppetmaster:~#

root@puppetmaster:/etc/puppetlabs/code/environments/production# ls -ltr
total 4
lrwxrwxrwx 1 root root 24 Aug 26 18:20 modules -> /etc/puppet/code/modules
drwxr-xr-x 2 root root 4096 Aug 29 23:26 manifests
root@puppetmaster:/etc/puppetlabs/code/environments/production#

root@puppetmaster:/etc/puppet/code/environments/production# ls ... (more)

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted
0

answered 2016-09-26 17:35:19 -0500

tomas gravatar image

Hi all

Unfortunately, I am getting nowhere. I created a new Debian VM from scratch, installed Puppet Open source, Arista modules and still getting the same issue. I ran "strace" for the puppet process to check where is trying to find the files and doesnt go to the path where the "missing" file is kept although the path variable looks correct.

Is there somebody trying to use Open source Puppet to manage Arista switches? What is anybody else using? I will try again with a Centos 7 vm.

Any advise is really appreciated.

Thanks

edit flag offensive delete link more
0

answered 2016-09-02 10:59:31 -0500

tomas gravatar image

Hi Jerearista

Sorry, I forgot to mention that it works locally on the switch.. I will check tonight the paths from home.

Thanks!

edit flag offensive delete link more
0

answered 2016-09-01 02:59:00 -0500

tomas gravatar image

updated 2016-09-01 18:51:59 -0500

Hi

Sorry, I forgot to mention that it works locally in the switch. Will check tonight in my VMs the paths you mention.

Thanks!


I have checked my puppetmaster VM and I am seeing a clear difference:

root@puppetmaster:~# find / | grep -i '\/helpers.rb'
/var/lib/gems/2.3.0/gems/rspec-core-3.0.4/lib/rspec/core/formatters/helpers.rb
/var/lib/gems/2.3.0/gems/guard-2.14.0/lib/guard/internals/helpers.rb
/var/lib/gems/2.3.0/gems/pry-0.10.4/lib/pry/helpers.rb
/etc/puppetlabs/code/modules/eos/lib/puppet_x/eos/utils/helpers.rb
root@puppetmaster:~#

I have tried to create a soft link just in case but it doesnt make any difference as I am seeing exactly the same error reported before

root@puppetmaster:/opt/puppetlabs/puppet/cache# tree
.
├── facts.d
├── lib -> /etc/puppetlabs/code/environments/production/modules/eos/lib
├── lib-orig
├── preview
├── puppet-module
└── state

6 directories, 0 files
root@puppetmaster:/opt/puppetlabs/puppet/cache#

Not sure what I have done wrong while building the puppetmaster.... I started with a fresh installation of puppetmaster package in the Debina VM. Will try again to rebuild or try CentOS.

edit flag offensive delete link more

Comments

That symlink is not what you want. For some reason your puppet server is not caching all of the plugins for types/providers within modules. It is that process that populates the cache directory which will contain code mixed in from many different modules. Check that pluginsync is enabled.

jerearista gravatar imagejerearista ( 2016-09-02 05:32:36 -0500 )edit

Thanks, will check again and let you know.

tomas gravatar imagetomas ( 2016-09-02 11:00:07 -0500 )edit

It seems I've got enabled pluginsync: root@puppetmaster:/etc/puppetlabs# puppet master --configprint pluginsync true root@puppetmaster:/etc/puppetlabs#

tomas gravatar imagetomas ( 2016-09-03 03:16:57 -0500 )edit

Well, it is clear I am doing something wrong installing the puppet server. I have created a new puppet master (open source version) based on centos 6.8. My veos can sync again all EOS modules from the new master. But I've got the same issue as with the Debian puppet-master.

tomas gravatar imagetomas ( 2016-09-04 18:47:37 -0500 )edit

[root@puppetmaster2 manifests]# find / | grep -i '\/helpers.rb'
/etc/puppetlabs/code/environments/production/modules/eos/lib/puppet_x/eos/utils/helpers.rb
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/rpc/helpers.rb
[root@puppetmaster2 manifests]#

tomas gravatar imagetomas ( 2016-09-04 18:48:11 -0500 )edit
0

answered 2016-08-31 10:11:57 -0500

Does that work correctly, locally, on the switch?

puppet apply -e "eos_ipinterface {'Vlan10': ensure => present, address => '10.10.10.1/24', mtu => '1500', }" --noop
Notice: Compiled catalog for jere-debug-agent1.example.com in environment production in 0.09 seconds
Notice: /Stage[main]/Main/Eos_ipinterface[Vlan10]/ensure: current_value absent, should be present (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Applied catalog in 0.52 seconds

or

puppet apply /mnt/flash/manifest.pp --noop

On my puppet master, I have that file in the following locations:

/opt/puppetlabs/puppet/cache/lib/puppet_x/eos/utils/helpers.rb
/etc/puppetlabs/code/environments/production/modules/eos/lib/puppet_x/eos/utils/helpers.rb
edit flag offensive delete link more

Comments

Hi Jerearista How did you configure your puppet server? which version are you using? centos/debian? The result should be the same but just not able to work out what I am doing wrong

tomas gravatar imagetomas ( 2016-09-06 04:46:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-08-29 18:12:32 -0500

Seen: 52 times

Last updated: Sep 26 '16