Hi everyone,
I have the following scenario:
I have an app.war file that needs to be expanded in tomcat, this war file
creates a new directory at /app/{data,config,profile}.
I need to change a file in /app/config/server.properties after the war
expansion.
I need to restart tomcat to refresh the config update.
I tried this sequence:
copy app.war in webapps
run tomcat, the war expanded
change config
refresh tomcat
In puppet, it becomes:
file {"/tmp/app.war":
ensure => "present",
path => "/tomcat/webapps/app.war",
owner => "tomcat",
group => "tomcat",
before => Service["tomcat"],
}
service { "tomcat":
ensure => "running",
enable => true,
subscribe => File["/app/config/server.properties"],
}
file {"/app/config/server.properties":
ensure => "present",
source => "/tmp/newconfig/server.properties",
owner => "tomcat",
group => "tomcat",
notify => Service["tomcat"],
}
I keep getting this error:
*err: Could not apply complete catalog: Found 1 dependency cycle:*
*(File[/app/config/server.properties] => Service[tomcat] =>
File[/app/config/server.properties])*
*Cycle graph written to /var/lib/puppet/state/graphs/cycles.dot.*
I was wondering if someone can give me a hint how to solve this dependency
cycle issue.
My understanding:
Tomcat subscribes to config file (meaning it will be refreshed if there's a
change in the config file)
The config file change, then it notifies tomcat.
Tomcat picks up the notification, it then refreshes.
I don't see where the cycle happens???
I am fairly new to puppet, so any explanation would help.
Many thanks.
Puppet client: 2.7.25-2 (from EPEL, latest for CENTOS 6)
OS: Redhat 6.4 64bit
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/65db7123-65ab-4350-b862-f68ebd7f4d0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.