Jira (PUP-8747) Virtual Collector overrides fail with in 5.x

7 views
Skip to first unread message

Jarret Lavallee (JIRA)

unread,
May 16, 2018, 6:02:03 PM5/16/18
to puppe...@googlegroups.com
Jarret Lavallee created an issue
 
Puppet / Bug PUP-8747
Virtual Collector overrides fail with in 5.x
Issue Type: Bug Bug
Affects Versions: PUP 5.3.5
Assignee: Unassigned
Components: Language
Created: 2018/05/16 3:01 PM
Environment:

Puppet 5.3.5 with virtual resources and collector overrides. 

Labels: cspapercuts
Priority: Normal Normal
Reporter: Jarret Lavallee

In Puppet 4.x one could use a resource collector to override parameters of a file resource, but this is no longer working in 5.x. The failure occurs when there is a resource default in the manifest with the virtual resource and a collector override that specifies the same value.

Below are example manifests that cause the failure.

 

# cat manifests/init.pp
class test {
    File {
      ensure   => directory,
      owner    => '0',
      group    => '0',
      mode     => '0755',
    }
 
  @file { '/tmp/testing':
    owner => '0',
    group => '0',
    mode  => '0750',
  }
} 

 

# cat manifests/realize.pp
class test::realize {
  require test
   File <| title == '/tmp/testing' |> { mode => '0755' }
} 

 

The result of the example above is that the mode of the file is `0750` instead of the expected `0755`.

drwxr-x---  2 root  root  68 May 16 13:57 /tmp/testing 

 

When there is no default file resource in the example above, the override works correctly:

# cat manifests/init.pp
class test {
 
  @file { '/tmp/testing':
    ensure => directory,
    owner => '0',
    group => '0',
    mode  => '0750',
  }
} 
# cat manifests/realize.pp
class test::realize {
  require test
   File <| title == '/tmp/testing' |> { mode => '0755' }
}

The result is a file with `0755` permissions. 

drwxr-xr-x 2 root root 68 May 16 13:59 /tmp/testing  

This behavior was not seen with Puppet 4.x, so it appears to be a regression in 5.x. 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
May 17, 2018, 4:29:02 AM5/17/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Fix Version/s: PUP 5.5.3

Henrik Lindberg (JIRA)

unread,
May 17, 2018, 4:29:02 AM5/17/18
to puppe...@googlegroups.com
Henrik Lindberg commented on Bug PUP-8747
 
Re: Virtual Collector overrides fail with in 5.x

The problem seems to be when an override is made with the same value as the one in the default. (I tested). If they differ, the override will override the given attribute value in the virtual resource.

Jarret Lavallee (JIRA)

unread,
May 17, 2018, 12:11:03 PM5/17/18
to puppe...@googlegroups.com
Jarret Lavallee updated an issue
 
Change By: Jarret Lavallee
CS Priority: Needs Priority

Jarret Lavallee (JIRA)

unread,
May 17, 2018, 12:11:04 PM5/17/18
to puppe...@googlegroups.com

Adam Bottchen (JIRA)

unread,
May 17, 2018, 7:31:04 PM5/17/18
to puppe...@googlegroups.com
Adam Bottchen updated an issue
 
Change By: Adam Bottchen
CS Priority: Needs Priority Reviewed

Kenn Hussey (JIRA)

unread,
Jul 9, 2018, 10:19:04 AM7/9/18
to puppe...@googlegroups.com
Kenn Hussey updated an issue
Change By: Kenn Hussey
Flagged: Impediment

Henrik Lindberg (JIRA)

unread,
Jul 9, 2018, 1:11:05 PM7/9/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Fix Version/s: PUP 5.5.3
Fix Version/s: PUP 5.5.z

Kenn Hussey (JIRA)

unread,
Jul 9, 2018, 1:18:05 PM7/9/18
to puppe...@googlegroups.com
Kenn Hussey updated an issue
Change By: Kenn Hussey
Flagged: Impediment

Josh Cooper (Jira)

unread,
Oct 23, 2020, 8:00:03 PM10/23/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 5.5.z
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Feb 8, 2022, 2:10:03 AM2/8/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8747
 
Re: Virtual Collector overrides fail with in 5.x

We don’t have plans on changing virtual collector behavior to how it worked before puppet 5 so I’m going to close this.

This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages