Skip to content

Doesn't release lock if errored - eg an error in remote inventory repository #16

@emmetog

Description

@emmetog

When there is a problem with the remote inventory repository then aviary errors out as expected but doesn't seem to be able to recover, requiring manual intervention to clean up the lock in order to allow aviary to continue. Requiring manual intervention like this is avoidable if aviary only locks while actually running and is very careful to clean up that lock when it stops executing, even if it stopped because of an error.

Here's an extract from my logs, my cron is set to run every 2 minutes:

2020-10-02 09:27:01.639 | INFO | Fetching inventory
2020-10-02 09:27:11.241 | INFO | Running apply
2020-10-02 09:27:11.243 | INFO | Applying module test
bash: /var/lib/aviary/inventory/modules/test/apply: No such file or directory
2020-10-02 09:27:11.248 | ERROR | The command `LSLOG 10 2>&1` exited with exit code 127
2020-10-02 09:27:11.250 | ERROR | Failed
2020-10-02 09:29:01.372 | INFO | Fetching inventory
2020-10-02 09:29:13.924 | ERROR | Bailing for run lock file; try `av resume`
2020-10-02 09:29:13.926 | ERROR | Failed
2020-10-02 09:31:01.061 | INFO | Fetching inventory
2020-10-02 09:31:11.776 | ERROR | Bailing for run lock file; try `av resume`
2020-10-02 09:31:11.778 | ERROR | Failed
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions