How to clean all the foreman task and locked task
1.- First make su to postgres user
su -s /bin/bash - postgres
2.-Execute psql
psql
3.- connect to the foreman database
\c foreman;
4.- Delete all the foreman task and foreman task locks
delete from foreman_tasks_tasks;
delete from foreman_tasks_locks;
5.- Quit from postgres and exit
\q
exit
6. Restart all the services
for s in {qpidd,pulp_celerybeat,pulp_ resource_manager,pulp_workers, httpd}; do sudo service $s restart; done
Update in todays foreman you can clean the task using the following command:
foreman-rake foreman_tasks:cleanup
su -s /bin/bash - postgres
2.-Execute psql
psql
3.- connect to the foreman database
\c foreman;
4.- Delete all the foreman task and foreman task locks
delete from foreman_tasks_tasks;
delete from foreman_tasks_locks;
5.- Quit from postgres and exit
\q
exit
6. Restart all the services
for s in {qpidd,pulp_celerybeat,pulp_
Update in todays foreman you can clean the task using the following command:
foreman-rake foreman_tasks:cleanup
Just some advice, not to delete ALL of the tasks but only the ones that are in error and locked.
ReplyDeletesu - postgres
psql foreman
delete from foreman_tasks_tasks where id in(select id from foreman_tasks_tasks where state = 'paused' and result = 'error');
delete from foreman_tasks_tasks where id in(select id from foreman_tasks_tasks where state = 'stopped' and result = 'error');
\q
Solved the problem. Thanks!
DeleteHi,
ReplyDeleteWhy don't use "foreman-rake foreman_tasks:cleanup" ?