Only awx-web cannot see /var/lib/awx/projects

101 views Asked by At

I'm new to GitHub and AWX.

I installed AWX following the basic instructions on GitHub.

When I logged in to the AWX Web UI and tried to create a project, the following error occurred.


"There are no available playbook directories in /var/lib/awx/projects. Either that directory is empty, or all of the contents are already assigned to other projects. Create a new directory there and make sure the playbook files can be read by the "awx" system user, or have AWX directly retrieve your playbooks from source control using the Source Control Type option above."

I investigated and found that the /var/lib/awx/projects directory is visible from awx-task, but I think the reason is that the directory is not visible from awx-web.

Question

  1. Is my guess of the cause correct?
  2. How can I make the /var/lib/awx/projects directory visible from awx-web?

microk8s version: 1.28.3

AWX-Operator version: 2.10.0

AWX version: 23.6.0

$ kubectl -n awx exec -it deployment/awx-task -c awx-task -- ls -la /var/lib/awx/projects/

total 0

drwxrwxrwx. 5 root root 101 Feb 3 10:42 .

drwxrwxr-x. 1 root root 43 Feb 3 10:49 ..

drwxr-xr-x. 3 awx root 58 Feb 3 10:42 _6__demo_project

-rwxr-xr-x. 1 awx root 0 Feb 3 09:07 _6__demo_project.lock

drwxr-xr-x. 3 awx root 30 Feb 3 09:07 .__awx_cache

drwxr-xr-x. 2 awx root 22 Feb 3 10:53 sample_project

$ kubectl -n awx exec -it deployment/awx-web -c awx-web -- ls -la /var/lib/awx/projects/

ls: cannot access '/var/lib/awx/projects/': No such file or directory command terminated with exit code 2

Below is my-awx.yml

apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  service_type: NodePort
  ingress_type: Ingress
  ingress_tls_secret: awx-secret-tls
  hostname: awx.nakanishi.com
  projects_persistence: true
  projects_storage_access_mode: ReadWriteOnce

Below is my AWX status.

[ec2-user@ip-172-31-46-75 awx-operator]$ kubectl get pods
NAME                                               READY   STATUS    RESTARTS        AGE
awx-postgres-13-0                                  1/1     Running   21 (12h ago)    7d9h
awx-web-8474bdf769-gf645                           3/3     Running   63 (12h ago)    7d9h
awx-task-55858b47f9-2gfz8                          4/4     Running   84 (12h ago)    7d9h
awx-operator-controller-manager-775bd7b75d-l665k   2/2     Running   212 (12h ago)   7d9h
[ec2-user@ip-172-31-46-75 awx-operator]$

[ec2-user@ip-172-31-46-75 awx-operator]$ kubectl get pv
NAME                     CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                               STORAGECLASS          REASON   AGE
awx-postgres-13-volume   10Gi       RWO            Retain           Bound    awx/postgres-13-awx-postgres-13-0   awx13-local-storage            7d9h
[ec2-user@ip-172-31-46-75 awx-operator]$
[ec2-user@ip-172-31-46-75 awx-operator]$ kubectl get pvc
NAME                            STATUS   VOLUME                   CAPACITY   ACCESS MODES   STORAGECLASS          AGE
postgres-13-awx-postgres-13-0   Bound    awx-postgres-13-volume   10Gi       RWO            awx13-local-storage   7d9h
[ec2-user@ip-172-31-46-75 awx-operator]$

Please let me know if I can provide more information.

0

There are 0 answers