Ask Your Question
11

Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release

asked 2014-05-23 03:25:36 -0500

soulbrat gravatar image

updated 2014-05-30 12:13:37 -0500

spuder gravatar image

Hi all

After last update I'm getting warning on all nodes:

Puppet (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.rb:816:in `set_default')

I have the next versions:

puppetlabs-release-6-10.noarch

puppet-dashboard-1.2.23-1.el6.noarch

puppet-3.6.1-1.el6.noarch

puppet-server-3.6.1-1.el6.noarch

How can I fix it?

Thank you.

edit retag flag offensive close merge delete

7 Answers

Sort by ยป oldest newest most voted
10

answered 2014-06-01 14:43:31 -0500

gh gravatar image

Add this to your site.pp

if versioncmp($::puppetversion,'3.6.1') >= 0 {

  $allow_virtual_packages = hiera('allow_virtual_packages',false)

  Package {
    allow_virtual => $allow_virtual_packages,
  }
}
edit flag offensive delete link more

Comments

We had `Package { allow_virtual => false }` in Site.pp on Puppet Enterprise. I got this error the first time I added an rpm source from a URL: `Error: Failed to apply catalog: Invalid parameter allow_virtual.` This code fixed it, and it makes perfect sense now why! Thanks @gh, you rock.

salientdigital gravatar imagesalientdigital ( 2014-07-31 09:46:55 -0500 )edit
3

answered 2014-10-31 13:55:39 -0500

cbarbour gravatar image

The quick fix is to simply disable deprecation warnings in puppet.conf

https://docs.puppetlabs.com/reference...

This is useful if you've already identified and addressed all the warnings. As per the docs, I would advise you to re-enable warnings, scan the logs for deprecation errors, and ensure that all the warnings have been addressed on each release. Users who did this in Puppet 2.7 had a much less painful process than those that disabled and ignored the warnings.

edit flag offensive delete link more
2

answered 2014-05-27 08:46:46 -0500

Gibbsoft gravatar image

Just add this to your package resource:

allow_virtual => false,
edit flag offensive delete link more
0

answered 2014-09-30 08:58:05 -0500

sandinak gravatar image

This is still an issue for me. I have placed this entry in the site.pp in /etc/puppet/environments/production/manifests .. and it will not go away. As a side note .. this is a poor way to notify users by putting a warning in EVERY single log on every client. Can I recommend instead it's thrown on the puppet master at startup. When troubleshooting it's very frustrating to see this error constantly.

edit flag offensive delete link more

Comments

Did this get resolved? I have the same problem.

pjelar gravatar imagepjelar ( 2014-10-09 08:54:13 -0500 )edit

Yeah I'm still having this problem. I'd like to not have to resort to hacking a bunch of files to get this cleared up. Anyone have any suggestions?

mrosedale gravatar imagemrosedale ( 2014-11-03 12:43:54 -0500 )edit
0

answered 2015-07-07 14:11:32 -0500

On which version exactly will allow_virtual default value be set to false

edit flag offensive delete link more
0

answered 2014-12-04 15:48:33 -0500

I got the same error message, after upgrading puppet to 3.6.1 from 2.6.

The fix was to remove 2.6 first, along with /var/{lib,log,run}/puppet /etc/sysconfig/puppet and install 3.6 fresh.

edit flag offensive delete link more
-1

answered 2014-11-08 18:12:45 -0500

I tried the below in site.pp ...

if verscmp($::puppetversion, 3.6.0) (Package { allow_virtual => true,})

... I also tried ...

if verscmp($::puppetversion, 3.6.0){Package { allow_virtual => true,}}

...and I get:

syntax error at ','; expected '}' at /etc/puppet/manifests/site.pp:1 on node

Without the above I get:

Warning: The package type's allow_virtual parameter will be changing its default value...

I also tried ....

if versioncmp($::puppetversion,'3.6.1') >= 0 {

  $allow_virtual_packages = hiera('allow_virtual_packages',false)

  Package {
    allow_virtual => $allow_virtual_packages,
  }
}

...and I got ...

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter allow_virtual

Puppetmaster : 3.4.3-1

Puppetagent: 3.6.2-3.el7

edit flag offensive delete link more

Comments

1

Your agent must be at the same level or prior to that of the master. It cannot be a higher version.

gh gravatar imagegh ( 2015-08-02 23:57:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-05-23 03:25:36 -0500

Seen: 23,478 times

Last updated: Jul 07 '15