[Puppet Users] Re: Trouble after Agent upgrade -- Error: Could not autoload puppet/provider/package/gem: superclass must be a Class (Module given)

2019-06-20 Thread Charlie Sharpsteen
Could you post the content of package_provider.rb? Since that is in 
cache/lib/facter, it is a custom fact and the specifics of its 
implementation could shed some light on what is happening.

-Charlie


On Thursday, June 20, 2019 at 1:53:34 PM UTC-7, Patrick Whitney wrote:
>
> Hello Everyone,
>
> I hope you can help.
>
> Our puppet agent was updated to version 6.5.0 on our servers last night.  
> Things are working fine, except for two servers are throwing the error 
> below (SNIP #1).A little digging found I could reproduce the error by 
> running 'facter -p' or 'puppet facts'  (SNIP #2).  Trying to identify 
> exactly what is going on, I got as far as running the offending ruby script 
> (package_provider.rb) and it also returns the error, but, at least with a 
> stack trace (SNIP #3).  
>
> Does anyone have any idea what we've encountered?  
>
> Any help would be greatly appreciated. 
>
> Thanks!
> -Pat
>
>
>
> SNIP #1
>
> # puppet agent -t
> Info: Using configured environment 'production'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Retrieving locales
> Info: Loading facts
> Error: Could not autoload puppet/provider/package/gem: superclass must be 
> a Class (Module given)
> Error: Facter: error while resolving custom facts in /opt/puppetlabs/
> puppet/cache/lib/facter/package_provider.rb: Could not autoload puppet/
> provider/package/gem: superclass must be a Class (Module given)
> Info: Caching catalog for eu-assist.aws-eu.int.luminoso.com
> Info: Applying configuration version '1561063233'
> Notice: Applied catalog in 15.24 seconds
>
>
> SNIP #2
> # puppet facts > /dev/null
> Error: Could not autoload puppet/provider/package/gem: superclass must be 
> a Class (Module given)
> Error: Facter: error while resolving custom facts in /opt/puppetlabs/
> puppet/cache/lib/facter/package_provider.rb: Could not autoload puppet/
> provider/package/gem: superclass must be a Class (Module given)
> # facter -p > /dev/null
> 2019-06-20 20:42:36.539351 ERROR puppetlabs.facter - error while 
> resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/
> package_provider.rb: Could not autoload puppet/provider/package/gem: 
> superclass must be a Class (Module given)
>
> SNIP #3
> # /opt/puppetlabs/puppet/bin/ruby 
> /opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb
> Traceback (most recent call last):
>  15: from /opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb:11:
> in `'
>  14: from 
> /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
>  
> `require'
>  13: from 
> /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
>  
> `require'
>  12: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.
> rb:9:in `'
>  11: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:10:in `
> '
>  10: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/metatype/manager.rb:127:in 
> `newtype'
>  9: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.
> rb:215:in `loadall'
>  8: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:79:in `
> loadall'
>  7: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:79:in 
> `each'
>  6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.
> rb:81:in `block in loadall'
>  5: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:66:in `
> load_file'
>  4: from 
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:66:in 
> `load'
>  3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/
> package/gem.rb:1:in `'
>  2: from 
> /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
>  
> `require'
>  1: from 
> /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
>  
> `require'
> /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/
> package_targetable.rb:23:in `': Could not autoload 
> puppet/provider/package/gem: superclass must be a Class (Module given) 
> (Puppet::Error)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ee5c8fe3-61ed-47f5-b6da-cf1d771790b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Trouble after Agent upgrade -- Error: Could not autoload puppet/provider/package/gem: superclass must be a Class (Module given)

2019-06-20 Thread Patrick Whitney
Hello Everyone,

I hope you can help.

Our puppet agent was updated to version 6.5.0 on our servers last night.  
Things are working fine, except for two servers are throwing the error 
below (SNIP #1).A little digging found I could reproduce the error by 
running 'facter -p' or 'puppet facts'  (SNIP #2).  Trying to identify 
exactly what is going on, I got as far as running the offending ruby script 
(package_provider.rb) and it also returns the error, but, at least with a 
stack trace (SNIP #3).  

Does anyone have any idea what we've encountered?  

Any help would be greatly appreciated. 

Thanks!
-Pat



SNIP #1

# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not autoload puppet/provider/package/gem: superclass must be a 
Class (Module given)
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/
cache/lib/facter/package_provider.rb: Could not autoload puppet/provider/
package/gem: superclass must be a Class (Module given)
Info: Caching catalog for eu-assist.aws-eu.int.luminoso.com
Info: Applying configuration version '1561063233'
Notice: Applied catalog in 15.24 seconds


SNIP #2
# puppet facts > /dev/null
Error: Could not autoload puppet/provider/package/gem: superclass must be a 
Class (Module given)
Error: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/
cache/lib/facter/package_provider.rb: Could not autoload puppet/provider/
package/gem: superclass must be a Class (Module given)
# facter -p > /dev/null
2019-06-20 20:42:36.539351 ERROR puppetlabs.facter - error while resolving 
custom facts in /opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb: 
Could not autoload puppet/provider/package/gem: superclass must be a Class (
Module given)

SNIP #3
# /opt/puppetlabs/puppet/bin/ruby 
/opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb
Traceback (most recent call last):
 15: from /opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb:11:in 
`'
 14: from 
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in 
`require'
 13: from 
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in 
`require'
 12: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb
:9:in `'
 11: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:10:in `<
module:Puppet>'
 10: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/metatype/manager.rb:127:in 
`newtype'
 9: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb
:215:in `loadall'
 8: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:79:in `
loadall'
 7: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:79:in 
`each'
 6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb
:81:in `block in loadall'
 5: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:66:in `
load_file'
 4: from 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:66:in 
`load'
 3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package
/gem.rb:1:in `'
 2: from 
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in 
`require'
 1: from 
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in 
`require'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/
package_targetable.rb:23:in `': Could not autoload 
puppet/provider/package/gem: superclass must be a Class (Module given) 
(Puppet::Error)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0eb0ebaa-4998-4eb6-9aa9-750b74cf50e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] stdlib module causes puppet failure

2019-06-20 Thread Michael Watters
I'm having an issue with the puppetlabs-stdlib module causing compilation 
failures using the puppet apply command.  

> Error: Class 'stdlib' is already defined (file: 
/mnt/live/puppeteer/conf.d/puppet/modules/stdlib/manifests/init.pp, line: 
16); cannot redefine (file: 
/mnt/live/puppeteer/conf.d/puppet/modules/stdlib/manifests/init.pp, line: 
16) on node host.example.com

The command used to apply our manifest is as follows.

puppet apply -d --noop --modulepath=puppet/modules --hiera_config=hiera.yaml 
./



This node is running Fedora 29 with the puppet-headless package.  No 
changes have been made to the manifest and I'm able to apply the same code 
on other nodes with an older version of puppet.  Does anybody know how to 
resolve this or what would cause puppet to include the same class twice?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e93ac4af-6e04-4aae-96dc-0362b4290f50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet does not recognize bind mounts

2019-06-20 Thread Michael Watters
Thanks.  I believe the issue may be that we are bind mounting paths that 
are bind mounts themselves.  I found another way to accomplish what I need 
using file_line resources so everything is mounted when the system boots.


On Tuesday, June 11, 2019 at 4:33:42 AM UTC-4, Bart-Jan Vrielink wrote:
>
> Hello,
>
>
> I'm unable to reproduce this behavior. To see about which mounts Puppet 
> knows about, use 'puppet resource mount' or 'puppet resource mount 
> /pub/fedora/site/candidates/30'
>
>
> # puppet resource mount /mnt/home
> mount { '/mnt/home':
>   ensure  => 'mounted',
>   device  => '/home',
>   dump=> '0',
>   fstype  => 'none',
>   options => 'rw,bind,seclabel,relatime,errors=remount-ro',
>   pass=> '0',
>   target  => '/etc/fstab',
> }
>
>
> -Original message-
> *From:* Michael Watters >
> *Sent:* Friday 7th June 2019 16:02
> *To:* Puppet Users >
> *Subject:* [Puppet Users] Puppet does not recognize bind mounts
>
> I'm having an issue with puppet repeatedly attempting to mount resources 
> which are configured as bind mounts on one of my nodes.  Here is a copy of 
> the relevant lines from my manifest. 
>
> $koji_fedora_releases = ['28', '29', '30']
>
> $koji_fedora_releases.each |$release| {
> ['released', 'testing'].each |$tag| {
> mount { "/pub/fedora/org/${tag}/${release}":
> ensure => mounted,
> device => 
> "/storage/projects/koji/repos-dist/aos-${release}-${tag}/latest",
> fstype => 'none',
> options => 'rw,bind',
> }
> }
> }
>
> The agent is able to successfully apply these resources however it 
> attempts to remount the directories every time that puppet runs.  For 
> example, here is the output on the agent side.
>
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/candidates/30]/ensure: 
> current_value unmounted, should be mounted (noop)
> Info: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/candidates/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/candidates/30]
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/candidates/30]: 
> Would have triggered 'refresh' from 1 events
> Info: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/candidates/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/candidates/30]
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/released/30]/ensure: 
> current_value unmounted, should be mounted (noop)
> Info: /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/released/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/released/30]
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/released/30]: Would 
> have triggered 'refresh' from 1 events
> Info: /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/released/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/released/30]
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/testing/30]/ensure: 
> current_value unmounted, should be mounted (noop)
> Info: /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/testing/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/testing/30]
> Notice: 
> /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/testing/30]: Would 
> have triggered 'refresh' from 1 events
> Info: /Stage[main]/Site::Fileserver01/Mount[/pub/fedora/site/testing/30]: 
> Scheduling refresh of Mount[/pub/fedora/site/testing/30]
>
> These lines are repeated for each bind mount resource.
>
> How does puppet actually verify that a device is mounted?  The source 
> directories *are* mounted and I'm able to access data in each directory 
> without an issue.
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/198a335b-9582-4053-ae52-50cc15bf02b1%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3c8a0a35-c890-4762-a01d-1a8633ab6e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] fips and non fips agent rpms

2019-06-20 Thread 'slig...@verizon.net' via Puppet Users
Hello,

We are using some fips and some non-fips agent. Proper agent rpm (fips or 
non fips based on current configuration) has been installed, however, after 
agent installation, if we were to update a agent from fips to non-fips or 
vice-a-verse, will the old agent rpm still function? Just running puppet 
agent -t seems to be working , but in that case not sure what is different 
between fips and non-fips agent?

Thanks

M

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/59879625-fca7-4696-997a-ce4d598da63e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Sensitive type?

2019-06-20 Thread Jason McMahan
Good day,
We were attempting to secure passwords appearing in files.
In the node manifest we changed

$password = lookup("user_cred.${username}.${domain_lookup}.password"))
to 
$password = Sensitive(lookup(
"user_cred.${username}.${domain_lookup}.password"))

In the resources file it correctly redacted the password, but when i open

C:\ProgramData\PuppetLabs\puppet\var\client_data\catalog\.json 

It shows the password in plain text under the section 
/etc/puppetlabs/code/environments/sensitive/site/profile/manifests/windows/domain/join.pp

but still redacted under the section

/etc/puppetlabs/code/environments/sensitive/modules/domain_membership/manifests/init.pp

How can redact the password in all locations?

Any help is greatly appreciated, thank you very much.

Jason

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ed5873cf-a60b-4b66-b3f2-ad7f7714f9c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.