Jira (PUP-10401) Pip package provider outputs warning on puppet run

26 views
Skip to first unread message

Nick Burgan (Jira)

unread,
Mar 30, 2020, 6:56:09 PM3/30/20
to puppe...@googlegroups.com
Nick Burgan created an issue
 
Puppet / Bug PUP-10401
Pip package provider outputs warning on puppet run
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/03/30 3:55 PM
Priority: Normal Normal
Reporter: Nick Burgan

Puppet Version: 6.14.0.135.gaf1499b7 (but may have started happening in earlier builds)
Puppet Server Version: N/A, but using latest PE master build (rc2-37)
OS Name/Version: centos 6, sles 12, ubuntu 18.04
When doing a puppet agent -t run, the following warnings are printed.

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: already initialized constant PIP_VERSION
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: previous definition of PIP_VERSION was here
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: already initialized constant PIP_VERSION_RANGE
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: previous definition of PIP_VERSION_RANGE was here

This doesn't cause any errors, but is printed on every run.

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

Josh Cooper (Jira)

unread,
Mar 30, 2020, 7:28:08 PM3/30/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10401
 
Re: Pip package provider outputs warning on puppet run

I think the problem is the pip3 provider requires the parent class pip directly. Later the autoloader tries to load the pip provider which triggers the warning. Note the autoloader doesn't check to see if a file has already been loaded outside of the autoloader. Deleting this line seems to fix things:

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/pip3.rb#L4

Mihai Buzgau (Jira)

unread,
Mar 31, 2020, 10:54:02 AM3/31/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Mar 31, 2020, 10:56:04 AM3/31/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR NW - Triage 2020-04-15

Mihai Buzgau (Jira)

unread,
Apr 1, 2020, 5:12:03 AM4/1/20
to puppe...@googlegroups.com

Luchian Nemes (Jira)

unread,
Apr 1, 2020, 8:28:03 AM4/1/20
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Apr 23, 2020, 8:19:03 AM4/23/20
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Fix Version/s: PUP 6.15.0

Claire Cadman (Jira)

unread,
Apr 27, 2020, 6:48:03 AM4/27/20
to puppe...@googlegroups.com

Tim Skirvin (Jira)

unread,
Jul 16, 2020, 12:39:03 PM7/16/20
to puppe...@googlegroups.com
Tim Skirvin commented on Bug PUP-10401
 
Re: Pip package provider outputs warning on puppet run

I'm still seeing this with puppet 6.17.0 on an RHEL7 system.

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: already initialized constant PIP_VERSION
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: previous definition of PIP_VERSION was here
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: already initialized constant PIP_VERSION_RANGE
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: previous definition of PIP_VERSION_RANGE was here

Tim Skirvin (Jira)

unread,
Jul 16, 2020, 12:43:03 PM7/16/20
to puppe...@googlegroups.com
Tim Skirvin updated an issue
 
Change By: Tim Skirvin
Comment:
I'm still seeing this with puppet 6.17.0 on an RHEL7 system.

/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: already initialized constant PIP_VERSION
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:18: warning: previous definition of PIP_VERSION was here
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: already initialized constant PIP_VERSION_RANGE
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/pip.rb:19: warning: previous definition of PIP_VERSION_RANGE was here

Josh Cooper (Jira)

unread,
Jul 16, 2020, 12:45:03 PM7/16/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10401
 
Re: Pip package provider outputs warning on puppet run

Tim Skirvin can you see if any custom types/providers or facts are contributing to the issue: grep -r require /opt/puppetlabs/puppet/cache/lib

Tim Skirvin (Jira)

unread,
Jul 16, 2020, 1:07:03 PM7/16/20
to puppe...@googlegroups.com
Tim Skirvin commented on Bug PUP-10401

Indeed, that was it; I had written 'pip3.4' and 'pip3.6' providers for myself that were copies of the old 'pip' provider. I fixed my providers, the problem went away.

Austin Boyd (Jira)

unread,
Jul 29, 2020, 12:39:03 PM7/29/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
 
Change By: Austin Boyd
Labels: doc_reviewed jira_escalated

Austin Boyd (Jira)

unread,
Jul 29, 2020, 12:39:04 PM7/29/20
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 39907
Reply all
Reply to author
Forward
0 new messages