uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
429 stars 178 forks source link

Uyuni Bugreport - Uyuni 2021.06 - may the upgrade from 2021.05 broken it up ? #4013

Closed FiliMila closed 2 years ago

FiliMila commented 3 years ago

I've upgraded uyuni from 2021.05 to 2021.06; after the upgrade I get from web server:

HTTP Status 404 – Not Found

Type Status Report

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.36

Information for package Uyuni-Server-release:
---------------------------------------------
Repository     : Uyuni Server Stable
Name           : Uyuni-Server-release
Version        : 2021.06-132.3.uyuni1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.4 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : Uyuni-Server-release-2021.06-132.3.uyuni1.src
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.

Details about issue - patching history log:

2021-07-12 13:25:54|command|root@uyunis|'zypper' 'patch'|
2021-07-12 13:26:18|install|libzypp|17.27.0-12.1|x86_64||repo-sle-update|b50b6ad23c866f7bd51244564e3c5a46c22bc7d53ea81f77ad2f5c17ab60c828|
2021-07-12 13:26:18|install|zypper-log|1.14.46-13.1|noarch||repo-sle-update|a556ff351936cd9c6fee7fcc2da844a3c610ccbee9d1c7c6a8a3ffdf0812d4e4|
2021-07-12 13:26:20|install|zypper|1.14.46-13.1|x86_64||repo-sle-update|94d96445956e1c7b33484bb98bf6f208ba64d4de19c48bc7a77956462ed1a4a2|
2021-07-12 13:26:20|install|zypper-needs-restarting|1.14.46-13.1|noarch||repo-sle-update|bd91cacd9da481a5f9e76e2adf349417123fc061c23fb98c39d9ffcdd5930ee6|
2021-07-12 13:26:20|patch  |SUSE-2021-2273|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:12|command|root@uyunis|'zypper' 'patch' '--with-optional'|
2021-07-12 19:07:14|remove |supportutils-plugin-salt|1.1.5-1.4.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:14|install|chrony-pool-openSUSE|3.2-9.24.2|noarch||repo-sle-update|294e582ea022c53dc759f6c6fd3581897ad022be3d39294fc8eae26bbc055a4b|
2021-07-12 19:07:14|install|dosfstools|4.1-3.3.1|x86_64||repo-sle-update|e238be44a9ff73bdced2e3f0033258c6adc52f3e5a2b48e6226a02631db53850|
2021-07-12 19:07:14|install|libdbus-1-3|1.12.2-8.6.1|x86_64||repo-sle-update|e8ab1d6499d9a117295bd7333a8b5ff18bf6d68606cab87fc97bdebf23b049d1|
2021-07-12 19:07:15|install|libgnutls30|3.6.7-14.13.5|x86_64||repo-sle-update|9f78112bed0a12e3120fd974264d7aa8eb6271dd27f69cdf8f6d86ab0f5f2f67|
2021-07-12 19:07:15|install|libpq5|13.3-5.13.1|x86_64||repo-sle-update|723cf390d1c0f191e28deead6ca1e5c1896a2ffc70aada5baed6765c3227d177|
2021-07-12 19:07:15|install|psmisc|23.0-6.16.1|x86_64||repo-sle-update|be22a948f98e881276b9bd8251ad8787552ec19de3ab31b9458d6dddd8e282dc|
2021-07-12 19:07:17|install|qemu-guest-agent|5.2.0-20.1|x86_64||repo-sle-update|22da8dc960d32341fa084449fe78d8a68680de139ad7fe9344bded362d130b2f|
2021-07-12 19:07:17|install|yast2-country-data|4.3.14-3.3.1|x86_64||repo-sle-update|05d431645ee2bcdc5926fa575a2de554ee5024c7641f393c5ade3ed7700b5a86|
2021-07-12 19:07:17|install|yast2-logs|4.3.63-3.8.1|x86_64||repo-sle-update|d355590ae2b0ef43efad66ccdc5b607f5083a85e67fe68590f96b734e29fe63d|
# 2021-07-12 19:07:18 chrony-3.2-9.24.2.x86_64.rpm installed ok
2021-07-12 19:07:18|install|chrony|3.2-9.24.2|x86_64||repo-sle-update|b5ec7fafb382136f8399d6bcf6e5f5ac2449fafac26b421a0f7d29d8410a5e2f|
2021-07-12 19:07:18|install|dbus-1-x11|1.12.2-8.6.1|x86_64||repo-sle-update|c11920a63e9d28ab81485b43f3985cde07a79a45fe0de8db87ac0b34578993fd|
2021-07-12 19:07:20|install|dbus-1|1.12.2-8.6.1|x86_64||repo-sle-update|db9f2630ce51946fb7451773e90f9536373c2012481c2aa5154349ace7f8804b|
2021-07-12 19:07:20|install|gnutls|3.6.7-14.13.5|x86_64||repo-sle-update|846404ca2b3ba6dcb04b15effb795bcad9c1020f019b3ce3bae2dfca4607ffa0|
2021-07-12 19:07:20|install|postgresql|13-10.3.3|noarch||repo-sle-update|984235699f8ddcd3c3ef2ed607896a49ab270e128d7c78db4a8a1d9c6dffd177|
2021-07-12 19:07:20|install|psmisc-lang|23.0-6.16.1|noarch||repo-sle-update|8d1591ba109c642ec6a9525319ca6adea905c949cd43fa4ae0a6c646f97d4a0b|
# 2021-07-12 19:07:21 yast2-4.3.63-3.8.1.x86_64.rpm installed ok
2021-07-12 19:07:21|install|yast2|4.3.63-3.8.1|x86_64||repo-sle-update|8ac7079a71d85613cec6ce8502a19604255b48e9dc8bfd1cf8b485a7d6384868|
2021-07-12 19:07:22|install|postgresql13|13.3-5.13.1|x86_64||repo-sle-update|f59085467f9af7023aeb0da89dbc4dfe2f2de3333e0f50e40f2751d685ac6937|
# 2021-07-12 19:07:22 yast2-storage-ng-4.3.53-3.5.1.x86_64.rpm installed ok
2021-07-12 19:07:22|install|yast2-storage-ng|4.3.53-3.5.1|x86_64||repo-sle-update|47646027158424dd48cabf22a7e011f4892c81abe03ed376a454babb114c0264|
2021-07-12 19:07:23|install|yast2-country|4.3.14-3.3.1|x86_64||repo-sle-update|0fbcf59b950eeec188d47428d370c3cedba3e452878eda0b49a21dc4caf6da03|
2021-07-12 19:07:23|install|yast2-apparmor|4.3.2-3.3.1|noarch||repo-sle-update|c9e343ac6ae4467d3f4e04e3f173925227217e2feb8078758c4dc38ae57b8c5a|
# 2021-07-12 19:07:24 postgresql-server-13-10.3.3.noarch.rpm installed ok
2021-07-12 19:07:24|install|postgresql-server|13-10.3.3|noarch||repo-sle-update|4cb9f8338f99f9cbeb4a8f85d3fb41aaef38613d7b694feb2df5b012b5538309|
2021-07-12 19:07:26|install|postgresql13-server|13.3-5.13.1|x86_64||repo-sle-update|32f22302344cf15cc43ccb77c9029e1df2e675445503e0ba0346e02ea6cb662d|
2021-07-12 19:07:27|install|postgresql13-contrib|13.3-5.13.1|x86_64||repo-sle-update|aadfa56f6575b66de614f5d0a66223c5aeaf49d61d95a578ca483b0ce001a1ba|
2021-07-12 19:07:28|install|postgresql13-llvmjit|13.3-5.13.1|x86_64||repo-sle-update|979896539b759066d3241ecaf9b926da937476029b843b05270d8f28b72d937e|
2021-07-12 19:07:28|install|postgresql-contrib|13-10.3.3|noarch||repo-sle-update|db44e79c49f1b25a8f57f458014ad3e818ee1d36d0b44c2fc1bdcb0aab0ae9d8|
2021-07-12 19:07:29|remove |patterns-uyuni_server|2021.06-2.3.uyuni1|x86_64|root@uyunis|
2021-07-12 19:07:29|remove |supportutils-plugin-susemanager|4.2.2-2.4.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:29|remove |spacewalk-java|4.2.23-1.7.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:29|remove |uyuni-cluster-provider-caasp|4.2.3-1.4.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:29|remove |susemanager|4.2.19-1.2.uyuni1|x86_64|root@uyunis|
2021-07-12 19:07:29|remove |spacewalk-postgresql|4.2.3-1.6.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:29|remove |spacewalk-common|4.2.3-1.6.uyuni1|noarch|root@uyunis|
2021-07-12 19:07:29|remove |apache-commons-el|1.0-bp153.2.24|noarch|root@uyunis|
2021-07-12 19:07:29|install|postgresql-llvmjit|13-10.3.3|noarch||repo-sle-update|81f29481f3e9f9182cd6c1935f7751f6808ff3621f2baa99d65c5a412d86aff8|
2021-07-12 19:07:30|install|libcreaterepo_c0|0.15.4-lp153.2.3.1|x86_64||repo-update|674bc7eb2f507b01d3c86bbaad43d82f9527ac12774e952109ea289014e06bb2|
2021-07-12 19:07:30|install|createrepo_c|0.15.4-lp153.2.3.1|x86_64||repo-update|e78446e2e1b95f0f0879fcb31e0fbdb59ea025a5d091c9c8f3db2cea892dbb97|
# 2021-07-12 19:07:30 Output of postgresql-server-13-10.3.3.noarch.rpm %posttrans script:
2021-07-12 19:07:30|patch  |SUSE-2021-1230|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2224|1|noarch|repo-sle-update|important|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2286|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2223|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2292|1|noarch|repo-sle-update|important|security|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2020-3767|1|noarch|repo-sle-update|low|recommended|needed|not-needed|
2021-07-12 19:07:30|patch  |SUSE-2021-2249|1|noarch|repo-sle-update|low|optional|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2290|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2275|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2267|1|noarch|repo-sle-update|low|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2285|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2231|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2228|1|noarch|repo-sle-update|moderate|recommended|needed|applied|
2021-07-12 19:07:30|patch  |SUSE-2021-2213|1|noarch|repo-sle-update|moderate|security|needed|applied|
2021-07-12 19:07:30|patch  |openSUSE-2021-1030|1|noarch|repo-update|moderate|recommended|needed|applied|
2021-07-12 19:16:11|command|root@uyunis|'zypper' 'up'|
2021-07-12 19:16:27|install|yast2-trans|84.87.20210502.7b34dbceae-1.1|noarch||repo-oss|d9e5f8dc1369e1e871564a4d13393df806b17b53d1e821946ef41d99fc301c19|

At 19.12 tomcat has ended working as reported in the beginning.

All rhnweb*.log files ends up before reported hour.

Please let me know if I can produce more logs interesting for it. Thanks. M.

juliogonzalez commented 3 years ago

Did you follow the doc?

You did not describe how you did the upgrade, but if you used zypper dup or zypper up and that's it, then that's wrong. This is a major update.

FiliMila commented 3 years ago

Hi. Yes, I followed the doc, also because without updating susemanager before, it doesn't collect any patch/updates. I've had also applied: zypper patch --with-optional to be sure to collect everything needed; without it, some patches were conflicting between them, but now I've lost history of it; don't know if there's still any log that contains it. Please let me know. Thanks. M.

juliogonzalez commented 3 years ago

Please paste all the commands you used to perform the upgrade.

On the first look, looks as if you skipped the script that should be called to upgrade the system from Leap 15.2 to 15.3, and to upgrade the server.

FiliMila commented 3 years ago

Hi. Follows:

zypp ref
#1625058575
zypper ref
#1625058586
zypper up susemanager
#1625058611
/usr/lib/susemanager/bin/server-migrator.sh
#1625063598
/usr/lib/susemanager/bin/pg-migrate-12-to-13.sh
#1625063645
/usr/lib/susemanager/bin/pg-migrate-12-to-13.sh fast
#1625065690
journalctl -f -u uyuni-check-database.service
#1625065718
df -h
#1625065732
init 6
#1625070252
zypper ref
#1625070267
top
#1625070327
zypper ref
#1625070358
zypper list-patches
#1625070377
spacewalk-service stop
#1625070386
zypper patch
#1625070518
init 6
#1625072890
ip a
#1625072896
spacewalk-common-channels opensuse_leap15_3 opensuse_leap15_3-non-oss opensuse_leap15_3-non-oss-updates opensuse_leap15_3-updates opensuse_leap15_3-backports-update opensuse_leap15_3-sle-updates opensuse_leap15_3-uyuni-client uyuni-proxy-stable-leap-153
#1626088895
zypper patch
#1626089006
zypper refresh
#1626089057
zypper patch
#1626089085
spacewalk-common-channels opensuse_leap15_3 opensuse_leap15_3-non-oss opensuse_leap15_3-non-oss-updates opensuse_leap15_3-updates opensuse_leap15_3-backports-update opensuse_leap15_3-sle-updates opensuse_leap15_3-uyuni-client uyuni-proxy-stable-leap-153
#1626089099
spacewalk-service stop
#1626089125
zypper patch
#1626089230
init 6
#1626108410
spacewalk-service stop
#1626108422
zypper patch
#1626108888
spacewalk-common-channels opensuse_leap15_3 opensuse_leap15_3-non-oss opensuse_leap15_3-non-oss-updates opensuse_leap15_3-updates opensuse_leap15_3-backports-update opensuse_leap15_3-sle-updates opensuse_leap15_3-uyuni-client uyuni-proxy-stable-leap-153
#1626108924
zypper refresh
#1626108947
zypper patch
#1626109414
zypper list-patches
#1626109443
zypper patch --with-optional
#1626109662
init 6
#1626110119
zypper up
#1626110197
zypper list-patches
#1626110214
spacewalk-common-channels opensuse_leap15_3 opensuse_leap15_3-non-oss opensuse_leap15_3-non-oss-updates opensuse_leap15_3-updates opensuse_leap15_3-backports-update opensuse_leap15_3-sle-updates opensuse_leap15_3-uyuni-client uyuni-proxy-stable-leap-153
#1626110228
spacewalk-service stop
#1626110238
zypper patch --with-optional
#1626110246
zypper list-patches
#1626110263
zypper patch
#1626110292
spacewalk-service start
#1626110323
journalctl -f -u uyuni-check-database.service
#1626110334
spacewalk-common-channels opensuse_leap15_3 opensuse_leap15_3-non-oss opensuse_leap15_3-non-oss-updates opensuse_leap15_3-updates opensuse_leap15_3-backports-update opensuse_leap15_3-sle-updates opensuse_leap15_3-uyuni-client uyuni-proxy-stable-leap-153
#1626771281

Just or let You know: spacewalk-common-channels for try to add new repo 15.3 never worked... Thanks, M.

juliogonzalez commented 3 years ago

I don't think it's what causing this, You are at least missing a reboot (https://www.uyuni-project.org/uyuni-docs/en/uyuni/upgrade/server-major-upgrade-uyuni.html) at the end of the migration.

if the services are down, of course using spacewalk-common-channels won't work.

If the reboot does not fix, please tail the logs at /var/log/tomcat and run spacewalk-services restart, then paste the output here.

Please remember to give format to the things you are pasting (I just did it for your previous comments)

FiliMila commented 3 years ago

Hi. I've rebooted many times from upgrade and it didn't solved. There's a job that never ends avoiding successful restart. I need to restart in recovery, to let systems come up succesfully.

prompt: spacewalk-service restart Shutting down spacewalk services... Done. Starting spacewalk services... Running DB schema upgrade. This may take a while. Call the following command to see progress: journalctl -f -u uyuni-check-database.service Done.

logs from journalctl: Jul 22 17:13:29 uyunis systemd[1]: Stopped Uyuni check database. Jul 22 17:13:29 uyunis systemd[1]: Starting Uyuni check database... Jul 22 17:13:30 uyunis spacewalk-startup-helper[673]: Your database schema already matches the schema package version [susemanager-schema-4.2.15-1.2.uyuni1]. Jul 22 17:13:30 uyunis spacewalk-startup-helper[673]: Schema upgrade: [susemanager-schema-4.2.15-1.2.uyuni1] -> [susemanager-schema-4.2.15-1.2.uyuni1] Jul 22 17:13:31 uyunis systemd[1]: Finished Uyuni check database.

Attaching catalina.log after restart services... I hope it may helps.

catalina.2021-07-22.log

Thanks, M.

juliogonzalez commented 3 years ago

There's a job that never ends avoiding successful restart.

Well, what job exactly?

FiliMila commented 3 years ago

It's just after Reached target Remote File Systems: A start job is running for /dev/disk/by-id/sc.._different-partitions ( x min sec / no limit ) I've waited for more than 1 hour before rebooting in recovery mode.

juliogonzalez commented 3 years ago

Sadly, that could be an OS config failure, an openSUSE failure, or even a hardware failure (or network error if you are using network disks, or a lot of other different issues).

Uyuni Server was never tested with the system started in emergency mode, but it could be very well that tomcat is unable to start in emergency mode (or better said, it's trying to start, but the webapp is unable to deploy).

First thing to do is getting the system to boot up normally.

FiliMila commented 3 years ago

I can agree for application point of view, but... if it's really an hw failure, what's different - from hardware perspective - from recovery mode where it works ?

juliogonzalez commented 3 years ago

I can't tell you with only that chunk of log. You will need to use recovery mode to check what's wrong.

Hardware is one possibility, but not the only one. It could be a configuration problem somewhere at the OS, or even a bug at openSUSE itself and not Uyuni.

FiliMila commented 3 years ago

Well.. at this point, can You please suggest me a dump config I can do, if I decide to restart from scratch, without to reconfigure everything? Thanks a lot. M.

FiliMila commented 3 years ago

Just to be clear: I'm asking because I don't know if a standard backup and restore procedure (form administration guide), on a new system can regenerate the tomcat failure or not... Thanks a lot. M.

juliogonzalez commented 3 years ago

I don't think the issue you have is an Uyuni problem as nobody reported anything similar, I am unable to reproduce the issue, and it seems that your system refuses to start because of any kind of issue with the disks/partitions.

You will need to find out what exactly is going on, by reviewing the logs on maintenance mode, and the OS configuration.

If, after that problem is fixed, tomcat still doesn't start, that's when we can have a look at possible Uyuni issues.

Just to be clear: I'm asking because I don't know if a standard backup and restore procedure (form administration guide), on a new system can regenerate the tomcat failure or not...

The backup you took was, hopefully, taken before starting the update. So to restore it, you need to restore the previous OS as well, meaning you need to reinstall Leap 15.2 and whatever 2021.05

We generate snapshots for each Uyuni version. For example for 2021.05 you have: https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Snapshots:/2021.05/images/

So you can follow https://www.uyuni-project.org/uyuni-docs/en/uyuni/administration/backup-restore.html, but when you are adding the Uyuni repository, add that one instead of Stable. Then follow the rest of the procedure in exactly the same way.

But before going down that road, I strongly suggest you see why the system is unable to start without emergency mode, and stops doing something with the disks.

FiliMila commented 2 years ago

Hi Julio, I've had some times to fix OS bug. During grub.cfg generation, it seems that uuid of swap partition was truncated, so it was stopping boot at first step. Now I've fixed it and - after applied patches - uyuni still hangs. Do You want try to restart from where stopped?

if the services are down, of course using spacewalk-common-channels won't work.

From this point of view I don't know: if I try to sync 15.2 channels, it works. It's adding 15.3 channels that fails...

Of course: main problem is always apache in down state:

_HTTP Status 404 – Not Found

Type Status Report

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.36_

Ah, maybe I found something interesting... Trying to force susemanager update, received answer:

Package 'susemanager' is not installed.

Do You think may be this the problem? And if yes, how can it become uninstalled? Can You suggest me what to do now?

Thanks a lot. F.

juliogonzalez commented 2 years ago

During grub.cfg generation, it seems that uuid of swap partition was truncated, so it was stopping boot at first step.

Not a good sign, if you ask me.

Ah, maybe I found something interesting... Trying to force susemanager update, received answer: Do You think may be this the problem?

Seems to be the case, but if this package is missing, some others could be missing.

And if yes, how can it become uninstalled?

Absolutely no idea with the information we have. It could even be your RPM database got corrupted for some reason. And if that's the case, it's hard to say if something else is not corrupted as well.

In the end you should not be able to remove any of the Uyuni packages without getting a big list other packages being removed.

Are you using any kind of network storage by any chance?

Can You suggest me what to do now?

If you have a backup that can take you back to 2021.05, use it. Then make sure Uyuni is up and running, then try the upgrade again (remember: major upgrade as the OS will change from Leap 15.2 to Leap 15.3)

If you don't have a backup, try to reinstall the pattern again with sudo zypper in patterns-uyuni_server. Assuming the server migration didn't show any errors (at least you didn't tell there were any), assuming no config files were removed, and assuming nothing else is corrupted, it should work. But for me those are way too many assumptions, and personally I'd not trust such installation.

FiliMila commented 2 years ago

Hi Julio. Problem of swap partition uuid truncated is now present also onto uyuni proxy, so I'm thinking it has to be an upgrade path bug of 15.2... Said that, your suggestion worked! After reinstalling patterns-uyuni_server, system seems to be completely restored. No way to let communicate again the proxy with uyuni server, but at this point reinstalling it is the least problem (starting from point of view that 15.3 upgrade of proxy was needed too).

Summarizing: I still think that upgrade path from 2021.05 to 2021.06 has something to be checked, but now I'm onto 2021.09, so... please let me know if You think this issue has to be closed now or not.

Anyway, thanks for your help. F.

juliogonzalez commented 2 years ago

Good to hear it worked.

For the proxy, you can replace it: https://www.uyuni-project.org/uyuni-docs/en/uyuni/installation/proxy-setup.html#_replace_a_proxy

The issue you saw could be a combination of the Leap 15.2 packages you had together with 2021.05, plus the change to Leap 15.3 with Uyuni 2021.06.

But since I was unable to reproduce it, and we don't have any other reports from the community, it could also be something very specific to your machines.

I suggest we close it, and if someone has the same issue, we can reopen it again :-)

FiliMila commented 2 years ago

ok thanks. F.