Cant remove depreciated warning message

181 views
Skip to first unread message

David LeVene

unread,
Feb 8, 2015, 11:56:31 PM2/8/15
to puppet...@googlegroups.com
Hey All,

I've started to upgrade a few puppet clients to the latest version and have hit the issue which everyone had a while ago around this error

"Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')"

I've implemented the fix in manfests/sites.pp in my test environment but the error message isn't going away!

Puppet masters are 3.7.4, but are setup under RVM so i can run > ruby 1.8.7 due to an ordering issue.

Why is puppet not picking up the config is it a bug or am I missing something obvious?

The below is what i'm using in my site.pp and yes, i do see the notify message.

if versioncmp($::puppetversion,'3.6.1') >= 0 {
  notify {'I Am here':}


  $allow_virtual_packages = hiera('allow_virtual_packages',false)


  Package {
    allow_virtual => $allow_virtual_packages,
  }
}


# puppet agent -t --environment=dlscratch --server=int-puppet-dev
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Caching catalog for xxx
Info: Applying configuration version '1423457136'
Notice: I Am here
Notice: /Stage[main]/Base/Notify[I Am here]/message: defined 'message' as 'I Am here'
Notice: Finished catalog run in 6.62 seconds

Any suggestions as to where to look next?

I am aware that I can add this into the puppet.conf to disable all warnings, but i'd prefer to keep the config inside the manifests and only disable this one warning.

Cheers
David

Johan De Wit

unread,
Feb 9, 2015, 4:56:52 AM2/9/15
to puppet...@googlegroups.com
You could start checking your manifest dir for your environment :

puppet master --configprint manifest

mine says :

/data/puppet/environments/production/manifests

There you should have your site.pp for that environment.

hth

Johan
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a5380933-a138-4f76-9f23-8b16df92f117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer              (805008667232363)
Puppet Certified Professional 2013/2014 (PCP0000006)
blog : http://johan.koewacht.net/
_________________________________________________________
 
Open-Future                 Phone     +32 (0)2/255 70 70
Zavelstraat 72              Fax       +32 (0)2/255 70 71
3071 KORTENBERG             Mobile    +32 (0)474/42 40 73
BELGIUM                     http://www.open-future.be
_________________________________________________________
 

Upcoming Events:

Puppet Fundamentals | http://www.open-future.be/puppet-fundamentals-training-26th-till-28th-january

Puppet Architect | http://www.open-future.be/puppet-architect-training-29th-till-30th-january

Linux Training | http://www.open-future.be/linux-training-9th-till-13th-february

Puppet Practitioner | http://www.open-future.be/puppet-practitioner-training-17th-till-19th-february

Bacula Administrator 1 | http://www.open-future.be/bacula-administrator-i-training-24th-till-26th-february

Subscribe to our newsletter: http://eepurl.com/BUG8H


David LeVene

unread,
Feb 9, 2015, 7:23:22 PM2/9/15
to puppet...@googlegroups.com
Hi John,

To clarify, this should only be run on the puppet master as that's where the catalog complication takes place?

That seems to be all good - the base environment points to production and other environments point to their correct location.

puppet_master ~]#  puppet master --configprint manifest
/etc/puppet/environments/production/manifests
puppet_master ~]# puppet master --configprint manifest --environment=dlscratch
/etc/puppet/environments/dlscratch/manifests

when I view the site.pp in both of those locations, they are as expected - the one in my scratch branch has the additional information around the allow_packages = false & I'm seeing the notify, which tells me the file is being compiled.

Any other suggestions?

Regards
David

David LeVene

unread,
Feb 15, 2015, 11:15:50 PM2/15/15
to puppet...@googlegroups.com
So the problem ended up being the python module - it was not the latest version and it was adding custom resources which ignored what is in the global config.

The 3 files which were causing the problems were;
python_version.rb
pip_version.rb
virtualenv_version.rb

The newer version have a statement like this in them - which resolves my issues.


if Gem::Version.new(facter_puppet_version) >= Gem::Version.new('3.6')
pkg = Puppet::Type.type(:package).new(:name => 'python', :allow_virtual => 'false')
else
pkg = Puppet::Type.type(:package).new(:name => 'python') 
end 

Hope if someone else is having these problems it may help them.

Cheers
David 
Reply all
Reply to author
Forward
0 new messages