New migration tool DEV-3286 #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "DEV-3286-improve-management-server-migration-script"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See also https://wiki.cwk.multapplied.net/en/technical-support/bondingadmin/migration which has the new instructions
Probably want to install wget as well on
This will probably be used internally only but it might be better to have an echo for each step of commands.
For example when running migrate source, I came across the error
That was probably the apt install gnupg but I know I am definitely going to get calls from support because they have no idea if that was fine or not since there was no output on what was happening.
@ -0,0 +310,4 @@
# Get config entries for the target install
#
for name in full_name short_name email country province city ; do
set_var $name "$(python3 -c \"import configparser; c=configparser.ConfigParser(); c.read('/etc/bondingadmin/bondingadmin.conf'); print(c['partner']['$name'])\")"
Funny enough it worked if I used a freshly installed BA. But this error pops up when running source on my dev ba.
Still not fixed.
set_var $name $(python3 -c "import configparser; c=configparser.ConfigParser(); c.read('/etc/bondingadmin/bondingadmin.conf'); print(c['partner']['$name'])")
will fix it:-)
This is not for customers. It's for Goran.
Still need to fix that query command on line 314
LOL. Seems it didn't actually push my changes. Apparently there was an upstream change
@ -0,0 +305,4 @@
echo
echo " mkdir bondingadmin-install"
echo " cd bondingadmin-install"
echo " curl 'https://stash.multapplied.net/rest/api/latest/projects/PAR/repos/bondingadmin-install/archive?at=refs%2Fheads%2F$release&format=tar.gz' | tar -xz"
We don't have stash anymore
@ -0,0 +304,4 @@
echo "server in a tmux session:"
echo
echo " mkdir bondingadmin-install"
echo " cd bondingadmin-install"
The tar file unzips to create a bondingadmin-install folder. So the cd bondingadmin-install should be moved to after the curl
@ -0,0 +344,4 @@
# Check that locale matches the source
#
locale=$(su postgres -c "psql -Atc \"select datcollate from pg_catalog.pg_database where datname = 'bondingadmin';\"")
Looks like the source_locale was never actually set. On the source BA, I can see that the the locale is C.UTF-8.
On the new server, after it tried to set the locale it just gives the error
Looking at the source locale-gen file on the new server, it appears that source_locale was always empty so it just broke the creation.
That one should be the last issue with this.
@ -0,0 +349,4 @@
# Check that locale matches the source
#
locale=$(su postgres -c "psql -Atc \"select datcollate from pg_catalog.pg_database where datname = 'bondingadmin';\"")
So if I install from a fresh buster install and let migrate run install.sh to install, postgresql service hasn't started yet. A simple systemctl restart fixed this issue.
That should have been started by bondingadmin-setup. If not, a bunch of stuff will be broken. Also, I am unable to replicate that behaviour here.