#8960 Adjust playbooks/manual/staging-sync/templates/koji-reset-staging.sql script for phx2->iad2 koji migration
Closed: Fixed 3 years ago by kevin. Opened 3 years ago by kevin.

We have a script we use when migrating the prod -> stg koji database.

We should adjust this to use for the phx2->iad2 move.

playbooks/manual/staging-sync/templates/koji-reset-staging.sql is the script.

We want to refer to iad2.fedoraproject.org in places where it mentions stg.phx2.fedoraproject.org

Builders will be created new, so we don't need to do that.
We may want to look at the dump and see if there's any other (non historical) places we want to adjust. Possibly more krb5 credentials?


Metadata Update from @smooge:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: groomed, medium-gain, medium-trouble

3 years ago

I had a quick look over the sql file mentioned.

Is this going to be a staging instance in IAD2? If not there is some stuff in there to add users for staging only that may need to be adjusted as well. The only mention of phx2 is in relation to krb principals for certain users.

There will be but not at first.

I wonder if it wouldn't make sense to duplicate this script just for the migration phx2 -> iad2 as we will likely still need it to do prod -> stg in iad2 once we rebuild stg.

If the iad2 koji deployment is going to be fresh do we need this script?

The script mostly just prepares a running db for a dump by the look of it so if the db is a fresh install and there are no builders or jobs running it could be just a case of dump it in?

Or will this have to be run a number of times on a 'live' koji instance?

The iad2 instance will be a migration of our current existing PROD koji database.

Yes, we should make a seperate script that only does those things we need for this, we definitely to not want to do everything that staging script does.

We do want to:

  • truncate sessions
  • cancel any open tasks (although I intend to do this before we shut down the current prod one in phx2 so there should in theory not be any)
  • cancel any builds in progress
  • expire any active buildroots
  • disable all the phx2 hosts. (we will be adding iad2 ones)
  • expire all repos

We could add new iad2 builders here, or just add them from command line since it's a one time thing

and I guess thats it. :)

I have created a PR based on the comments from Kevin. I have made some best guesses about the db so this will probably need to be adjusted slightly but its a start

https://pagure.io/fedora-infra/ansible/pull-request/109

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata