Closed phebal closed 7 years ago
All this needs to be done on staging first.
Can migrate the data successfully but running into:
403 STATUS: Objects cannot be created under pairtree nodes
error when trying to create objects in the upgraded instance of Fedora.
Will try on a copy of production data to see if the same thing happens.
Metadata migration of the production data took 1m57.635s on my laptop, so it should take 5-10 minutes in production. Not bad.
Plan of migration that actually works, verified on a copy of production data:
Put Fedora/Sufia down
sudo puppet agent --disable
sudo systemctl stop httpd
sudo systemctl stop galter-resque
sudo systemctl stop galter-jetty
# Double check line numbers in iptables
sudo iptables -L -n --line-numbers
#FIXME - verify line number in the chain and replace the IP address
#sudo iptables -R INPUT 11 -p tcp -s <VPN IP ADDRESS> -m multiport --ports 80,443 -j ACCEPT
Take a @backup of fedora data
Full backup will be taken by the system administrators in the form of vm snapshot a day earlier.
Local backup:
cp -a /var/www/apps/galter_hydra_jetty/shared{,.bak.4.2}
Migrate the changed file metadata with https://github.com/fcrepo4-exts/fcrepo4-upgrade-utils
Verify first:
java -Dfcrepo.home=/var/www/apps/galter_hydra_jetty/shared/fcrepo4-data -jar /home/deploy/fcrepo-upgrade-utils-4.3.0.jar dryrun
If OK:
`java -Dfcrepo.home=/var/www/apps/galter_hydra_jetty/shared/fcrepo4-data -jar /home/deploy/fcrepo-upgrade-utils-4.3.0.jar
**Deploy tag galter_1.6
hydra-jetty to production
Bring up Sufia locally, don't allow public access, and test
sudo systemctl start galter-jetty
sudo systemctl start httpd
sudo systemctl start galter-resque
Test the migration and Sufia operation
cancancan
Allow public access
sudo systemctl reload iptables
sudo puppet agent --enable
In case of problems If something is not right restore from local backup, or if something's really really not right, ask admins to restore the vm snapshot.
when are you going to do this? don't do it on a friday :smile:
It's going to have to be not during the work hours. I think I'll wake up at 4 on Tuesday or Thursday and will do it then. I'll prepare everything ahead of time so I don't have to think much during the upgrade...
I'm planning to do it on Thursday, starting at 3am. I notified our sysadmins and asked them to coordinate.
Ticket in Footprints: 445741
Done, almost aborted the attempt because of a stray lock file in Fedora's data directory and java's terrible, unreadable logs but in the end it worked. We have a backup in case of any problems.
This will involve some data migration so it'll require a backup and needs to be done after hours. Maybe coordinated with our admins?