Jira (PUP-11812) package provider puppet_gem uses deprecated rubygems v1 API (EOL 2023-04-10)

11 views
Skip to first unread message

David Hanisch (Jira)

unread,
Apr 3, 2023, 10:00:02 AM4/3/23
to puppe...@googlegroups.com
David Hanisch created an issue
 
Puppet / Bug PUP-11812
package provider puppet_gem uses deprecated rubygems v1 API (EOL 2023-04-10)
Issue Type: Bug Bug
Affects Versions: PUP 7.23.0
Assignee: Unassigned
Components: Types and Providers
Created: 2023/04/03 6:59 AM
Priority: Critical Critical
Reporter: David Hanisch

Puppet Version: 7.23.0
Puppet Server Version: 7.8.0
OS Name/Version: CentOS 7.9.2009

  package

{'xxxxxx':     ensure   => present,     provider => puppet_gem,   }

 

This doesn't work anymore. Due to API v1 usage.                                                             

See also: https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html   

Desired Behavior:

Use newer API?

Actual Behavior:

 

Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxx' (>= 0) in any repository
ERROR:  Possible alternatives: xxxxxxxx
Error: /Stage[main]/Vsphere_tag::Install/Package[xxxxxxx]/ensure: change from 'absent' to 'present' failed: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxxx' (>= 0) in any repository

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

David Hanisch (Jira)

unread,
Apr 3, 2023, 10:02:02 AM4/3/23
to puppe...@googlegroups.com
David Hanisch updated an issue
Change By: David Hanisch
*Puppet Version: 7.23.0*
*Puppet Server Version: 7.8.0*
*OS Name/Version: CentOS 7.9.2009*

  package


{'xxxxxx':
    ensure   => present,
    provider => puppet_gem,
  }

 

This doesn't work
anymore today and in the future (2023-04-10) . Due to API v1 usage.                                                             

See
also : [ https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html ]   

*Desired Behavior:*

Use newer API?

*Actual Behavior:*


 

Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxx' (>= 0) in any repository
ERROR:  Possible alternatives: xxxxxxxx
Error: /Stage[main]/Vsphere_tag::Install/Package[xxxxxxx]/ensure: change from 'absent' to 'present' failed: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxxx' (>= 0) in any repository

Josh Cooper (Jira)

unread,
Apr 3, 2023, 2:27:02 PM4/3/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
*Puppet Version: 7.23.0*
*Puppet Server Version: 7.8.0*
*OS Name/Version: CentOS 7.9.2009*

  package {code:puppet}

package {'xxxxxx':    
ensure   => present,    
provider => puppet_gem ,  
}
{code}
 

This doesn't work today and in the future (2023-04-10). Due to API v1 usage.  

See: [https://blog.rubygems.org/2023/02/22/dependency-api-deprecation.html]   


*Desired Behavior:*

Use newer API?

*Actual Behavior:*

  {noformat}

Error: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxx' (>= 0) in any repository
ERROR:  Possible alternatives: xxxxxxxx
Error: /Stage[main]/Vsphere_tag::Install/Package[xxxxxxx]/ensure: change from 'absent' to 'present' failed: Execution of '/opt/puppetlabs/puppet/bin/gem install --no-document xxxxxx' returned 2: ERROR:  Could not find a valid gem 'xxxxxx' (>= 0) in any repository

{noformat}

Josh Cooper (Jira)

unread,
Apr 3, 2023, 2:34:01 PM4/3/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11812
 
Re: package provider puppet_gem uses deprecated rubygems v1 API (EOL 2023-04-10)

Thanks for the heads up David Hanisch Puppet 7.23 ships with rubygems 3.1.4 (by default) which supports the compact API referenced in the blog post. I'm guessing you've configured puppet to install gems from a source other than https://rubygems.org and that gem source is falling back to the v1 dependencies API.

I suggest running the gem command directly to troubleshoot:

DEBUG=1 /opt/puppetlabs/puppet/bin/gem install --no-document <gem>

 

David Hanisch (Jira)

unread,
Apr 4, 2023, 8:08:01 AM4/4/23
to puppe...@googlegroups.com

Hi Josh Cooper,

thanks for your fast response. You are right: we are using Artifactory and there was the Bug.  We have now an workaround from jfrog to fix this issue.

Thank you very much!

Josh Cooper (Jira)

unread,
Apr 4, 2023, 4:13:02 PM4/4/23
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages