awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Operator 0.12.0 White Screen for Web Interface after Restarting Node

Open JRNC opened this issue 4 years ago • 12 comments

Hi Everyone,

I recently got a test instance of awx running on kubernetes and migrated some data from a previous docker install. Everything seems to be working as expected; however, after restarting the node the web interface is just white. No background, no login page, nothing. It is important to note that this happens with both Chrome and firefox, where it is just a blank white page. When I take a look at the developer tools, it shows 404 for 8 assets (see below) when I get the blank white screen. It is also important to note that this is a single node cluster and this seems to occur regardless of whether or not the node is first drained (and subsequently uncordened after reboot) or not. As soon as I scale the awx deployment down to 0 replicas and then allow the awx-operator to regenerate that pod, then the page can be rendered and everything works fine.

I should also add that I am using "ingress_type: ingress" and TLS.

image

Thank you ahead of time for any assistance

JRNC avatar Jul 22 '21 15:07 JRNC

I was able to get it working again by dropping into the minikube via Docker, then stopping/starting the web container.

ZachHoiberg avatar Jul 22 '21 18:07 ZachHoiberg

Same here

Syntax3rror404 avatar Jul 29 '21 15:07 Syntax3rror404

I am also experiencing this issue. It seems to occur when system is slightly under load (using 6 out of 10 GB of memory and about 40% of cpu)

NikolaiNikolovskiNik avatar Aug 12 '21 16:08 NikolaiNikolovskiNik

Same here. Deployment in a VMWare Tanzu Kubernetes Cluster with k8s v1.18.5. White screen when connecting to AWX Web URL, but after removing the deployment awx-operator, the new pod with the four containers inside (awx-task, awx-web, redis and awx-ee) is OK.

miguelgmedina avatar Aug 13 '21 12:08 miguelgmedina

Same here.

Workaround: kubectl delete pod awx-...

DnaMes avatar Aug 17 '21 15:08 DnaMes

Static content is missing. Creating a symlink inside the web container solves the issue temporarily:

kubectl exec -it awx-x-x -c awx-web -- bash
mkdir /var/lib/awx/public
ln -s /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui_next/build/static /var/lib/awx/public/static

see https://github.com/ansible/awx-operator/issues/470

andrinbr avatar Aug 18 '21 07:08 andrinbr

Hello there, just to provide some feedback:

Clean install with minikube kvm2.

1st login attempt: Blank screen. http://192.168.XX.XX/static/* -> not found

/var/lib/awx/public/static exists and has files.

kubectl delete pod awx-operator-XXX

2nd login attempt: Blank screen. http://192.168.XX.XX/static/* -> not found

Still getting the blank screen. Thanks :)

jscorre1a avatar Aug 19 '21 15:08 jscorre1a

Update2: This only happens using a reverse proxy. (nginx - proxy_pass https://192.168.xx.xx:xxxx/;)

Upon running inside the virtual machine and accessing the webpage there, no problems found. :)

jscorre1a avatar Aug 19 '21 21:08 jscorre1a

I still have this issue in 0.15.0

I use the following install script on a single server
set -e

###
# Install K3S
###

echo "Installing K3S"
apt-get update
echo "Installing..."
curl -sfL https://get.k3s.io | bash -
chmod 644 /etc/rancher/k3s/k3s.yaml
echo "K3S Installed"

###
# Install AWX Operator
###

echo "Installing AWX operator"
apt-get update
apt-get install -y git build-essential curl jq

export NAMESPACE=awx
kubectl create ns ${NAMESPACE}
kubectl config set-context --current --namespace=$NAMESPACE

git clone https://github.com/ansible/awx-operator.git
cd awx-operator/
RELEASE_TAG=`curl -s https://api.github.com/repos/ansible/awx-operator/releases/latest | \
jq -r '.tag_name'`
git checkout $RELEASE_TAG
export NAMESPACE=awx
make deploy
echo "AWX operator installed"

###
# Create volume claim and deployment files
###

tee /root/pvc.yml<<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: static-data-pvc
  namespace: awx
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: local-path
  resources:
    requests:
      storage: 5Gi
EOF

tee /root/awx-deploy.yml<<EOF
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
  namespace: awx
spec:
  service_type: ClusterIP
  ingress_type: none
  projects_persistence: true
  projects_storage_access_mode: ReadWriteOnce
  web_extra_volume_mounts: |
    - name: static-data
      mountPath: /var/lib/awx/public
  extra_volumes: |
    - name: static-data
      persistentVolumeClaim:
        claimName: static-data-pvc
EOF

tee /root/awx-service.yml<<EOF
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/component: awx
    app.kubernetes.io/managed-by: awx-operator
    app.kubernetes.io/name: awx
    app.kubernetes.io/part-of: awx
  name: awx-nodeport-service
  namespace: awx
spec:
  type: NodePort
  ports:
    - name: http
      nodePort: 30080
      port: 80
      targetPort: 8052
      protocol: TCP
  selector:
    app.kubernetes.io/component: awx
    app.kubernetes.io/managed-by: awx-operator
    app.kubernetes.io/name: awx
  sessionAffinity: None
EOF

echo "Deploying AWX"
kubectl create -f /root/pvc.yml
kubectl apply -f /root/awx-deploy.yml
kubectl apply -f /root/awx-service.yml

After deployment /var/lib/awx/public is usually empty on the awx-web container, and symlinking it with ln -s /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui/build/static/ /var/lib/awx/public/static fixes the problem, seemingly also after a reboot.

rwblokzijl avatar Dec 20 '21 14:12 rwblokzijl

I still have this issue in 0.15.0

I use the following install script on a single server After deployment /var/lib/awx/public is usually empty on the awx-web container, and symlinking it with ln -s /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui/build/static/ /var/lib/awx/public/static fixes the problem, seemingly also after a reboot.

Thx man! That's save me! Works like a charm

altasnet avatar Dec 26 '21 15:12 altasnet

I still have this issue in 0.15.0

I use the following install script on a single server After deployment /var/lib/awx/public is usually empty on the awx-web container, and symlinking it with ln -s /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui/build/static/ /var/lib/awx/public/static fixes the problem, seemingly also after a reboot.

~~For me neither deleting the pod nor adding the symlink in the container fixed the issue.~~ Okay, i had to delete the present static folder and symlink the one suggested above. Then it worked.

Thank you!

binarydesu avatar Dec 28 '21 15:12 binarydesu

Another solve in case you need it : kubectl exec -it awx-x-x -c awx-web -- awx-manage collectstatic

IAmAStealer avatar May 23 '22 07:05 IAmAStealer