New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prune hits SQLite foreign key constraint #329
Comments
On advice of dmsimard in IRC I tried:
This completed without complaint, so I assume all tasks from playbook id 253 have now been deleted but I still cannot run prune without hitting the foreign key constraint error with playbook id 253. Is there an easy way, from the CLI client, to make it report the exact SQL queries that are being issued so I can at least see which query violates the constraint? |
o/ thanks for the update @grifferz
Tasks aren't the only resources for a playbook, though. Could you also run these and find out if any return an error:
The reason I am interested in running these commands is to identify exactly which resource from the playbook is "stuck".
There is nothing built-in right now, no. |
These both ran without error, but still hitting the constraint violation for playbook id 253 afterwards.
So perhaps it is files then. I'm not particularly interested in having ARA record anything about files. Is there a way to have it skip doing that? |
Actually there has been a development. Although the deletion of plays ran without error:
…the first run of "prune" after that actually resulted in a different error which I did not notice at first:
The subsequent deletion of hosts completed without error, and ansible-playbook was still recording playbook runs in there, but prune now only got this "database disk image is malformed" error. On investigation:
…and now "prune" runs without complaint - it's managed to prune playbook id 253 as well as all the others that it should. I still have a copy of the database from before I ran any of the delete commands if you want me to investigate anything else. |
I've never seen errors like these so it would be interesting to understand what caused them but thanks for providing insight into a potential fix though we should ideally never have to tinker with the database manually :) I wonder: if you do a |
I have the following in a daily cron job:
After a few days it has hit a playbook that it can't prune because it gets a foreign key constraint error, so now the cron job can never get past pruning that playbook:
ara version 1.5.7.
Aside from avoiding hitting that problem, could it also be an idea to carry on and prune other playbooks even if there is an error pruning one of them?
The text was updated successfully, but these errors were encountered: