In the awx_init logfile the following error appears:
2022-09-19T14:04:08.60017162+02:00 stderr F chmod: changing permissions of ‘/var/lib/awx/projects’: Operation not permitted
2022-09-19T14:04:08.602818388+02:00 stderr F chgrp: changing group of ‘/var/lib/awx/projects’: Operation not permitted
I have specified the following however for the project pv.
Ensure the permission of “/u01/data/projects” on your K3s host.
My guide includes “sudo chmod 1000:0 /data/projects” to change permission for the project directory before attempting deployment to make chmod and chgrp possible by init container.
Try “sudo chmod 1000:0 /u01/data/projects” before “kubectl apply -k base”.
Thanks for the heads up. I am also looking at your repo.
I plan to write an ansible role to simplify the process.
Something similar for Ubuntu is available here: https://github.com/antuelle78/deploy-awx-k3s-ubuntu
Thanks for your interest in my repo
My workaround in my previous mail maybe not work for you since it is for HG and your situation seems to be a bit differ from HG's one.
This issue does not appear with awx-operator 0.25 and awx-on-k3s 0.25.
Yes, correct. This issue came with 0.29.0.
For technical details, refer my comment on https://github.com/ansible/awx-operator/issues/1055#issuecomment-1251613435
In short, in 0.28.0 or earlier, chmod/chgrp are invoked by root, but in 0.29.0, chmod/chgrp are invoked by UID:1000.
So if your /u01/data/projects is owned by root:root, UID:1000 can’t be invoke chmod/chgrp and this causes “operation not permitted”.
For 0.29.0, sadly, it seems that allowing UID:1000 to chmod/chgrp for /var/lib/awx/projects before deployment of awx pod by changing owner/perm for the actual directory on your K3s host is required in some situation.
This can be achieved by following workaround in my previous mail.
Try “sudo chmod 1000:0 /u01/data/projects” before “kubectl apply -k base”.
I think this issue should be fixed in upstream, but in 0.29.0, this workaround is required anyway.