Comments (7)
Note the last upgrade to 24.0.0 appeared to run the migration pod with no issues.
migration-24.0.0:
Operations to perform: Apply all migrations: auth, conf, contenttypes, dab_resource_registry, main, oauth2_provider, sessions, sites, social_django, sso Running migrations: Applying dab_resource_registry.0001_initial... OK Applying dab_resource_registry.0002_remove_resource_id... OK Applying dab_resource_registry.0003_alter_resource_object_id... OK Applying main.0190_alter_inventorysource_source_and_more... OK
Also tested a brand new deployment via AWX operator and latest version deploys with no issues.
from awx.
is this problem still reproducible in your environment? do you have a backup of your database pre-upgrade?
from awx.
I'd expect this message to happen if somehow the unique constraint for the team model's id
field got messed up. This is happening as a ForeignKey is added to the team model, but this should not use the name
field, which is not unique. Maybe somehow some change made it think the name field is the primary_key.
from awx.
is this problem still reproducible in your environment? do you have a backup of your database pre-upgrade?
Yes it is. I was able to restore from backup and get my instance upgraded to 24.2.0 however it appears even with the version i am on trying to upgrade to 24.3.1 has the same issue.
from awx.
I'd expect this message to happen if somehow the unique constraint for the team model's
id
field got messed up. This is happening as a ForeignKey is added to the team model, but this should not use thename
field, which is not unique. Maybe somehow some change made it think the name field is the primary_key.
Interesting, any ideas on how to resolve? I'm looking at the postgres db and i see the table in question but nothing looks out of the ordinary. Could i manually set the primary_key back to id? Interesting thing is i don't see a unique constraint listed at the bottom of the table output.
Another fresh install of AWX main_team table for reference:
from awx.
FYI - I "resolved" the issue by following these steps. Probably not the cleanest way but i needed to get my instance up and running with the latest release.
- psql dump fresh install of AWX postgres DB table main_team
pg_dump --table main_team awx > main_team_bkp
- oc rsh into postgres pod on broken instance
oc project ansible-awx
oc rsh awx-prod-postgres-15-0
- take psql dump backup of existing DB (the one having issues)
pg_dump awx > awx_bkp
- import psql dump of fresh main_team table
psql awx < main_team_bkp
- perform
awx-manage migrate
command on web pod - reload web/task pods and everything seems happy now.
Any thoughts on if this is a terrible idea or if this should be ok?
from awx.
I'm almost completely convinced that something messed up the indices of your team table. I think you have a great strategy for the immediate issue. My only concern would be whether the constraints of other tables also got corrupted. Looking into the obvious tools for this, it seems we already have django-extensions installed so awx-manage sqldiff main dab_rbac
should work, but it gives a lot of junk output, here is what I get in a fresh DB:
https://gist.github.com/AlanCoding/dcd9e67e02423e5524450b8150a4d6d8
So you could run that and cross-reference against mine. If you have other tables which dropped constraints, I wonder if it might still be obvious enough you can compare and see it.
from awx.
Related Issues (20)
- AWX task fail with AnsibleUnsafeBytes for yaml collapsed string HOT 1
- task check_mode=false ignored by awx job template - Playbook Check
- Allow Kubernetes credentials on SCM inventories HOT 3
- Issue with AWX Callback and Host Matching Error HOT 1
- concurrent jobs limit HOT 2
- Collection 24.3.1 displays warning claiming 0.0.1-devel HOT 2
- Feature Wants: kubectel delete -k . should only delete all the awx resources, but not the entire namespace HOT 5
- Azure Key Vault Private Key Passphrase not recognized HOT 2
- cancelled vs canceled - standardize spelling in codebase HOT 2
- Unable to install some galaxy collections (again) HOT 2
- duplicate timeseries coming from the metrics endpoint
- Cannot create multiple workflow approvals
- cant connect to legacy host using ssh-rsa /ssh-dss hostkey algorithm HOT 2
- Jobs fail with "Unable to find process isolation executable: podman" HOT 2
- Add support for AWS SNS(Simple Notification Service) notifications HOT 1
- AWX 24.3.1 | Add team permission HOT 2
- Playbooks are not discovered in subdirectories within git project HOT 7
- Override/add DNS entries in /etc/hosts entries via hostAliases (EE pod) HOT 2
- Labels are missing in workflow_launch module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awx.