Open eduardoj opened 1 year ago
The lock is restored afterwards, at least in successful deployments. :thinking:
Regarding the description of the issue:
As we can see from the deployment log, the zypper lock is removed
TASK [unlock obs-api] ************************************************************************************************************************************************************************ changed: [obs]
But it's not restored back afterwards...
In this specific case the zypper lock was not restored because the condition was not met. It was skipped. We can see it in the logs, in the last TASK [include_tasks]
:
TASK [include_role : unset_apache_maintenance_mode] ******************************************************************************************************************************************
skipping: [obs]
TASK [include_tasks] *************************************************************************************************************************************************************************
skipping: [obs]
TASK [include_tasks] *************************************************************************************************************************************************************************
skipping: [obs]
PLAY RECAP ***********************************************************************************************************************************************************************************
obs : ok=7 changed=3 unreachable=0 failed=0 skipped=8 rescued=0 ignored=0
Sounds like it's related to #67 ?
Sounds like it's related to #67 ?
Hm... #67 is simply not implemented. There is only one task which records to GitHub. And it always records a successful result. When the deployment fails, the task is simply not run. See: https://github.com/openSUSE/ansible-obs/blob/2317fafefd9a8a67a6626d943509b35476c8477d/includes/github-deployment.yml#L7-L10
I guess that the right approach to make sure that the deployments always lock the obs-api
package is to always perform this task, even if the deployment has failed. In other words, to remove the conditions which prevent the lock from being performed.
I guess that the right approach to make sure that the deployments always lock the
obs-api
package is to always perform this task, even if the deployment has failed. In other words, to remove the conditions which prevent the lock from being performed.
After re-reading the ansible-obs playbook and thinking about it, I believe @eduardoj is right. Locking zypper should happen always.
As we can see from the deployment log, the zypper lock is removed
But it's not restored back afterwards...