Issue #3763 has been updated by Walter Heck.
Teaching a class with a trainee who is facing this problem. Here's a
reproducabel test case + output:
<pre>
[root@master ~]# cat test.pp
class test {
service { 'mysqld':
ensure => running,
noop => true,
enable => true,
subscribe => File['/tmp/my.cnf'],
}
file { '/tmp/my.cnf':
ensure => present,
source => '/tmp/my2.cnf'
}
}
include test
[root@master ~]# ps aux | grep mysql
root 2374 0.0 0.0 4800 1000 ? S 09:04 0:00 /bin/sh
/usr/bin/mysqld_safe --datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log
--pid-file=/var/run/mysqld/mysqld.pid --user=mysql
mysql 2421 0.0 1.8 414752 19396 ? Sl 09:04 0:20
/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking
--socket=/var/lib/mysql/mysql.sock
root 31517 0.0 0.0 4020 672 pts/1 R+ 15:34 0:00 grep mysql
[root@master ~]# puppet apply test.pp
notice: Finished catalog run in 0.31 seconds
[root@master ~]# echo blah >> /tmp/my2.cnf
[root@master ~]# puppet apply test.pp
notice: /Stage[main]/Test/File[/tmp/my.cnf]/content: content changed
'{md5}ce9b54c02817ca9c2ffcbe037aafb69b' to
'{md5}701cd86d227fcd8457f95935fedceac7'
notice: /Stage[main]/Test/Service[mysqld]: Triggered 'refresh' from 1 events
notice: Finished catalog run in 11.24 seconds
[root@master ~]# puppet -V
2.7.12 (Puppet Enterprise 2.5.3)
[root@master ~]# cat /etc/redhat-release
CentOS release 5.8 (Final)
[root@master ~]# uname -a
Linux master.puppetlabs.vm 2.6.18-308.el5 #1 SMP Tue Feb 21 20:05:41 EST 2012
i686 i686 i386 GNU/Linux
</pre>
----------------------------------------
Bug #3763: noop ignored on subscribe
https://projects.puppetlabs.com/issues/3763#change-77177
Author: Jakub Heichman
Status: Re-opened
Priority: Normal
Assignee: eric sorenson
Category: metaparameters
Target version:
Affected Puppet version: 2.7.19
Keywords: noop service
Branch:
Hi,
I have an example service resource subscribing to a file, in noop mode:
<pre>
service { "network":
enable => true,
ensure => running,
hasstatus => true,
subscribe => File['/etc/sysconfig/network-scripts/ifcfg-bond0'],
noop => true
}
</pre>
When ifcfg-bond0 changes, network gets restarted regardless of the 'noop'
setting.
Puppetd log below:
<pre>
debug: //network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]:
Changing checksum,content
debug: //network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]: 2
change(s)
debug:
//network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]/checksum:
Replacing /etc/sysconfig/network-scripts/ifcfg-bond0 checksum
{md5}e56d810fc8c0f30b94011d25d52279cb with {md5}d0affea23419ad2fb43def644bdcbf9f
notice:
//network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]/checksum:
checksum changed '{md5}e56d810fc8c0f30b94011d25d52279cb' to
'{md5}d0affea23419ad2fb43def644bdcbf9f'
info: Filebucket[/var/lib/puppet/clientbucket]: Adding
/etc/sysconfig/network-scripts/ifcfg-bond0(d0affea23419ad2fb43def644bdcbf9f)
info: //network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]:
Filebucketed /etc/sysconfig/network-scripts/ifcfg-bond0 to puppet with sum
d0affea23419ad2fb43def644bdcbf9f
debug:
//network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]/checksum:
Replacing /etc/sysconfig/network-scripts/ifcfg-bond0 checksum
{md5}d0affea23419ad2fb43def644bdcbf9f with {md5}e56d810fc8c0f30b94011d25d52279cb
notice:
//network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]/content:
content changed '{md5}d0affea23419ad2fb43def644bdcbf9f' to 'unknown checksum'
info: //network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]:
Scheduling refresh of Service[network]
info: //network::bonding/File[/etc/sysconfig/network-scripts/ifcfg-bond0]:
Scheduling refresh of Service[network]
debug: Service[network](provider=redhat): Executing '/sbin/service network
status'
debug: Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig
network'
notice: //network/Service[network]: Triggering 'refresh' from 2 dependencies
debug: Service[network](provider=redhat): Executing '/sbin/service network
status'
debug: Service[network](provider=redhat): Executing '/sbin/service network stop'
debug: Service[network](provider=redhat): Executing '/sbin/service network
start'
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.