Hi,
i’m trying to install awx on Kubernetes.
the playbook fails on Migrate database task with the following error:
TASK [kubernetes : Migrate database] *********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “kubectl -n awx exec ansible-tower-management – bash -c "awx-manage migrate --noinput"”, “delta”: “0:00:28.141537”, “end”: “2019-04-12 10:31:15.798689”, “msg”: “non-zero return code”, “rc”: 137, “start”: “2019-04-12 10:30:47.657152”, “stderr”: “command terminated with exit code 137”, “stderr_lines”: [“command terminated with exit code 137”], “stdout”: “Operations to perform:\n Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit\nRunning migrations:\n Applying main.0002_squashed_v300_release…”, “stdout_lines”: [“Operations to perform:”, " Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit", “Running migrations:”, " Applying main.0002_squashed_v300_release…"]}
If i run the awx-manage migrate --noinput manually from the management container, it fails wiht the following error:
bash-4.2$ awx-manage migrate --noinput
Operations to perform:
Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit
Running migrations:
Applying main.0002_squashed_v300_release…Killed
bash-4.2$
The postgres pod shows these errors
2019-04-12 09:17:48.166 GMT [65] LOG: listening on IPv4 address “127.0.0.1”, port 5432
2019-04-12 09:17:48.166 GMT [65] LOG: could not bind IPv6 address “::1”: Cannot assign requested address
2019-04-12 09:17:48.166 GMT [65] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2019-04-12 09:17:48.170 GMT [65] LOG: listening on Unix socket “/tmp/.s.PGSQL.5432”
2019-04-12 09:17:48.179 GMT [66] LOG: database system was shut down at 2019-04-12 09:17:47 GMT
2019-04-12 09:17:48.183 GMT [65] LOG: database system is ready to accept connections
2019-04-12 09:17:51.452 GMT [65] LOG: received fast shutdown request
2019-04-12 09:17:51.455 GMT [65] LOG: aborting any active transactions
2019-04-12 09:17:51.458 GMT [65] LOG: worker process: logical replication launcher (PID 72) exited with exit code 1
2019-04-12 09:17:51.459 GMT [67] LOG: shutting down
2019-04-12 09:17:51.479 GMT [65] LOG: database system is shut down
2019-04-12 09:17:58.255 GMT [118] LOG: listening on IPv4 address “0.0.0.0”, port 5432
2019-04-12 09:17:58.255 GMT [118] LOG: listening on IPv6 address “::”, port 5432
2019-04-12 09:17:58.258 GMT [118] LOG: listening on Unix socket “/tmp/.s.PGSQL.5432”
2019-04-12 09:17:58.268 GMT [119] LOG: database system was shut down at 2019-04-12 09:17:51 GMT
2019-04-12 09:17:58.272 GMT [118] LOG: database system is ready to accept connections
2019-04-12 09:18:36.691 GMT [182] LOG: incomplete startup packet
2019-04-12 09:18:38.069 GMT [183] LOG: incomplete startup packet
2019-04-12 09:18:55.671 GMT [204] ERROR: relation “conf_setting” does not exist at character 158
…
2019-04-12 09:18:55.757 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.757 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:18:55.758 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.758 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:18:55.773 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.773 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND “django_migrations”.“name” IN (‘0005a_squashed_v310_v313_updates’, ‘0005b_squashed_v310_v313_updates’))
2019-04-12 09:18:55.846 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.846 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:18:55.849 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.849 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:18:55.859 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.859 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:18:55.860 GMT [204] ERROR: relation “django_migrations” does not exist at character 124
2019-04-12 09:18:55.860 GMT [204] STATEMENT: SELECT “django_migrations”.“id”, “django_migrations”.“app”, “django_migrations”.“name”, “django_migrations”.“applied” FROM “django_migrations” WHERE (“django_migrations”."
app" = ‘main’ AND NOT (“django_migrations”.“name”::text LIKE ‘%squashed%’)) ORDER BY “django_migrations”.“id” DESC LIMIT 1
2019-04-12 09:19:14.889 GMT [232] ERROR: must be owner of database awx
2019-04-12 09:19:14.889 GMT [232] STATEMENT: ALTER DATABASE “awx” OWNER TO “awx”
2019-04-12 09:19:16.852 GMT [239] ERROR: null value in column “last_login” violates not-null constraint
2019-04-12 09:19:16.852 GMT [239] DETAIL: Failing row contains (1, pbkdf2_sha256$36000$SNsseCGyWasm$dVcUZtNs0Av7aKV2lMTZKEBks69US0F…, null, t, admin, , , root@localhost, t, t, 2019-04-12 09:19:16.79675+00).
2019-04-12 09:19:16.852 GMT [239] STATEMENT: INSERT INTO “auth_user” (“password”, “last_login”, “is_superuser”, “username”, “first_name”, “last_name”, “email”, “is_staff”, “is_active”, “date_joined”) VALUES (‘pbkdf2_
sha256$36000$SNsseCGyWasm$dVcUZtNs0Av7aKV2lMTZKEBks69US0FMbdzaAIquU5Y=’, NULL, true, ‘admin’, ‘’, ‘’, ‘root@localhost’, true, true, ‘2019-04-12T09:19:16.796750+00:00’::timestamptz) RETURNING “auth_user”.“id”
2019-04-12 09:19:17.546 GMT [240] ERROR: must be owner of database awx
2019-04-12 09:19:17.546 GMT [240] STATEMENT: ALTER DATABASE “awx” OWNER TO “awx”
2019-04-12 09:19:19.348 GMT [248] ERROR: relation “conf_setting” does not exist at character 158
any tips?