Hi Chris,

The ${RM} ... command is there to ensure that lock file is cleared and
Stratos agent will be started by Puppet. The Puppet script will start
Stratos agent only if this lock file is not present. Check
"incubator-stratos/tools/puppet3/modules/agent/manifests/start.pp" for more
details.

As a quick fix, you could check whether if this file exists before removing
it.

The reason for adding that wait_for_puppet function is to wait until Puppet
agent is in a ready state. I got this Puppet agent process is already
running error when I tried to execute config script on my laptop which has
OpenStack running on a VM.

But I don't really understand why this check for the lock file has come to
agent Puppet module (puppet3/modules/agent/manifests/start.pp). Shouldn't
we check for the Agent's lock file in Agent's stratos sh script? If a
spawned instance is restarted for some reason, Puppet won't start the Agent
process since wso2carbon.lck is present. It doesn't make sense to run
config script manually each time an instance is restarted.

Can someone explain the reason for adding this check to Agent's Puppet
script rather than stratos sh?

Thanks.

Reply via email to