Jira (PUP-10319) puppet_gem package provider ensure => absent breaks subsequent File resources

15 views
Skip to first unread message

Alexander Fisher (Jira)

unread,
Feb 28, 2020, 6:36:04 AM2/28/20
to puppe...@googlegroups.com
Alexander Fisher created an issue
 
Puppet / Bug PUP-10319
puppet_gem package provider ensure => absent breaks subsequent File resources
Issue Type: Bug Bug
Affects Versions: PUP 6.13.0
Assignee: Unassigned
Created: 2020/02/28 3:35 AM
Priority: Normal Normal
Reporter: Alexander Fisher

Puppet Version: 6.13.0
Puppet Server Version: 6.8.0
OS Name/Version: RHEL 7

Gems can be installed into the puppet agent's ruby environment for use in providers etc.
When they're no longer required, it should be possible to remove them.
eg.

package { 'redis_gem':
  ensure => absent,
  name   => 'redis',
  provider => 'puppet_gem',
}

Whilst the puppet_gem provider does successfully uninstall the gem, subsequent File/Concat resources fail. (I imagine other stuff might fail too, but this was the first thing I hit)

Info: Applying configuration version 'puppet6server1-redis_gem_test-79e063b8d35'
Notice: /Stage[main]/Profile::Redis_keepalived/Package[redis gem]/ensure: removed (corrective)
Notice: /Stage[main]/Keepalived::Config/Concat[/etc/keepalived/keepalived.conf]/File[/etc/keepalived/keepalived.conf]/content: 
--- /etc/keepalived/keepalived.conf	2020-02-28 11:27:08.821195162 +0000
+++ /tmp/puppet-file20200228-21277-1uxs10h	2020-02-28 11:28:30.905963796 +0000
@@ -1,4 +1,4 @@
-## Managed by Puppet
+# Managed by Puppet
 vrrp_script check_redis {
   script    "/usr/libexec/keepalived/check_redis.sh"
   interval  2
 
Info: Computing checksum on file /etc/keepalived/keepalived.conf
Error: Could not back up /etc/keepalived/keepalived.conf: pid: 21277 nil spec! included in [#<Gem::StubSpecifi...
--- SNIP --- (The array printed is ~150KB long, so I've not included it here and continue with the stack trace)
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/specification.rb:743:in `_all'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/specification.rb:1153:in `latest_specs'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/rubygems.rb:44:in `directories'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:142:in `gem_directories'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:172:in `search_directories'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:98:in `get_file'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:62:in `load_file'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/autoload.rb:201:in `load'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/instance_loader.rb:51:in `loaded_instance'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/terminus.rb:112:in `terminus_class'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:366:in `make_terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:140:in `terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/file_bucket_file/selector.rb:16:in `get_terminus'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/file_bucket_file/selector.rb:20:in `head'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:260:in `head'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/file_bucket/dipper.rb:48:in `backup'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/backups.rb:82:in `backup_file_with_filebucket'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/backups.rb:28:in `perform_backup_with_bucket'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/backups.rb:15:in `perform_backup'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:1024:in `backup_existing'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:761:in `remove_existing'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb:888:in `write'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/data_sync.rb:93:in `contents_sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/content.rb:136:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:241:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:136:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:90:in `block in perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:89:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:89:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:267:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:287:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:191:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:122:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:178:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:240:in `block (2 levels) in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:161:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:187:in `block (2 levels) in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:521:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:520:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:233:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:394:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:235:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:289:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:212:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:59:in `block (5 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:58:in `block (4 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:52:in `block (3 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:130:in `with_client'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:49:in `block (2 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:87:in `run_in_fork'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:48:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:46:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:410:in `onetime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:370:in `block in run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:289:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:368:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:710:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Alexander Fisher (Jira)

unread,
Feb 28, 2020, 6:42:03 AM2/28/20
to puppe...@googlegroups.com
Alexander Fisher commented on Bug PUP-10319
 
Re: puppet_gem package provider ensure => absent breaks subsequent File resources

I'm having trouble reproducing this using puppet apply, but can reproduce it every time with puppet agent.  On the next puppet run (if I don't reinstall the gem manually to test), the puppet run works fine.  But I'm not running puppet as a daemon.  Perhaps if I was, it would continue to be broken until restarted.

Gheorghe Popescu (Jira)

unread,
Mar 26, 2020, 4:48:04 AM3/26/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:43:02 PM3/31/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:43:04 PM3/31/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:44:03 PM3/31/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:45:04 PM3/31/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: The puppet_gem provider can now uninstall a gem during an agent run

Josh Cooper (Jira)

unread,
Apr 1, 2020, 1:55:03 PM4/1/20
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Apr 6, 2020, 9:41:03 AM4/6/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages