Open akupreev opened 3 months ago
I had encountered that same issue but I don't recall what the root cause was. I think the issue was the source postgresql service was still running or the tomcat options.
What I had done to get past this issue was the following: Changed the tomcat options on the source Uyuni server. Then stopped spacewalk-service and postgresql service on the source Uyuni server.
spacewalk-service stop
systemctl stop postgresql.service
Make sure there are no Uyuni containers running on the destination podman server:
mgradm stop
podman ps
Next, purge the container postgresql data directories on the destination podman server:
cd /var/lib/containers/storage/volumes/var-pgsql/_data
Then remove these files and folders: data-pg14 data delete_old_cluster.sh initlog .bash_profile
Once that was done I ran the migration again. Not sure if any of that will help as I was migrating from rpm version 2024.05 to container version 2024.05.
@kcote-ncar I had the same issue, and the Java fix, along with your fix to purge the pgsql folders, did the trick! Thank you!
Good day, colleagues.
I encountered a problem when migrating from the RPM version of the server to the container version. The error looks like:
DONE 8:52AM INF mgradm/shared/podman/podman.go:217 > Previous PostgreSQL is 14, new one is 16. Performing a DB version upgrade... 8:52AM DBG shared/utils/utils.go:157 > Computed image name is registry.opensuse.org/uyuni/server-migration-14-16:latest 8:52AM DBG shared/utils/exec.go:50 > Running: /tmp/mgradm-587542939/inspect.sh 8:52AM DBG shared/utils/utils.go:290 > Trying to read /tmp/mgradm-587542939/data 8:52AM INF shared/podman/images.go:35 > Ensure image registry.opensuse.org/uyuni/server-migration-14-16:latest is available 8:52AM DBG shared/podman/images.go:165 > Checking for registry.opensuse.org/uyuni/server-migration-14-16:latest 8:52AM DBG shared/utils/exec.go:67 > Running: podman images --format={{ .Repository }} registry.opensuse.org/uyuni/server-migration-14-16:latest 8:52AM DBG shared/podman/images.go:43 > Image registry.opensuse.org/uyuni/server-migration-14-16:latest already present 8:52AM INF mgradm/shared/podman/podman.go:261 > Using migration image registry.opensuse.org/uyuni/server-migration-14-16:latest 8:52AM DBG shared/utils/exec.go:50 > Running: podman run --name uyuni-upgrade-pgsql --rm --cap-add NET_RAW --tmpfs /run -v cgroup:/sys/fs/cgroup:rw -v /tmp/mgradm-972259327:/var/lib/uyuni-tools/ --security-opt label:disable -v var-cobbler:/var/lib/cobbler -v var-salt:/var/lib/salt -v var-cache:/var/cache -v var-spacewalk:/var/spacewalk -v var-log:/var/log -v srv-salt:/srv/salt -v srv-www:/srv/www/ -v srv-tftpboot:/srv/tftpboot -v srv-formulametadata:/srv/formula_metadata -v srv-pillar:/srv/pillar -v srv-susemanager:/srv/susemanager -v srv-spacewalk:/srv/spacewalk -v root:/root -v ca-cert:/etc/pki/trust/anchors -v etc-tls:/etc/pki/tls -v var-pgsql:/var/lib/pgsql -v etc-rhn:/etc/rhn -v tls-key:/etc/pki/spacewalk-tls -v etc-apache2:/etc/apache2 -v etc-systemd-multi:/etc/systemd/system/multi-user.target.wants -v etc-systemd-sockets:/etc/systemd/system/sockets.target.wants -v etc-salt:/etc/salt -v etc-rhn:/etc/rhn -v etc-tomcat:/etc/tomcat -v etc-cobbler:/etc/cobbler -v etc-sysconfig:/etc/sysconfig -v etc-postfix:/etc/postfix -v etc-sssd:/etc/sssd registry.opensuse.org/uyuni/server-migration-14-16:latest /var/lib/uyuni-tools/pgsqlVersionUpgrade.sh PostgreSQL version upgrade Testing presence of postgresql16... Testing presence of postgresql14... Create a backup at /var/lib/pgsql/data-pg14... mv: cannot move '/var/lib/pgsql/data' to '/var/lib/pgsql/data-pg14/data': Directory not empty Error: cannot run PostgreSQL version upgrade script: failed to run uyuni-upgrade-pgsql container: exit status 1
Maybe someone has encountered a similar error and can suggest a solution.
Uyuni version: Information for package Uyuni-Server-release:
Repository : uyuni-server-stable Name : Uyuni-Server-release Version : 2024.07-230900.219.1.uyuni3 Arch : x86_64 Vendor : obs://build.opensuse.org/systemsmanagement:Uyuni Support Level : Level 3 Installed Size : 1.4 KiB Installed : Yes Status : up-to-date Source package : Uyuni-Server-release-2024.07-230900.219.1.uyuni3.src Upstream URL : https://www.uyuni-project.org/ Summary : Uyuni Server Description : Uyuni lets you efficiently manage physical, virtual, and cloud-based Linux systems. It provides automated and cost-effective configuration and software management, asset management, and system provisioning.