diff --git a/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md b/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md index d71b6fb..dc72bc2 100644 --- a/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md +++ b/Docker & Kubernetes/Servers/AWX/AWX Operator/Ansible AWX Operator.md @@ -150,12 +150,58 @@ graph LR D --> E[Edit] ``` +## Upgrading from 2.10.0 to 2.19.1 +There is a known issue with upgrading / install AWX Operator beyond version 2.10.0, because of how the PostgreSQL database upgrades from 13.0 to 15.0, and has changed permissions. The following workflow will help get past that and adjust the permissions in such a way that allows the upgrade to proceed successfully. If this is a clean installation, you can also perform this step if the fresh install of 2.19.1 is not working yet. (It wont work out of the box because of this bug). + +### Create a Temporary Pod to Adjust Permissions +We need to create a pod that will mount the PostgreSQL PVC, make changes to permissions, then destroy the v15.0 pod to have the AWX Operator automatically regenerate it. + + ```jsx title="/awx/temp-pod.yml" + apiVersion: v1 + kind: Pod + metadata: + name: temp-pod + namespace: awx + spec: + containers: + - name: temp-container + image: busybox + command: ['sh', '-c', 'sleep 3600'] + volumeMounts: + - mountPath: /var/lib/pgsql/data + name: postgres-data + volumes: + - name: postgres-data + persistentVolumeClaim: + claimName: postgres-15-awx-postgres-15-0 + restartPolicy: Never + ``` + +``` sh +# Deploy Temporary Pod +kubectl apply -f /awx/temp-pod.yaml + +# Open a Shell in the Temporary Pod +kubectl exec -it temp-pod -n awx -- sh + +# Adjust Permissions of the PostgreSQL 15.0 Database Folder +chown -R 26:root /var/lib/pgsql/data +exit + +# Delete the Temporary Pod +kubectl delete pod temp-pod -n awx + +# Delete the Crashlooped PostgreSQL 15.0 Pod to Regenerate It +kubectl delete pod awx-postgres-15-0 -n awx + +# Track the Migration +kubectl get pods -n awx +kubectl logs -n awx awx-postgres-15-0 +``` + ## Troubleshooting You may wish to want to track the deployment process to verify that it is actually doing something. There are a few Kubernetes commands that can assist with this listed below. -!!! failure "Nested Reverse Proxy Issues" - My homelab environment primarily uses a Traefik reverse proxy to handle all communications, but AWX currently has issues running behind Traefik/NGINX, and documentation outlining how to fix this does not exist here yet. For the time being, when you create the DNS record, use an `A` record pointing directly to the IP address of the Virtual Machine running the Rancher / AWX Operator cluster. - ### AWX-Manager Deployment Logs You may want to track the internal logs of the `awx-manager` container which is responsible for the majority of the automated deployment of AWX. You can do so by running the command below. ```