Maybe it’s that python2-psycopg2
remnant you have still installed, then. What would be removed if you run:
zypper remove python2-psycopg2
(you can say n
for no here again if you don’t want to commit).
Maybe it’s that python2-psycopg2
remnant you have still installed, then. What would be removed if you run:
zypper remove python2-psycopg2
(you can say n
for no here again if you don’t want to commit).
I have removed python2-psycopg2
Sadly that didnt seem to help. Still gets an error about depency.
journalctl -xe, gives this:
Jan 18 22:28:09 RockstorNAS [RPM][6204]: Transaction ID 65a997e9 started
Jan 18 22:28:09 RockstorNAS systemd[1]: Reloading.
Jan 18 22:28:09 RockstorNAS systemd[1]: Configuration file /etc/systemd/system/smb.service is marked world-inaccessible. This has no effect as con>
Jan 18 22:28:09 RockstorNAS systemd[1]: /usr/lib/systemd/system/rpc-statd.service:14: PIDFile= references a path below legacy directory /var/run/,>
Jan 18 22:28:10 RockstorNAS systemd[1]: Reloading.
Jan 18 22:28:11 RockstorNAS systemd[1]: Configuration file /etc/systemd/system/smb.service is marked world-inaccessible. This has no effect as con>
Jan 18 22:28:11 RockstorNAS systemd[1]: /usr/lib/systemd/system/rpc-statd.service:14: PIDFile= references a path below legacy directory /var/run/,>
Jan 18 22:28:11 RockstorNAS [RPM][6204]: install rockstor-5.0.6-0.x86_64: success
Jan 18 22:28:11 RockstorNAS [RPM][6204]: Transaction ID 65a997e9 finished: 0
Jan 18 22:28:27 RockstorNAS sudo[5497]: pam_unix(sudo:session): session closed for user root
Jan 18 22:28:33 RockstorNAS sudo[7816]: root : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/systemctl start rockstor-bootstrap
Jan 18 22:28:33 RockstorNAS sudo[7816]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Jan 18 22:28:33 RockstorNAS systemd[1]: Starting PostgreSQL database server…
░░ Subject: A start job for unit postgresql.service has begun execution
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit postgresql.service has begun execution.
░░
░░ The job identifier is 5247.
Jan 18 22:28:33 RockstorNAS postgresql-script[7819]: Your database files were created by PostgreSQL version 10.
Jan 18 22:28:33 RockstorNAS postgresql-script[7819]: Could not find executables for this version.
Jan 18 22:28:33 RockstorNAS postgresql-script[7819]: Please install the PostgreSQL server package for version 10.
Jan 18 22:28:33 RockstorNAS systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ An ExecStart= process belonging to unit postgresql.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Jan 18 22:28:33 RockstorNAS systemd[1]: postgresql.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit postgresql.service has entered the ‘failed’ state with result ‘exit-code’.
Jan 18 22:28:33 RockstorNAS systemd[1]: Failed to start PostgreSQL database server.
░░ Subject: A start job for unit postgresql.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit postgresql.service has finished with a failure.
░░
░░ The job identifier is 5247 and the job result is failed.
Jan 18 22:28:33 RockstorNAS systemd[1]: Dependency failed for Tasks required prior to starting Rockstor.
░░ Subject: A start job for unit rockstor-pre.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor-pre.service has finished with a failure.
░░
░░ The job identifier is 5237 and the job result is dependency.
Jan 18 22:28:33 RockstorNAS systemd[1]: Dependency failed for Rockstor startup script.
░░ Subject: A start job for unit rockstor.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor.service has finished with a failure.
░░
░░ The job identifier is 5121 and the job result is dependency.
Jan 18 22:28:33 RockstorNAS systemd[1]: Dependency failed for Rockstor bootstrapping tasks.
░░ Subject: A start job for unit rockstor-bootstrap.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor-bootstrap.service has finished with a failure.
░░
░░ The job identifier is 5120 and the job result is dependency.
Jan 18 22:28:33 RockstorNAS systemd[1]: rockstor-bootstrap.service: Job rockstor-bootstrap.service/start failed with result ‘dependency’.
Jan 18 22:28:33 RockstorNAS systemd[1]: rockstor.service: Job rockstor.service/start failed with result ‘dependency’.
Jan 18 22:28:33 RockstorNAS systemd[1]: rockstor-pre.service: Job rockstor-pre.service/start failed with result ‘dependency’.
Jan 18 22:28:33 RockstorNAS sudo[7816]: pam_unix(sudo:session): session closed for user root
lines 1245-1317/1317 (END)
It seems it complains about database files being made by SQL10, that is now missing
I’m off to bed for today, I’ll pick up again tommorow evening, if you have any ideas for what I can do.
Thanks for being willing to test like that with me… that’s part of what can happen on the Testing channel but I’m sorry I couldn’t get an easy answer to you.
Now, I think I do have a better idea of what is actually happening, although having a simple resolution besides re-installing Rockstor might be more difficult.
Correct; here it is for reference:
This happens when the postgresql.service
systemd service tries to start. If we look at that service (systemctl cat postgresql.service
), we can see it tries to run the following:
ExecStart=/usr/share/postgresql/postgresql-script start
That file is provided by the system postgresql-server
package (v16 as of this writing):
# zypper search --provides /usr/share/postgresql/postgresql-script
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+-------------------+-----------------------------------------------------------+--------
i | postgresql-server | The Programs Needed to Create and Run a PostgreSQL Server | package
That script is just a bash script that does some checks, such as compatibility between postgresql versions. The part that is failing on your machine is:
if test -r $DATADIR/PG_VERSION ; then
DATA_VERSION=$(cat $DATADIR/PG_VERSION)
POSTGRES=/usr/lib/postgresql$(echo -n $DATA_VERSION | tr -d .)/bin/postgres
fi
if test -x /usr/bin/postgres; then
ACTIVE=$(readlink -q -f /usr/bin/postgres)
test -z "$POSTGRES" && POSTGRES="$ACTIVE"
fi
if test -n "$DATA_VERSION"; then
if test -z "$ACTIVE" -o "$ACTIVE" != "$POSTGRES"; then
echo " Your database files were created by PostgreSQL version $DATA_VERSION."
if test -x "$POSTGRES"; then
echo " Using the executables in $(dirname $POSTGRES)."
else
echo " Could not find executables for this version."
echo " Please install the PostgreSQL server package for version $DATA_VERSION."
fi
fi
If you run cat /var/lib/pgsql/data/PG_VERSION
, you should indeed see 10
.
Now, the problem is on how to migrate the database from v10 to v13. I’ll need to be more careful about that one (it seems a db dump followed by restore with the new psql version used to be the way) but that is uncharted territory for me. @phillxnet , would you have any insight here?
A re-install of Rockstor would save you all that hassle, of course, as you would start anew.
EDIT: some details on how to manually upgrade: SDB:PostgreSQL - openSUSE Wiki
These would be rather involved and I’m not sure yet how well they would play with future updates, though.
It responded 10 as you expected.
I would off course like to not have to reinstall, as many things would then have to be setup again.
But if the install is allready broken to a point where it would be hard to repair, I guess I’ll have to do just that.
I’m just having a hard time having to reinstall a setup that boots and works, but just needs to have the Rockstor install repaired
Thanks a lot for the confirmation!
@phillxnet created a dedicated issue to explore our options to address this, thanks to your willingness to test and debug above. Thank you so much, @phillxnet, for already looking into this despite everything else you already had ongoing.
It’s not really broken per se. It’s just that postgresql refuses to start a database that was created by a different version. Rockstor itself simply cannot start because of that. That means that your database is not really broken or damaged, but it does need to be upgraded to a newer version of PostgreSQL. If you do delete /var/lib/pgsql/data/
, then yes, your database is gone, but that is not the case here. I’m hopeful there is a way out of this for you without having to re-install Rockstor, but of course, we cannot know for sure yet as that has not been tested yet. I understand time may be of the essence here for you so it depends on whether you can/are willing to wait for this potential database upgrade option.
Sorry I’m not able to provide you with a better answer just now.
Thats fine.
I’ll leave the system as it is right now, and will be happy to test the fix that they develop.
It seems I have triggered a specific set of events to make this happen, but I cant be the only one that has been upgrading from old installs, trying to stay updated, so others will probably see these problems.
I’ll await what happens.
I had the same issue and tried the below and it works for me.
Through SSH
sudo zypper in --force rockstor
Followed by:
sudo systemctl start rockstor-bootstrap
I saw that a new version was available so I went ahead and did:
sudo zypper in --force rockstor
Which took some time, but seemingly produced no errors.
Followed by:
sudo systemctl start rockstor-bootstrap
Which gave this output:
A dependency job for rockstor-bootstrap.service failed. See ‘journalctl -xe’ for details.
“journalctl -xe” gives this:
░░ The unit run-user-26.mount has successfully entered the ‘dead’ state.
Jan 29 16:08:53 RockstorNAS systemd[1]: user-runtime-dir@26.service: Deactivate>
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit user-runtime-dir@26.service has successfully entered the ‘dead’ sta>
Jan 29 16:08:53 RockstorNAS systemd[1]: Stopped User Runtime Directory /run/use>
░░ Subject: A stop job for unit user-runtime-dir@26.service has finished
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A stop job for unit user-runtime-dir@26.service has finished.
░░
░░ The job identifier is 71789 and the job result is done.
Jan 29 16:08:53 RockstorNAS systemd[1]: Removed slice User Slice of UID 26.
░░ Subject: A stop job for unit user-26.slice has finished
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A stop job for unit user-26.slice has finished.
░░
░░ The job identifier is 71791 and the job result is done.
lines 1507-1529/1529 (END)
░░ The unit run-user-26.mount has successfully entered the ‘dead’ state.
Jan 29 16:08:53 RockstorNAS systemd[1]: user-runtime-dir@26.service: Deactivate>
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit user-runtime-dir@26.service has successfully entered the ‘dead’ sta>
Jan 29 16:08:53 RockstorNAS systemd[1]: Stopped User Runtime Directory /run/use>
░░ Subject: A stop job for unit user-runtime-dir@26.service has finished
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A stop job for unit user-runtime-dir@26.service has finished.
░░
░░ The job identifier is 71789 and the job result is done.
Jan 29 16:08:53 RockstorNAS systemd[1]: Removed slice User Slice of UID 26.
░░ Subject: A stop job for unit user-26.slice has finished
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A stop job for unit user-26.slice has finished.
░░
░░ The job identifier is 71791 and the job result is done.
“cat /var/lib/pgsql/data/PG_VERSION” gives 13, so the update of the database was successfull.
Any ideas as how to bring it back to life?
@KarstenV Hello again.
Thanks again for helping to tease out the multi-faceted issues around this last testing update.
Re:
Just wanted to note that we now have 5.0.7-0 out in testing. It should address both the DB format update requirement issue from systems dating back to Leap 15.3, and the failure to remove our legacy Poetry version, both uncovered predominantly in this thread.
See:
A regular command line update of the rockstor
rpm should invoke the required DB update and legacy poetry removal. But you system may be in an interim state, so do keep that in mind and report as you go here, just in case.
N.B. you will need to re-install your by-hand removed postgres10 dependencies. That helped to diagnose the problem: but they are a definite required to be installed to perform the db update. The script we added to do this DB update can be run by-hand
as root at the command line, and will help to inform you of these requirements. Existing systems will already have these installed as that is what the systemd required before to access the older DB formats.
Hope that helps.
Seems I answered before your post.
As you’ll see it still does not work.
Any input to what I could try is welcome
@KarstenV Hello again.
We will need a little more log entries on this front. Note that this update has been tested to update from a 4.6.1-0 install with your reported DB, but again we need to know if you did this rpm update before re-installing he by-hand removed postgres10 dependencies of yaw. If you did then this is the problem.
I.e. what postgres packages do you have installed ?
Folks running old DB formats will still have all the old dependencies to read them. This is assumed.
I remember reinstalling postgres 10 again after removing it to restore my system to the previous state.
Running “update-alternatives --list postgresql”, gives this:
/usr/lib/postgresql10
/usr/lib/postgresql13
/usr/lib/postgresql14
So postgres 10, 13 & 14 is installed.
After a reboot I tried “journalctl -xe”
This time it was much more talkative:
Jan 29 16:33:06 RockstorNAS su[19427]: pam_unix(su-l:session): session opened for user postgres by (uid=0)
Jan 29 16:33:06 RockstorNAS su[19427]: pam_unix(su-l:session): session closed for user postgres
Jan 29 16:33:06 RockstorNAS systemd[1]: session-c7.scope: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit session-c7.scope has successfully entered the ‘dead’ state.
Jan 29 16:33:06 RockstorNAS su[19466]: (to postgres) root on none
Jan 29 16:33:06 RockstorNAS systemd[1]: Started Session c8 of User postgres.
░░ Subject: A start job for unit session-c8.scope has finished successfully
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit session-c8.scope has finished successfully.
░░
░░ The job identifier is 2969.
Jan 29 16:33:06 RockstorNAS su[19466]: pam_unix(su-l:session): session opened for user postgres by (uid=0)
Jan 29 16:33:06 RockstorNAS su[19466]: pam_unix(su-l:session): session closed for user postgres
Jan 29 16:33:06 RockstorNAS systemd[1]: session-c8.scope: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit session-c8.scope has successfully entered the ‘dead’ state.
Jan 29 16:33:06 RockstorNAS su[19499]: (to postgres) root on none
Jan 29 16:33:06 RockstorNAS systemd[1]: Started Session c9 of User postgres.
░░ Subject: A start job for unit session-c9.scope has finished successfully
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit session-c9.scope has finished successfully.
░░
░░ The job identifier is 3089.
Jan 29 16:33:06 RockstorNAS su[19499]: pam_unix(su-l:session): session opened for user postgres by (uid=0)
Jan 29 16:33:07 RockstorNAS su[19499]: pam_unix(su-l:session): session closed for user postgres
Jan 29 16:33:07 RockstorNAS systemd[1]: session-c9.scope: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit session-c9.scope has successfully entered the ‘dead’ state.
Jan 29 16:33:09 RockstorNAS systemd[1]: rockstor-pre.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ An ExecStart= process belonging to unit rockstor-pre.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Jan 29 16:33:09 RockstorNAS systemd[1]: rockstor-pre.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ The unit rockstor-pre.service has entered the ‘failed’ state with result ‘exit-code’.
Jan 29 16:33:09 RockstorNAS systemd[1]: Failed to start Tasks required prior to starting Rockstor.
░░ Subject: A start job for unit rockstor-pre.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor-pre.service has finished with a failure.
░░
░░ The job identifier is 2719 and the job result is failed.
Jan 29 16:33:09 RockstorNAS systemd[1]: Dependency failed for Rockstor startup script.
░░ Subject: A start job for unit rockstor.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor.service has finished with a failure.
░░
░░ The job identifier is 2603 and the job result is dependency.
Jan 29 16:33:09 RockstorNAS systemd[1]: Dependency failed for Rockstor bootstrapping tasks.
░░ Subject: A start job for unit rockstor-bootstrap.service has failed
░░ Defined-By: systemd
░░ Support: systemd-devel Info Page
░░
░░ A start job for unit rockstor-bootstrap.service has finished with a failure.
░░
░░ The job identifier is 2602 and the job result is dependency.
Jan 29 16:33:09 RockstorNAS systemd[1]: rockstor-bootstrap.service: Job rockstor-bootstrap.service/start failed with result ‘dependency’.
Jan 29 16:33:09 RockstorNAS systemd[1]: rockstor.service: Job rockstor.service/start failed with result ‘dependency’.
Jan 29 16:33:09 RockstorNAS sudo[19083]: pam_unix(sudo:session): session closed for user root
Take a look at the following PR:
Your presumed shell scripting capability should enable you to see what we do, and why. We also do not delete the old DB. If you are careful you can also preserve that and re-instate it, if need be. But we need more info on what is failing on your system currently. I.e. your system is in an indeterminate state, and we need to know more about exactly what is failing.
I.e. if you re-installed all of Posgtres dependencies, it’s not just postgresql10 for example, but also the server related package that may have been removed when you uninstalled postgres10.
For example a system such as yours would have had at least the following installed by way of grand-fathering in form the Leap 15.3 base OS of the installer and original DB instantiation:
installer:~ # zypper se -s postgresql10
...
i+ | postgresql10 | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
...
i+ | postgresql10-server | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
...
Also look to the zypper history, that will be far more informative (hopefully) on your install. Also I’m unsure if the --force in will have resulted in the same outcome as an update.
Also note the following from the proof of function system used here:
installer:~ # ls -la /var/lib/pgsql/
total 20
drwxr-x--- 1 postgres postgres 144 Jan 26 15:42 .
drwxr-xr-x 1 root root 442 Jan 19 16:34 ..
-rwx------ 1 postgres postgres 769 Jan 26 15:42 analyze_new_cluster.sh
-rw-r----- 1 postgres postgres 192 Oct 20 2021 .bash_profile
lrwxrwxrwx 1 postgres postgres 6 Jan 26 15:42 data -> data13
drwx------ 1 postgres postgres 522 Jan 26 15:41 data10
drwx------ 1 postgres postgres 550 Jan 29 15:32 data13
-rwx------ 1 postgres postgres 42 Jan 26 15:42 delete_old_cluster.sh
Your’s should be very similar, but for others reading this, not necessarily so. @KarstenV system proved our need for DB update that is associated only with older installs zypper dup
’ed to cutting edge testing.
Your V10 DB is saved in the data10 directory. Take great care not to loose it if you experiment. If you look to that script we create data13 from an original data dir (not link back then) moved to data10, then create the new data (link this time) to data13 after the migration used data10 & data13. The zypper history log:
less /var/log/zypp/history
should have some info as per the linked PR example. I.e. we given feedback there on the progress of our new script.
Also we now have a much improved, debug wise, contents of:
cat /opt/rockstor/poetry-install.txt
to help pin down if the problem was the new venv creation or the DB update. The two failures from updating an older system. But again, we have successfully tested 5.0.7-0 to update from our last stable of 4.6.1-0 (when derived as per yours, from a 15.3 installer). But it would be good to diagnose you issue if it doesn’t just relate to an interim state due to active testing on this install. But more info is good and it would be good to get this old install back in order: if possible.
OK a lot of things to digest.
I must admit my scripting capabilities may not be up to understanding all of it, I’m sorry.
I ran “zypper se -s postgresql10”
Which out put this.
Loading repository data…
Reading installed packages…
S | Name | Type | Version | Arch | Repository
—±---------------------------±-----------±--------------------±-------±------------------------------------------------------------
i+ | postgresql10 | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v | postgresql10 | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v | postgresql10 | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
v | postgresql10 | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10 | srcpackage | 10.23-150100.8.53.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10 | srcpackage | 10.22-150100.8.50.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10 | srcpackage | 10.21-150100.8.47.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-contrib | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-contrib | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-contrib | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-contrib | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-devel | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-docs | package | 10.23-150100.8.53.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-docs | package | 10.22-150100.8.50.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-docs | package | 10.21-150100.8.47.1 | noarch | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-docs | package | 10.20-8.44.1 | noarch | Leap_15_4
| postgresql10-llvmjit-devel | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-llvmjit-devel | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-llvmjit-devel | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-llvmjit-devel | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-pgagent | package | 4.0.0-150400.15.4 | x86_64 | Leap_15_4
| postgresql10-pgaudit | package | 1.2.4-bp154.4.3.1 | x86_64 | Update repository of openSUSE Backports
| postgresql10-pgaudit | package | 1.2.4-bp154.3.26 | x86_64 | Leap_15_4
| postgresql10-pgaudit | package | 1.2.4-bp154.4.3.1 | i586 | Update repository of openSUSE Backports
| postgresql10-pgaudit | srcpackage | 1.2.4-bp154.4.3.1 | noarch | Update repository of openSUSE Backports
| postgresql10-plperl | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plperl | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plperl | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plperl | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-plpython | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plpython | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plpython | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-plpython | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-plr | package | 8.4-bp154.1.45 | x86_64 | Leap_15_4
| postgresql10-plr-doc | package | 8.4-bp154.1.45 | x86_64 | Leap_15_4
| postgresql10-pltcl | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-pltcl | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-pltcl | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-pltcl | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-server | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-server | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-server | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-server | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-test | package | 10.23-150100.8.53.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-test | package | 10.22-150100.8.50.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-test | package | 10.21-150100.8.47.1 | x86_64 | Update repository with updates from SUSE Linux Enterprise 15
| postgresql10-test | package | 10.20-8.44.1 | x86_64 | Leap_15_4
| postgresql10-timescaledb | package | 1.7.1-bp154.1.46 | x86_64 | Leap_15_4
If I understand correctly, I have the required postgresql packages.
“ls -la /var/lib/pgsql/”
total 24
drwxr-x— 1 postgres postgres 204 Jan 29 16:08 .
drwxr-xr-x 1 root root 496 Jun 10 2023 …
-rw-r----- 1 postgres postgres 192 Oct 20 2021 .bash_profile
drwx------ 1 postgres postgres 550 Jan 29 16:33 data
drwx------ 1 postgres postgres 522 Jan 18 22:19 data10
drwx------ 1 postgres postgres 454 Jan 29 16:08 data13
-rw-r–r-- 1 postgres postgres 908 Jan 29 16:08 initlog
-rw------- 1 postgres postgres 260 Jan 29 16:08 pg_upgrade_internal.log
-rw------- 1 postgres postgres 179 Jan 29 16:08 pg_upgrade_server.log
-rw------- 1 postgres postgres 179 Jan 29 16:08 pg_upgrade_utility.log
Mine does not contain the data → data13 line if that is of consequence.
“cat /opt/rockstor/poetry-install.txt”
LC_ALL=C
LANG=da_DK.UTF-8
SUDO_GID=0
OLDPWD=/
COLORTERM=1
BOOST_TEST_CATCH_SYSTEM_ERRORS=no
RPM_IgnoreFailedSymlinks=1
SUDO_COMMAND=/usr/bin/zypper in --force rockstor
USER=root
PWD=/opt/rockstor
PIPX_HOME=/opt/pipx
LINES=24
HOME=/root
LC_CTYPE=da_DK.UTF-8
SUDO_USER=root
PIPX_MAN_DIR=/usr/local/share/man
ZYPP_IS_RUNNING=6271
PIPX_BIN_DIR=/usr/local/bin
SUDO_UID=0
COLUMNS=80
MAIL=/var/mail/root
TERM=xterm
SHELL=/bin/bash
SHLVL=2
LOGNAME=root
PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin
_=/usr/bin/env
Poetry (version 1.7.1)
Loading configuration file /opt/rockstor/poetry.toml
Creating virtualenv rockstor in /opt/rockstor/.venv
Using virtualenv: /opt/rockstor/.venv
Installing dependencies from lock file
Finding the necessary packages for the current system
Package operations: 50 installs, 0 updates, 0 removals, 1 skipped
• Installing pycparser (2.21)
• Installing cffi (1.16.0)
• Installing h11 (0.14.0)
• Installing cryptography (41.0.7)
• Installing jeepney (0.8.0)
• Installing more-itertools (10.1.0)
• Installing wsproto (1.2.0)
• Installing zipp (3.17.0)
• Installing wrapt (1.16.0)
• Installing asgiref (3.7.2)
• Installing certifi (2023.11.17)
• Installing charset-normalizer (3.3.2)
• Installing idna (3.6)
• Installing importlib-metadata (6.8.0)
• Installing jaraco-classes (3.3.0)
• Installing secretstorage (3.3.3)
• Installing simple-websocket (1.0.0)
• Installing deprecated (1.2.14)
• Installing sqlparse (0.4.4)
• Installing urllib3 (2.1.0)
• Installing bidict (0.22.1)
• Installing django (4.2.7)
• Installing greenlet (3.0.1)
• Installing jwcrypto (1.5.0)
• Installing keyring (23.13.1)
• Installing oauthlib (3.2.2)
• Installing packaging (23.2)
• Installing python-engineio (4.8.0)
• Installing pytz (2023.3.post1)
• Installing typing-extensions (4.8.0)
• Installing zope-event (5.0)
• Installing requests (2.31.0)
• Installing zope-interface (6.1)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
• Installing dbus-python (1.3.2)
• Installing distro (1.8.0)
• Installing django-oauth-toolkit (2.3.0)
• Installing djangorestframework (3.14.0)
• Installing keyring-pass (0.8.1)
• Installing psycopg (3.1.13)
• Installing gevent (23.9.1)
• Installing psutil (5.9.4)
• Installing huey (2.5.0)
• Installing gunicorn (21.2.0)
• Installing python-socketio (5.9.0)
• Installing psycogreen (1.0)
• Installing setuptools (69.0.2): Skipped for the following reason: Already installed
• Installing six (1.16.0)
• Installing pyzmq (25.1.1)
• Installing supervisor (4.2.4)
• Installing django-pipeline (2.1.0)
• Installing urlobject (2.1.1)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Installing the current project: rockstor (5.0.7)
I dont know if these things tell you anything.
I would of course still like to solve the problem, but I’m in a little deep here
@KarstenV
Re:
but I don’t see the server package for 10 installed. I.e. it doesn’t start with i
(installed) or i+
installed and updated.
I.e. they are not installed, when you uninstalled the postgres it likely too them with it. But note we still need the alternatives at 13, openSUSE systemd script (as per @Flox exposition) auto selects what is requried.
And yes: as per:
you “data” is a directory so our script likely failed and re-starting postgres service auto-created data.
Take care here, you do not want to loose data10 dir. I’ve got to step aside for a bit but ‘data’ not being a link means it is likely a default postgresql13 start enacted “I don’t see data, so I will create a blank one”.
I’ll be back in a bit for a safe re-run of this script, I did it multiple times when developing. Should have done a forum wiki on this but maybe in time I will :).
That’s the tell here. All good and recoverable, just install that missing server and unsure you still have 13 as the postgres alternatives as a re-install of rockstor will ensure also.
Looks good. Problem is down to dependencies removed re postgresql10-server is the initial though here and I’ll be back soon with the procedure to reset and not loose the old DB.
Yes, we have progress. Just give us a bit as I have to step away.
Me also and I think we have this. Hang in there, likely down to initial investigation and removal of dependency of script.
zypper history log as I’ve edited in a prior post would also be usefull. Should say where the migration script failed.
Almost there on restoring your testing instance .
I’ll await your instructions.
I did run a zypper log, but output was enormous. I didnt want to spam the thread even more.
@KarstenV Hello again.
Re:
N.B. these instructions are not intend for general consumption, but it’s not yet certain if @KarstenV failed DB format update is down to a short-fall in accounting for prior state (from a 15.3 DB), or just missing dependencies as a result of their testing orientated system and some package removals involved in diagnosing the original, now fixed (hopefully) issues observed in 5.0.6-0 testing rpm.
@KarstenV Assuming you have reinstalled postgresql10-server we can try running the db_update.sh script by-hand to get more feedback on the potential failure, if it wasn’t just an uninstalled package during development contributions above. Note that there is likely already some debug info in that long zypper history log and within postres users home (/var/lib/pgsql/) but give your system is now atypical as it was involved in some diagnostic alterations we are just after a re-do to get you up-and-running again.
Not normally required: intended for recovery for @KarstenV’s test system. But may be interesting for folks who would like to know how this script works.
Assumed start state, as per @KarstenV development instance reported state.
mv data data10
)data -> data13
symbolic link, not a directory) so this was not created by db_upgrade.sh and likely by default postgresql systemd service start after a failed db migration.N.B. We are to loose all settings changed after initial migration: none for @KarstenV as no rockstor-service yet*
Note again we are assuming here that the data dir (not link) is created by postgresql13 upon start-up and is thus a default DB (essentially empty). If db_upgrade.sh created it, it would be a link. This is because we are now moving to versioned DB dirs: i.e. the data10 data13 ones.
# The following will also stop rockstor services.
systemctl stop postgresql.service
# 5.0.7-0's db_upgrade.sh creates data -> data13 but @KarstenV system has a dir not a link
# So we play safe (if space allows) and mv reminants out to different names.
mv /var/lib/pgsql/data /var/lib/pgsql/data-temp
mv /var/lib/pgsql/data13 /var/lib/pgsql/data13-temp
# We can now re-instate the V10 /data directory db_upgrade.sh expects:
mv /var/lib/pgsql/data10 /var/lib/pgsql/data
systemctl start postgresql.service
# confirm start-up of the old V10 format DB by what executable was chosen to read it:
ps aufx | grep '^postgres.* -D'
# likely output from above contains: /usr/lib/postgresql10/bin/postgres -D /var/lib/pgsql/data
#
# now we re-run, as root user, our 10 to 13 migration to see if we missed anything.
# `/opt/rockstor/src/rockstor/scripts/db_upgrade.sh` provides instructions.
# Expected execution time, up to a few minutes, likely only 1 or 2.
# V10 format to V13
/opt/rockstor/src/rockstor/scripts/db_upgrade.sh 10 13
#
# Note all output from above bash script.
# Confirm new Postgresql format via binary selected by it's systemd start script:
ps aufx | grep '^postgres.* -D'
# Likely output from above contains: /usr/lib/postgresql13/bin/postgres -D /var/lib/pgsql/data
# as instructed by the script output we can now start our rockstor services via their cascade:
systemctl start rockstor-bootstrap.service
@KarstenV let us know what you find out. Again db_upgrade.sh
has been tested a lot of times on a generic install originating from our last Stable rpm and our earliest installer based on 15.3 (duped to 15.4), as per likely your instance. But field testing is always useful.
Plus given you helped find the cause of our prior upgrade limitations in 5.0.6-0 now fixed in 5.0.7-0, I’d rather not leave you in the lurch as it were . Plus we may learn some things here, and folks reading along will see what we do in that script, and the more folks aware, who are interested, the better. Pretty sure I’ve followed good practice in that db_upgrade.sh script by the way. Also pretty easy to read for anyone interested in improving what we have there. It was written to address all future DB format upgrades also, via differing parameters, so as always pull requests welcome.
Hope that helps.