Jira (PUP-10011) Tidy resource remove files even dependencies are failed

8 views
Skip to first unread message

Henry Wang (JIRA)

unread,
Sep 6, 2019, 5:48:02 AM9/6/19
to puppe...@googlegroups.com
Henry Wang created an issue
 
Puppet / Task PUP-10011
Tidy resource remove files even dependencies are failed
Issue Type: Task Task
Affects Versions: PUP 6.4.3
Assignee: Unassigned
Created: 2019/09/06 2:47 AM
Priority: Normal Normal
Reporter: Henry Wang

Hi team,
 
We got a problem regarding tidy resource. If we put a require => in tidy resource, for example require => Package['vvvvv'], if the package is failed to be absent, tidy will still remove files and then raise the Warning "Skipping because of failed depencies"
 
For example, I write a simple Puppet code and tried to apply it:
 
package

{ 'vvvvv':  ensure => installed, }

tidy

{ 'cleanup /tmp/tidytest': require => Package['vvvvv'], path => '/tmp/tidytest', age => '0', recurse => 1, rmdirs => false, matches => ['*'], }

file

{ '/tmp/testfile.doc':  ensure => present,  require => Package['vvvvv'], }

 
 Due to package will not be installed. Then the result is /tmp/testfile.doc will not be created but all files under /tmp/tidytest will be removed. Both resources will raise the "Skipping because of failed depencies" but apparantly, tidy is triggered.
 
Debug: Executing: '/bin/yum -d 0 -e 0 -y install vvvvv'
Error: Execution of '/bin/yum -d 0 -e 0 -y install vvvvv' returned 1: Error: Nothing to do
Error: /Stage[main]/Main/Package[vvvvv]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install vvvvv' returned 1: Error: Nothing to do
Debug: /Stage[main]/Main/File[/tmp/tidytest/2]: Removing existing file for replacement with absent
Notice: /Stage[main]/Main/File[/tmp/tidytest/2]/ensure: removed
Debug: /Stage[main]/Main/File[/tmp/tidytest/2]: The container Class[Main] will propagate my refresh event
Debug: /Stage[main]/Main/File[/tmp/tidytest/1]: Removing existing file for replacement with absent
Notice: /Stage[main]/Main/File[/tmp/tidytest/1]/ensure: removed
Debug: /Stage[main]/Main/File[/tmp/tidytest/1]: The container Class[Main] will propagate my refresh event
Notice: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Dependency Package[vvvvv] has failures: true
Warning: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Skipping because of failed dependencies
Debug: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Resource is being skipped, unscheduling all events
Warning: /Stage[main]/Main/File[/tmp/testfile.doc]: Skipping because of failed dependencies
Debug: /Stage[main]/Main/File[/tmp/testfile.doc]: Resource is being skipped, unscheduling all events
Debug: Class[Main]: Resource is being skipped, unscheduling all events
Info: Class[Main]: Unscheduling all events on Class[Main]
 
Please help to verify. thanks!

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

Patrick Grant (JIRA)

unread,
Sep 6, 2019, 7:46:03 AM9/6/19
to puppe...@googlegroups.com
Patrick Grant updated an issue
Change By: Patrick Grant
CS Priority: Needs Priority

Patrick Grant (JIRA)

unread,
Sep 6, 2019, 7:58:03 AM9/6/19
to puppe...@googlegroups.com
Patrick Grant updated an issue
Change By: Patrick Grant
Team: Coremunity
Issue Type: Task Bug

Jarret Lavallee (JIRA)

unread,
Sep 12, 2019, 7:25:03 PM9/12/19
to puppe...@googlegroups.com
Jarret Lavallee updated an issue
Change By: Jarret Lavallee
CS Priority: Needs Priority Minor

Jarret Lavallee (JIRA)

unread,
Sep 12, 2019, 7:25:03 PM9/12/19
to puppe...@googlegroups.com

Henry Wang (JIRA)

unread,
Sep 17, 2019, 10:23:02 PM9/17/19
to puppe...@googlegroups.com
Henry Wang commented on Bug PUP-10011
 
Re: Tidy resource remove files even dependencies are failed

The Tidy resource has shortcomings and likely not to be worked. Tidy resource in these examples can be replaced by an exec resource. As far as a technical reason, it is likely that the tidy resource does not pass the dependencies to the file resources that it generates.

Reply all
Reply to author
Forward
0 new messages