Bugfix: avoid receptor.conf.lock file conflicts in non-K8S deployments
SUMMARY
This PR fixes an error that occurs when AWX attempts to acquire a receptor.conf lock in non-K8S environments.
Since receptor.conf is not written to outside of Kubernetes, attempting to grab the lock is unnecessary and causes the error:
OSError: [Errno 30] Read-only file system: '/etc/receptor/receptor.conf.lock'
ISSUE TYPE
- Bug, Docs Fix or other nominal change
COMPONENT NAME
- API
ADDITIONAL INFORMATION
To reproduce this error , run fresh migrations or create/update ReceptorAddress instance to trigger the post_save signal handler:
awx-manage shell
from awx.main.models.ha import ReceptorAddress
addr = ReceptorAddress.objects.first()
addr.save()
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Since receptor.conf is not written to outside of Kubernetes
Is that true @fosterseth @TheRealHaoLiu ? I thought this mechanism also had to be used in k8s? There was something special going on with hop/ingress nodes but I can not explain this the best.