2019-04-24 08:33 AM
RSA,
I ran a puppet agent -t on a packet concentrator and I see an agent_catalog_run.lock file that exists:
Notice: Run of Puppet configuration client already in progress; skipping (/var/lib/puppet/state/agent_catalog_run.lock exists)
Below are the following steps I have already done:
1. Stopped puppet: service puppet stop
2. Remove agent_catalog_run.lock file: rm /var/lib/puppet/state/agent_catalog_run.lock
3. Enter y to validate
4. Start puppet: service puppet start
5. Run puppet agent -t again
However, when I start puppet the agent_catalog_run.lock file re-appears. I have stopped, removed the file, and restarted puppet at least 10 times or more but I'm still getting the same results and each time I restart puppet and run another puppet agent -t it still displays this file:
[root@( ) state]# puppet agent -t
Notice: Run of Puppet configuration client already in progress; skipping (/var/lib/puppet/state/agent_catalog_run.lock exists)
[root@( ) state]# service puppet stop
Stopping puppet agent: [ OK ]
[root@( ) state]# ll
total 72
-rw-r--r--. 1 root root 4 Apr 24 12:00 agent_catalog_run.lock
drwxr-xr-x. 2 root root 4096 Jul 13 2016 graphs
-rw-r-----. 1 root root 1395 May 4 2018 last_run_report.yaml
-rw-r--r--. 1 root root 83 Apr 24 11:50 last_run_summary.yaml
-rw-r-----. 1 root root 6966 Sep 23 2017 resources.txt
-rw-rw----. 1 root root 49077 Sep 23 2017 state.yaml
[root@( ) state]# rm agent_catalog_run.lock
rm: remove regular file `agent_catalog_run.lock'? y
[root@( ) state]# ll
total 68
drwxr-xr-x. 2 root root 4096 Jul 13 2016 graphs
-rw-r-----. 1 root root 1395 May 4 2018 last_run_report.yaml
-rw-r--r--. 1 root root 83 Apr 24 11:50 last_run_summary.yaml
-rw-r-----. 1 root root 6966 Sep 23 2017 resources.txt
-rw-rw----. 1 root root 49077 Sep 23 2017 state.yaml
[root@( ) state]# service puppet start
Starting puppet agent: [ OK ]
[root@( ) state]# ll
total 72
-rw-r--r--. 1 root root 4 Apr 24 12:06 agent_catalog_run.lock
drwxr-xr-x. 2 root root 4096 Jul 13 2016 graphs
-rw-r-----. 1 root root 1395 May 4 2018 last_run_report.yaml
-rw-r--r--. 1 root root 83 Apr 24 11:50 last_run_summary.yaml
-rw-r-----. 1 root root 6966 Sep 23 2017 resources.txt
-rw-rw----. 1 root root 49077 Sep 23 2017 state.yaml
Why is this file still re-appearing and I cannot get it to remove? Thanks.
2019-04-24 09:57 AM
I think as soon as you start puppet then the agent would run, hence the lock. You could try deleting the lock without stopping the service after you left the agent to run for a few minutes.