[PUP-2746] new parameter "allow_virtual" Created: 2014/06/10  Updated: 2019/04/04  Resolved: 2015/03/20

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 3.6.0
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Curtis Ruck Assignee: Kylo Ginsberg
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PUP-2661 Invalid parameter allow_virtual for p... Resolved
relates to PUP-2182 Package resource not working as expec... Closed
relates to PUP-2650 3.6.1 issues "warning" message for de... Closed
Template:
QA Contact: Kurt Wall
UX Priority: Critical

 Description   

So, this whole "allow_virtual" new parameter has been extremely frustrating.

We use puppet to manage package updates, i.e. package

{'puppet': ensure=>latest}

Therefore, we added Package

{allow_virtual=>false}

in order to remove the extraneous warning, of which because its in RED, our customers think something broke.

Then, since not all of the puppet agent's were running 3.6.x at that time, they broke because allow_virtual is a new parameter, of which your changing the default to, when it didn't exist.

The entire way this allow_virtual was handled has been a severe pain. It would of been much nicer if you had added the default allow_virtual=>false to maintain existing functionality, since according to semantic versioning you can add features but not break existing environments.

Then in Puppet 4.x you change the default of allow_virtual=>true when your customers are expecting breaking changes.

Thank you for successfully introducing non-backwards compatible changes into your stable releases.

As for the reason I'm creating an issue, is that I would really appreciate reverting the allow_virtual "warning" and planned deprecation until 4.x.



 Comments   
Comment by Josh Cooper [ 2014/06/12 ]

Curtis Ruck Just so you know, we really are trying to do the right thing here. I know it probably doesn't seem that way, but we want to make sure users are aware of breaking changes that will be occurring Puppet 4, and remediate those issues before Puppet 4 lands.

It would of been much nicer if you had added the default allow_virtual=>false to maintain existing functionality, since according to semantic versioning you can add features but not break existing environments.

That's fair. We wanted it to default to true in 4.0. If we explicitly set the default to false in 3.x, then we wouldn't be able to issue a deprecation warning.

Thank you for successfully introducing non-backwards compatible changes into your stable releases.

Watch the tone please, that wasn't our intent. We didn't realize that setting allow_virtual as a resource default would require the master and all agents to be upgraded to 3.6.1.

In 3.6.2, you can set --disable-warnings=deprecations. If you want to run a single run with deprecations enabled, you can do:

puppet agent -t --disable_warnings=''

Comment by Chris Denneen [ 2014/09/02 ]

Josh Cooper Appears puppetlabs-ntp 3.x (even 3.2.1) can't utilize the global allow_virtual in site.pp:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter allow_virtual on Package[ntp] at /etc/puppet/environments/production/modules/ntp/manifests/install.pp:7

I removed the global setting and will deal with the client complaining about deprecation for now.
Any idea when that module will get updated? Changelog shows it's been updated for 3.6 and 4.0 compatibility but still seems to have this issue.

Thanks

Comment by Ben Roberts [ 2014/10/11 ]

For what it's worth I have implemented the following workaround in my site.pp file. This has prevented the invalid parameter warning on <3.6 and silenced the deprecation notice on >= 3.6

if versioncmp($::puppetversion, '3.6.0') >= 0 {
    Package {
        allow_virtual => false,
    }
}

Comment by Rich tea [ 2015/03/04 ]

This really is no good, we are running PE 3.4.3 and it would seem that there is no way to stop this message appearing on every puppet run.
I tried adding "disable_warnings = deprecations" to puppet.conf but it seems to be not supported.
and setting "allow_virtual" will not work ether.

Is there anything else we can do to stop this message?

Comment by Kylo Ginsberg [ 2015/03/04 ]

Rich tea the two methods given by snippets above should work in most cases.

However, I've also seen where users of a module that has custom facts which call puppet to report package info as facts (that's quite a mouthful, sorry) will see this message too. In that case, the easiest thing is probably to patch the module similar to the snippet above (i.e. to set `allow_virtual=false` as a Package default).

Btw, there is no release called PE 3.4.3. What is the output of 'puppet --version'?

Thanks!

Comment by Kylo Ginsberg [ 2015/03/20 ]

Per PUP-4076 this message will no longer be emitted starting with 3.7.5. I'll close this one as a dup of that one.

Comment by Kylo Ginsberg [ 2015/03/20 ]

See PUP-4076.

Generated at Sun Jun 16 16:27:42 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.