AWX migration issue at task Stream backup from pg_dump to the new postgresql container

249 views
Skip to first unread message

battlestargalactica

unread,
Dec 14, 2022, 1:21:13 PM12/14/22
to AWX Project
Hello - I am having some problems now trying to get past this task. Whats different in my migration - i have an existing awx instance with a managed postgres-db pod in an eks cluster.

I have a brand new build for an external RDS postgresql instance.

I created the old secret and the new secret for the external rds db
(awx-prod-old-postgres-configuration & awx-prod01-postgres-configuration)

I applied the following with kustomize cmd:

 kustomize build . | kubectl apply -f -

here is my kustomization file:

kind: Kustomization
resources:
  - awx-prod.yml

# Set the image tags to match the git version from above
images:
    newTag: 1.1.0

# Specify a custom namespace in which to install AWX
namespace: awx

And here is my awx-prod.yml deployment

kind: AWX
metadata:
  name: awx-prod
  namespace: awx
spec:
  service_type: NodePort
  nodeport_port: 30080
  ingress_type: none
  service_labels: |
    environment: production
    team: *******
  hostname:  *******
  old_postgres_configuration_secret: awx-prod-old-postgres-configuration
  postgres_configuration_secret: awx-prod01-postgres-configuration
  secret_key_secret: awx-prod-secret-key

I watched the scale down occur and now it seems I am stuck at this part it seems - it has been sitting here for couple of hours:

--------------------------- Ansible Task StdOut -------------------------------

TASK [installer : Stream backup from pg_dump to the new postgresql container] ***
task path: /opt/ansible/roles/installer/tasks/migrate_data.yml:57

-------------------------------------------------------------------------------
{"level":"info","ts":1671039027.6071534,"logger":"proxy","msg":"Read object from cache","resource":{"IsResourceRequest":true,"Path":"/api/v1/namespaces/awx/pods/awx-prod-postgres-13-0","Verb":"get","APIPrefix":"api","APIGroup":"","APIVersion":"v1","Namespace":"awx","Resource":"pods","Subresource":"","Name":"awx-prod-postgres-13-0","Parts":["pods","awx-prod-postgres-13-0"]}}


I dont see anything happening on the RDS side - there are no active sessions - does my RDS need to be set to manage by the operator? here is what I have configured for the database:

---
apiVersion: v1
kind: Secret
metadata:
  name: awx-prod01-postgres-configuration
  namespace: awx
stringData:
  port: "5432"
  database: "awx_prod_db"
  username: "postgres_admin"
  password: password_noquotes
  sslmode: "prefer"
  type: "unmanaged"
type: Opaque

battlestargalactica

unread,
Dec 14, 2022, 2:17:22 PM12/14/22
to AWX Project
are we able to have the operator migrate outside of the k8s to the rds database?

battlestargalactica

unread,
Dec 15, 2022, 11:02:53 AM12/15/22
to AWX Project
I ended up going the pgdump | pgrestore method - had to make sure the secret for the RDS was created beforehand and re-applied the AWX object into the cluster, also needed the external rds created with the same role that the k8s postgresdb was using called "awx", otherwise there are errors thrown for ownership on the tables during the pgrestore to the external db. 

AWX Project

unread,
Dec 16, 2022, 1:17:11 PM12/16/22
to AWX Project
glad you figured it out! thanks for sharing what you did to make it work

AWX Team
Reply all
Reply to author
Forward
0 new messages