Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create manual projects on 2.13.1 #1789

Open
3 tasks done
fopson opened this issue Mar 21, 2024 · 3 comments
Open
3 tasks done

Unable to create manual projects on 2.13.1 #1789

fopson opened this issue Mar 21, 2024 · 3 comments

Comments

@fopson
Copy link

fopson commented Mar 21, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

Unable to create manual project on AWX deployed through Operator. I have attempted to make /var/lib/awx/projects persistent and link it to /op/awx/projects locally on the node. I have followed instructions given in the community forum https://forum.ansible.com/t/awx-change-project-base-path-kubernetes/2473/8 but I still get the same error message.
image

I have been googling solutions for the past 2 days but no luck.

AWX Operator version

2.13.1

AWX version

24

Kubernetes platform

minikube

Kubernetes/Platform version

v1.32.0

Modifications

no

Steps to reproduce

Install AWX Operator 2.13.1

image

Setup Projects Dir

mkdir /opt/awx/projects
sudo chmod 775 /opt/awx/projects
sudo chown 1000:0 /opt/awx/projects

Create Persistent Volume

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: awx-projects-volume
spec:
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  capacity:
    storage: 2Gi
  storageClassName: awx-projects-volume
  hostPath:
    path: /opt/awx/projects

Create Persistent Volume Claim

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: awx-projects-claim
spec:
  accessModes:
    - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 2Gi
  storageClassName: awx-projects-volume

Checks

image

Create TLS Secret

---
apiVersion: v1
kind: Secret
metadata:
  name: awx-tls-cert
  namespace: certificate
type: kubernetes.io/tls
data:
  tls.crt: <Base64-of-the-Cert>
  tls.key: <Base64-of-the-Key>

Deploy AWX

---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
  namespace: awx
spec:
  # Service
  service_type: clusterip
  
  # Persisten Storage
  projects_persistence: true
  projects_existing_claim: awx-projects-claim

  # HTTPS
  ingress_type: ingress
  ingress_hosts:
    - hostname: fqdn-1
    - hostname: fqdn-2
      tls_secret: awx-tls-cert

Checks

image image image image image

Create a few projects under /opt/awx/projects/

Check

image

Expected results

Being able to create manual/persistent projects.

Actual results

AWX /var/lib/awx/projects/ doesn't seem to be linked to /opt/awx/projects/ on the local host.

Additional information

No response

Operator Logs

No response

@fosterseth
Copy link
Member

your steps look correct to me

can you shell into your awx-task pod (awx-task container) and navigate to /var/lib/awx/projects? does the ls -la output look correct to you? if you touch foo in that directory do you see it on /opt/awx/projects?

@fopson
Copy link
Author

fopson commented Apr 16, 2024

Thanks for your comments @fosterseth.

Unfortunately, it looks like the linking of the volume isn't working as expected. A file listing of the /var/lib/awx/projects directory looks different than the file listing of the /opt/awx/projects directory.

image

I am not able to see the file created from within the pod.

@kurokobo
Copy link
Contributor

The hostPath based PV on minikube is quite different from other distributions.
Your PV refers /opt/awx/projects of your minikube VM (or docker container) instead of your minikube host. Please investigate inside VM (or docker container) that is used as minikube instance.

Also, /opt on minikube instance is not persisted. Refer to: https://minikube.sigs.k8s.io/docs/handbook/persistent_volumes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants