Jira (PUP-6021) Tidy can not trigger resources

8 views
Skip to first unread message

Varac (JIRA)

unread,
Mar 8, 2016, 10:09:03 AM3/8/16
to puppe...@googlegroups.com
Varac created an issue
 
Puppet / Bug PUP-6021
Tidy can not trigger resources
Issue Type: Bug Bug
Affects Versions: PUP 3.7.2
Assignee: Unassigned
Created: 2016/03/08 7:08 AM
Environment:

puppet apply on debian jessie

Priority: Normal Normal
Reporter: Varac

Hi,

i'm copying https://projects.puppetlabs.com/issues/3924 to here, because i can reproduce this with puppet 3.7.2:

Hello all,

got a strange issue – tidy does not notify resources.

tidy

{"messages": path => "/var/log", size => "10m", matches => [ "zmd-messages.log.*", "zypper.log-*"] age => "30d", recurse => "true", backup => "false", rmdirs => "true", notify => Exec["restart_syslog"]; }

exec

{"restart_syslog": command => "/etc/init.d/syslog restart", refreshonly => true; }

This should clean all matching Files in /var/log and execute restart_syslog, only if it gets triggered from tidy messages, or? But the exec is ignored.

Jan

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Varac (JIRA)

unread,
Mar 8, 2016, 10:09:06 AM3/8/16
to puppe...@googlegroups.com
Varac updated an issue
Change By: Varac
Hi, 

i'm copying https://projects.puppetlabs.com/issues/3924 to here, because i can reproduce this with puppet 3.7.2:

Hello all,

got a strange issue – tidy does not notify resources.


{code:java}
    tidy {"messages":
            path    => "/var/log", 
            size    => "10m", 
            matches => [ "zmd-messages.log.*", "zypper.log-*"]
            age => "30d", 
            recurse => "true",
            backup  => "false", 
            rmdirs  => "true", 
            notify  => Exec["restart_syslog"];
    }
        
    exec {"restart_syslog":
        command     => "/etc/init.d/syslog restart", 
        refreshonly => true;
    }
{code}


This should clean all matching Files in /var/log and execute restart_syslog, only if it gets triggered from tidy messages, or? But the exec is ignored.

Jan

Sean McDonald (JIRA)

unread,
May 16, 2017, 1:59:05 PM5/16/17
to puppe...@googlegroups.com
Sean McDonald assigned an issue to Varac
Change By: Sean McDonald
Assignee: Varac
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Sean McDonald (JIRA)

unread,
May 16, 2017, 1:59:05 PM5/16/17
to puppe...@googlegroups.com
Sean McDonald updated an issue
Change By: Sean McDonald
Labels: needs_repro  triaged

Sean McDonald (JIRA)

unread,
May 16, 2017, 1:59:05 PM5/16/17
to puppe...@googlegroups.com
Sean McDonald updated an issue
 
Puppet / Bug PUP-6021
Tidy can not trigger resources
Change By: Sean McDonald
Labels: needs_repro

Moses Mendoza (JIRA)

unread,
May 16, 2017, 1:59:11 PM5/16/17
to puppe...@googlegroups.com
Moses Mendoza commented on Bug PUP-6021
 
Re: Tidy can not trigger resources

Can you confirm this is still an issue on the current version of Puppet?

Sean McDonald (JIRA)

unread,
May 16, 2017, 2:00:11 PM5/16/17
to puppe...@googlegroups.com

Martin Lausch (JIRA)

unread,
Oct 12, 2017, 5:22:02 AM10/12/17
to puppe...@googlegroups.com
Martin Lausch commented on Bug PUP-6021
 
Re: Tidy can not trigger resources

Faced the same issue:
Described my findings and a little workaround very detailed here: https://ask.puppet.com/question/32226/resource-tidy-does-not-notify-exec-resource-at-all/

Emil (JIRA)

unread,
Feb 26, 2018, 5:02:04 AM2/26/18
to puppe...@googlegroups.com
Emil commented on Bug PUP-6021

Faced the same issue with Puppet 5.4.0.

Looking at the code I can only find a 'type' for the tidy resource but there is no 'provider'. Is the problem that the magic is done in the 'type' and not in the 'provider' and when tidy is removing files it is done using the file resource and with the tidy. So when tidy only has a 'type' is does not detect any changes and does therefore not send a notify?

This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Josh Cooper (JIRA)

unread,
Mar 16, 2018, 4:34:03 PM3/16/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Maximilian Philipps (Jira)

unread,
Sep 8, 2020, 10:38:03 AM9/8/20
to puppe...@googlegroups.com
Maximilian Philipps commented on Bug PUP-6021
 
Re: Tidy can not trigger resources

2 years later, puppet 6.18.0 and the bug still isn't fixed.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Ian Freislich (Jira)

unread,
Jun 22, 2021, 9:10:01 AM6/22/21
to puppe...@googlegroups.com
Ian Freislich commented on Bug PUP-6021

Still present in 7.1.0

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Jul 15, 2021, 1:51:03 PM7/15/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-6021

I believe the problem is that there is a notify relationship between the tidy resource and the exec resource, but the tidy resource is never "out of sync". So it never notifies the exec.

And the tidy type uses "generate" to dynamically add files to the catalog, however, that method does not add containment edges between the file resources and the downstream exec. Switching to "eval_generate" would solve that problem.

Josh Cooper (Jira)

unread,
Aug 18, 2021, 5:37:02 PM8/18/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: eval_generate needs_repro

Glen Newman (Jira)

unread,
Mar 16, 2022, 2:08:02 PM3/16/22
to puppe...@googlegroups.com
Glen Newman commented on Bug PUP-6021
 
Re: Tidy can not trigger resources

Came across this issue (puppet version 6.18.0). Tidy resource cannot notify an exec resource. I noticed though, that turning the tidy into a file resource (with ensure => absent set) does work to notify the exec resource.

The documentation for tidy has this note:

> This resource type works by generating a file resource for every file that should be deleted and then letting that resource perform the actual deletion.

I'm wondering if the "notify" attribute for a tidy resource is not preserved when the file resource is generated?

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