Upgrade to 5.0.1-0 from 4.6.1 rockstor fails

Hi @Flox,

Testing channel was already enabled. I updated via the command-line

ls -lah /opt/rockstor
total 688K
drwxr-xr-x 1 root root  388 Jul 24 21:59 .
drwxr-xr-x 1 root root   36 Jan 21  2023 ..
-rwxr--r-- 1 root root 3.2K Jul 24 20:06 build.sh
drwxr-xr-x 1 root root   92 Jan 21  2023 certs
drwxr-xr-x 1 root root  572 Jul 24 21:59 conf
-rw-r--r-- 1 root root  35K Jul 24 20:06 COPYING
drwxr-xr-x 1 root root   54 Jul 24 21:59 etc
-rw-r--r-- 1 root root    0 Jan 21  2023 .initrock
-rw-r--r-- 1 root root 6.4K Jul 24 20:07 PKG-INFO
-rw-r--r-- 1 root root 4.4K Jul 24 22:00 poetry-install.txt
-rw-r--r-- 1 root root  56K Jul 24 20:06 poetry.lock
-rw-r--r-- 1 root root   32 Jul 24 20:06 poetry.toml
-rw-r--r-- 1 root root 5.1K Jul 24 20:06 pyproject.toml
-rw-r--r-- 1 root root 4.6K Jul 24 20:06 README.md
-rw-r--r-- 1 root root 523K Jul 24 20:07 rockstor-jslibs.tar.gz
-rw-r--r-- 1 root root   89 Jul 24 20:07 rockstor-jslibs.tar.gz.sha256sum
-rw-r--r-- 1 root root  28K Jun 29 09:00 rockstor-tasks-huey.db
drwxr-xr-x 1 root root   16 Jul 24 20:07 src
drwxr-xr-x 1 root root    6 Jul 24 20:07 var
drwxr-xr-x 1 root root   76 Jul 24 21:59 .venv
cat /opt/rockstor/poetry-install.txt
Creating virtualenv rockstor in /opt/rockstor/.venv
Installing dependencies from lock file

Package operations: 30 installs, 0 updates, 0 removals

  • Installing certifi (2023.5.7)
  • Installing charset-normalizer (2.0.12)
  • Installing greenlet (2.0.2)
  • Installing idna (3.4)
  • Installing pytz (2023.3)
  • Installing six (1.16.0)
  • Installing urllib3 (1.26.16)
  • Installing zope.event (4.6)
  • Installing zope.interface (5.5.2)
  • Installing django (1.11.29)
  • Installing gevent (22.10.2)
  • Installing oauthlib (3.1.0)
  • Installing python-engineio (2.3.2)
  • Installing requests (2.27.1)
  • Installing dbus-python (1.2.18)
  • Installing distro (1.8.0)
  • Installing django-braces (1.13.0)
  • Installing django-pipeline (1.6.9)
  • Installing django-oauth-toolkit (1.1.2)
  • Installing djangorestframework (3.9.3)
  • Installing gevent-websocket (0.10.1)
  • Installing gunicorn (19.10.0)
  • Installing huey (2.3.0)
  • Installing psutil (5.9.4)
  • Installing psycogreen (1.0)
  • Installing psycopg2 (2.8.6)
  • Installing python-socketio (1.6.0)
  • Installing pyzmq (19.0.2)
  • Installing supervisor (4.2.4)

  EnvCommandError

  Command ['/opt/rockstor/.venv/bin/pip', 'install', '--no-deps', 'file:///root/.cache/pypoetry/artifacts/24/e0/2a/67b7afae8a4768f1dc78a1dcbce75f9c7198ae57a91ad55efdd5ff0b5b/psycopg2-2.8.6.tar.gz'] errored with the following return code 1, and output: 
  Processing /root/.cache/pypoetry/artifacts/24/e0/2a/67b7afae8a4768f1dc78a1dcbce75f9c7198ae57a91ad55efdd5ff0b5b/psycopg2-2.8.6.tar.gz
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /opt/rockstor/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-d56168wa/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-d56168wa/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-a1l5gv4s
         cwd: /tmp/pip-req-build-d56168wa/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-a1l5gv4s/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-a1l5gv4s/psycopg2.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-a1l5gv4s/psycopg2.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-a1l5gv4s/psycopg2.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-a1l5gv4s/psycopg2.egg-info/SOURCES.txt'
    
    Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <https://www.psycopg.org/docs/install.html>).
    
    ----------------------------------------
  WARNING: Discarding file:///root/.cache/pypoetry/artifacts/24/e0/2a/67b7afae8a4768f1dc78a1dcbce75f9c7198ae57a91ad55efdd5ff0b5b/psycopg2-2.8.6.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  

  at ~/.local/share/pypoetry/venv/lib64/python3.6/site-packages/poetry/utils/env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│ 
      1197│         return decode(output)
      1198│ 
      1199│     def execute(self, bin, *args, **kwargs):

  • Installing urlobject (2.1.1)
1 Like

Here’s the culprit… Now, let’s see if we can figure why it failed to find pg_config.
What is your base OS?

cat /etc/os-release

The pg_config is provided by the postgresql13-server-devel on a Leap15.4 Rockstor install from the ISO, so let’s verify that in your system:
first, is it present?

which pg_config

and then is the package installed?

$ zypper info postgresql13-server-devel
Loading repository data...
Reading installed packages...


Information for package postgresql13-server-devel:
--------------------------------------------------
Repository     : Update repository with updates from SUSE Linux Enterprise 15
Name           : postgresql13-server-devel
Version        : 13.11-150200.5.40.1
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 6.0 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : postgresql13-13.11-150200.5.40.1.src
Upstream URL   : https://www.postgresql.org/
Summary        : PostgreSQL server development header files and utilities
Description    : 
    PostgreSQL is an advanced object-relational database management system
    that supports an extended subset of the SQL standard, including
    transactions, foreign keys, subqueries, triggers, and user-defined
    types and functions.

    This package contains the header files and libraries needed to compile
    C extensions that link into the PostgreSQL server. For building client
    applications, see the postgresql13-devel package.
1 Like
cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.4"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.4"
PRETTY_NAME="Rockstor built on openSUSE Leap 15.4"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.4"
BUG_REPORT_URL="https://forum.rockstor.com"
HOME_URL="http://rockstor.com/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"

which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)

zypper info postgresql13-server-devel
Retrieving repository 'Update repository of openSUSE Backports' metadata .............................................................................................................................[done]
Building repository 'Update repository of openSUSE Backports' cache ..................................................................................................................................[done]
Loading repository data...
Reading installed packages...

Information for package postgresql13-server-devel:
--------------------------------------------------
Repository     : Update repository with updates from SUSE Linux Enterprise 15
Name           : postgresql13-server-devel
Version        : 13.11-150200.5.40.1
Arch           : x86_64
Vendor         : SUSE LLC <https://www.suse.com/>
Installed Size : 6.0 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : postgresql13-13.11-150200.5.40.1.src
Upstream URL   : https://www.postgresql.org/
Summary        : PostgreSQL server development header files and utilities
Description    : 
    PostgreSQL is an advanced object-relational database management system
    that supports an extended subset of the SQL standard, including
    transactions, foreign keys, subqueries, triggers, and user-defined
    types and functions.

    This package contains the header files and libraries needed to compile
    C extensions that link into the PostgreSQL server. For building client
    applications, see the postgresql13-devel package.
3 Likes

Hi @Flox,

I did a google search and this is defo not an area I have had experience before and it does see that the ‘pg_config’ is not configured and looking at this website

PostgreSQL: Documentation: 15: pg_config

Example
To reproduce the build configuration of the current PostgreSQL installation, run the following command:

eval ./configure `pg_config --configure`
The output of pg_config --configure contains shell quotation marks so arguments with spaces are represented correctly. Therefore, using eval is required for proper results.

Is this the way to address this issue so I can get my media server back online?

Thanks

Hi @agjbond007 ,

Sorry for not getting back earlier… This one is actually a bit tricky as it results from some unknown changes in the system packages that provides this binary. I started looking into it last night but got interrupted and I haven’t been able to find time since.

The bottom line is that this binary is “supposed” to be provided by the postgresql13-server-devel package, but it isn’t anymore in your system. I suspect something happened during some system updates–this is also likely if you stayed from 15.3 and zypper dup’ed to 15.4 as there may have been some changes in how that binary is provided.

I unfortunately can’t test any of this at this very moment but if you are game, we can try to see if reinstalling/installing some packages can help you. I must preface that this would be trial and error for me, though. Let me know if you are game and I can write down what I can think worth trying.

2 Likes

Hi @Flox,

I am game, pass over the details I will read and understand the risks and we can build a test plan to confirm what makes this issue go away.

Thanks

2 Likes

Thanks, and thank you for your understanding here…

Ok, so first, let’s make sure your system has all the repos it should and that all is up-to-date:

zypper ref
zypper update --no-recommends
zypper lr --uri

Let’s also make sure this didn’t magically resolve the issue by verifying the presence/absence of the missing binary:

which pg_config
1 Like

For reference, here’s how it looks like on my end:

rockstable:~ # zypper lr --uri
Repository priorities in effect:                                                                                                                                                                                                              (See 'zypper lr -P' for details)
      97 (raised priority)  :  1 repository
      99 (default priority) :  5 repositories
     105 (lowered priority) :  1 repository

# | Alias                              | Name                                                                                        | Enabled | GPG Check | Refresh | URI
--+------------------------------------+---------------------------------------------------------------------------------------------+---------+-----------+---------+----------------------------------------------------------------------------------------
1 | Leap_15_4                          | Leap_15_4                                                                                   | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.4/repo/oss/
2 | Leap_15_4_Updates                  | Leap_15_4_Updates                                                                           | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/update/leap/15.4/oss/
3 | Rockstor-Testing                   | Rockstor-Testing                                                                            | Yes     | (r ) Yes  | Yes     | http://updates.rockstor.com:8999/rockstor-testing/leap/15.4
4 | home_rockstor                      | home_rockstor                                                                               | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/home:/rockstor/15.4/
5 | home_rockstor_branches_Base_System | home_rockstor_branches_Base_System                                                          | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/home:/rockstor:/branches:/Base:/System/15.4/
6 | repo-backports-debug-update        | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No      | ----      | ----    | http://download.opensuse.org/update/leap/15.4/backports_debug/
7 | repo-backports-update              | Update repository of openSUSE Backports                                                     | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/backports/
8 | repo-sle-debug-update              | Update repository with debuginfo for updates from SUSE Linux Enterprise 15                  | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.4/sle/
9 | repo-sle-update                    | Update repository with updates from SUSE Linux Enterprise 15                                | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/sle/
rockstable:~ # which pg_config
/usr/bin/pg_config
1 Like

Let’s also see what packages related to postgresql you have currently installed:

rockstable:~ # zypper search --installed-only | grep postgresql
i  | openSUSE-SLE-15.4-2022-1463           | Recommended update for postgresql13                                                                                                                                                     | patch
i  | openSUSE-SLE-15.4-2022-1895           | Security update for postgresql13                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2022-1908           | Security update for postgresql14                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2022-2706           | Recommended update for postgresql                                                                                                                                                       | patch
i  | openSUSE-SLE-15.4-2022-2987           | Security update for postgresql13                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2022-2989           | Security update for postgresql14                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2022-4447           | Recommended update for postgresql13                                                                                                                                                     | patch
i  | openSUSE-SLE-15.4-2022-4645           | Security update for postgresql14, postgresql15                                                                                                                                          | patch
i  | openSUSE-SLE-15.4-2023-83             | Recommended update for postgresql                                                                                                                                                       | patch
i  | openSUSE-SLE-15.4-2023-569            | Security update for postgresql15                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2023-583            | Security update for postgresql13                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2023-2207           | Security update for postgresql15                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2023-2219           | Security update for postgresql13                                                                                                                                                        | patch
i  | postgresql                            | Basic Clients and Utilities for PostgreSQL                                                                                                                                              | package
i  | postgresql-devel                      | PostgreSQL development header files and libraries                                                                                                                                       | package
i  | postgresql-server                     | The Programs Needed to Create and Run a PostgreSQL Server                                                                                                                               | package
i  | postgresql-server-devel               | PostgreSQL server development header files and utilities                                                                                                                                | package
i  | postgresql13                          | Basic Clients and Utilities for PostgreSQL                                                                                                                                              | package
i  | postgresql13-devel                    | PostgreSQL client development header files and libraries                                                                                                                                | package
i  | postgresql13-server                   | The Programs Needed to Create and Run a PostgreSQL Server                                                                                                                               | package
i  | postgresql13-server-devel             | PostgreSQL server development header files and utilities 
1 Like

Our postgresql-related dependencies are defined at:

You can then also try to force-reinstall these…

zypper in --no-recommends -f postgresql13 postgresql13-server postgresql13-server-devel

… and again verify the presence/absence of pg_config:

which pg_config

If pg_config still cannot be found, you can try using the following:

zypper in --no-recommends postgresql postgresql-server postgresql-server-devel
3 Likes

Something else to verify:
The /usr/bin/pg_config binary is actually “managed” by alternatives; see how it is on my system:

rockstable:~ # ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Jan 26 07:11 /usr/bin/pg_config -> /etc/alternatives/pg_config

The latter is actually linking to the postgresql’s bin version:

rockstable:~ # ls -lah /etc/alternatives/pg_config
lrwxrwxrwx 1 root root 35 Jan 26 07:11 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config

And to verify, we have:

rockstable:~ # /usr/bin/pg_config --version
PostgreSQL 13.11

rockstable:~ # /usr/lib/postgresql13/bin/pg_config --version
PostgreSQL 13.11

Maybe we need to re-set the alternatives on your system… First, let’s see if it is indeed listed:

rockstable:~ # update-alternatives --list postgresql
/usr/lib/postgresql13

… we should be able to move forward from there if needed.

2 Likes

@Flox as arranged in side chat - not wanting to clutter here, I have the output from the 3 VM systems that built all the rpm packages in question: going back to 15.3 as we seem to have two instances of this same bug where systems have been in-place zypper dup from 15.3 to 15.4. The 15.5 system is a Minimal_VM refreshed just the other day. Our 15.5 rpms are only really viable in testing currently. But including here for completeness as there was a suspicion that this missing file had some-how been transitioned to a newer postgres package and the change was backported to earlier OS versions - thus removing it from the backports. But that doesn’t seem to be the case as the 15.5 here has ownership of this file and in the same postgresql server dev package as all the others.

rleap15-3:~ # ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Nov 11  2022 /usr/bin/pg_config -> /etc/alternatives/pg_config
rleap15-3:~ # ls -lah /etc/alternatives/pg_config
lrwxrwxrwx 1 root root 35 Nov 11  2022 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config
rleap15-3:~ # update-alternatives --list postgresql
/usr/lib/postgresql10
/usr/lib/postgresql13

rleap15-4:~ # ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Nov 14  2022 /usr/bin/pg_config -> /etc/alternatives/pg_config
rleap15-4:~ # ls -lah /etc/alternatives/pg_config
lrwxrwxrwx 1 root root 35 Nov 14  2022 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config
rleap15-4:~ # update-alternatives --list postgresql
/usr/lib/postgresql13

rleap15-5:~ # ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Jul 20 17:22 /usr/bin/pg_config -> /etc/alternatives/pg_config
rleap15-5:~ # ls -lah /etc/alternatives/pg_config
lrwxrwxrwx 1 root root 35 Jul 20 17:22 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config
rleap15-5:~ # update-alternatives --list postgresql
/usr/lib/postgresql13

Hope that helps, at least for context. All rpms published to testing and stable are build on their respective platforms and the build only succeeds if all tests pass and the resulting rpm then successfully installs. We have more improvements to make re testing but that is, as always, on-going.

1 Like

Hi @Flox & @phillxnet

Here is the output from all the things you have asked me to run and I really appreciate the effort to put this all together.

To cut to the chase these stand out for me

ls -lah /usr/bin/pg_config
ls: cannot access '/usr/bin/pg_config': No such file or directory

ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory

/usr/bin/pg_config --version
-bash: /usr/bin/pg_config: No such file or directory
zypper ref
Repository 'Leap_15_4' is up to date.                                                                                                                                                                     
Repository 'Leap_15_4_Updates' is up to date.                                                                                                                                                               
Repository 'Rockstor-Testing' is up to date.                                                                                                                                                                
Repository 'home_rockstor' is up to date.                                                                                                                                                                   
Repository 'home_rockstor_branches_Base_System' is up to date.                                                                                                                                              
Repository 'Update repository of openSUSE Backports' is up to date.                                                                                                                                         
Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up to date.                                                                                                                    
All repositories have been refreshed.

zypper update --no-recommends
Loading repository data...
Reading installed packages...
Nothing to do.

 zypper lr --uri
Repository priorities in effect:                                                                                                                                            (See 'zypper lr -P' for details)
      97 (raised priority)  :  1 repository
      99 (default priority) :  5 repositories
     105 (lowered priority) :  1 repository

# | Alias                              | Name                                      | Enabled | GPG Check | Refresh | URI
--+------------------------------------+-------------------------------------------+---------+-----------+---------+----------------------------------------------------------------------------------------
1 | Leap_15_4                          | Leap_15_4                                 | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.4/repo/oss/
2 | Leap_15_4_Updates                  | Leap_15_4_Updates                         | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/update/leap/15.4/oss/
3 | Rockstor-Testing                   | Rockstor-Testing                          | Yes     | (r ) Yes  | Yes     | http://updates.rockstor.com:8999/rockstor-testing/leap/15.4
4 | home_rockstor                      | home_rockstor                             | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/home:/rockstor/15.4/
5 | home_rockstor_branches_Base_System | home_rockstor_branches_Base_System        | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/home:/rockstor:/branches:/Base:/System/15.4/
6 | repo-backports-debug-update        | Update repository with updates for open-> | No      | ----      | ----    | http://download.opensuse.org/update/leap/15.4/backports_debug/
7 | repo-backports-update              | Update repository of openSUSE Backports   | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/backports/
8 | repo-sle-debug-update              | Update repository with debuginfo for up-> | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.4/sle/
9 | repo-sle-update                    | Update repository with updates from SUS-> | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.4/sle/

which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)

zypper search --installed-only | grep postgresql
i  | openSUSE-SLE-15.4-2022-1463           | Recommended update for postgresql13                                                                                                                                                                   | patch
i  | openSUSE-SLE-15.4-2022-1895           | Security update for postgresql13                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2022-1908           | Security update for postgresql14                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2022-2706           | Recommended update for postgresql                                                                                                                                                                     | patch
i  | openSUSE-SLE-15.4-2022-2987           | Security update for postgresql13                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2022-2989           | Security update for postgresql14                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2022-4447           | Recommended update for postgresql13                                                                                                                                                                   | patch
i  | openSUSE-SLE-15.4-2022-4645           | Security update for postgresql14, postgresql15                                                                                                                                                        | patch
i  | openSUSE-SLE-15.4-2023-83             | Recommended update for postgresql                                                                                                                                                                     | patch
i  | openSUSE-SLE-15.4-2023-569            | Security update for postgresql15                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2023-583            | Security update for postgresql13                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2023-705            | Security update for postgresql14                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2023-2205           | Security update for postgresql14                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2023-2207           | Security update for postgresql15                                                                                                                                                                      | patch
i  | openSUSE-SLE-15.4-2023-2219           | Security update for postgresql13                                                                                                                                                                      | patch
i  | postgresql                            | Basic Clients and Utilities for PostgreSQL                                                                                                                                                            | package
i  | postgresql-devel                      | PostgreSQL development header files and libraries                                                                                                                                                     | package
i  | postgresql-llvmjit                    | Just-in-time compilation support for PostgreSQL                                                                                                                                                       | package
i  | postgresql-llvmjit-devel              | Helper package to pull all dependencies to build with llvm support                                                                                                                                    | package
i  | postgresql-server                     | The Programs Needed to Create and Run a PostgreSQL Server                                                                                                                                             | package
i  | postgresql-server-devel               | PostgreSQL server development header files and utilities                                                                                                                                              | package
i  | postgresql13                          | Basic Clients and Utilities for PostgreSQL                                                                                                                                                            | package
i  | postgresql13-devel                    | PostgreSQL client development header files and libraries                                                                                                                                              | package
i  | postgresql13-llvmjit                  | Just-in-time compilation support for PostgreSQL                                                                                                                                                       | package
i  | postgresql13-llvmjit-devel            | PostgreSQL development files for extensions with LLVM support                                                                                                                                         | package
i  | postgresql13-server                   | The Programs Needed to Create and Run a PostgreSQL Server                                                                                                                                             | package
i  | postgresql13-server-devel             | PostgreSQL server development header files and utilities                                                                                                                                              | package
i  | postgresql14                          | Basic Clients and Utilities for PostgreSQL                                                                                                                                                            | package
i  | postgresql14-llvmjit                  | Just-in-time compilation support for PostgreSQL                                                                                                                                                       | package
i  | postgresql14-server                   | The Programs Needed to Create and Run a PostgreSQL Server                                                                                                                                             | package

zzypper in --no-recommends -f postgresql13 postgresql13-server postgresql13-server-devel
Loading repository data...
Reading installed packages...
Forcing installation of 'postgresql13-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Forcing installation of 'postgresql13-server-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Forcing installation of 'postgresql13-server-devel-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Resolving package dependencies...

The following 3 packages are going to be reinstalled:
  postgresql13 postgresql13-server postgresql13-server-devel

3 packages to reinstall.
Overall download size: 7.5 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: postgresql13-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                                      (1/3),   1.5 MiB    
Retrieving: postgresql13-13.11-150200.5.40.1.x86_64.rpm ..................................................................................................................................[done (3.8 MiB/s)]
Retrieving: postgresql13-server-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                               (2/3),   4.5 MiB    
Retrieving: postgresql13-server-13.11-150200.5.40.1.x86_64.rpm ...........................................................................................................................[done (7.1 MiB/s)]
Retrieving: postgresql13-server-devel-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15)                                                         (3/3),   1.4 MiB    
Retrieving: postgresql13-server-devel-13.11-150200.5.40.1.x86_64.rpm .....................................................................................................................[done (7.3 MiB/s)]

Checking for file conflicts: .........................................................................................................................................................................[done]
(1/3) Installing: postgresql13-13.11-150200.5.40.1.x86_64 ............................................................................................................................................[done]
(2/3) Installing: postgresql13-server-13.11-150200.5.40.1.x86_64 .....................................................................................................................................[done]
(3/3) Installing: postgresql13-server-devel-13.11-150200.5.40.1.x86_64 ...............................................................................................................................[done]
 
which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)

 zypper in --no-recommends postgresql postgresql-server postgresql-server-devel
Loading repository data...
Reading installed packages...
'postgresql' is already installed.
No update candidate for 'postgresql-15-150400.4.6.2.noarch'. The highest available version is already installed.
'postgresql-server' is already installed.
No update candidate for 'postgresql-server-15-150400.4.6.2.noarch'. The highest available version is already installed.
'postgresql-server-devel' is already installed.
No update candidate for 'postgresql-server-devel-15-150400.4.6.2.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.

ls -lah /usr/bin/pg_config
ls: cannot access '/usr/bin/pg_config': No such file or directory

ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory

/usr/bin/pg_config --version
-bash: /usr/bin/pg_config: No such file or directory

/usr/lib/postgresql13/bin/pg_config --version
PostgreSQL 13.11

update-alternatives --list postgresql
/usr/lib/postgresql13
/usr/lib/postgresql14

2 Likes

Interesting…
So everything is correctly installed, but alternatives are no set anymore, or improperly. The fact that you have postgres14 installed is curious too, I wonder where that comes from. It should be fine, though.

Let’s try to set them again: thanks to @phillxnet for reminding all the following about how to do that (as I personally forgot). We indeed had instructions on how to do that in our very first build on openSUSE Leap: Built on openSUSE dev notes and status

In your case, what do you see with the following?

alternatives --config postgresql 

You would need to enter the number corresponding to the line for postgresql.

2 Likes

Hello @Flox

alternatives --config postgresql
There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).

  Selection    Path                   Priority   Status
------------------------------------------------------------
* 0            /usr/lib/postgresql14   140       auto mode
  1            /usr/lib/postgresql13   130       manual mode
  2            /usr/lib/postgresql14   140       manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/postgresql13 to provide /usr/lib/postgresql (postgresql) in manual mode

alternatives --config postgresql
There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).

  Selection    Path                   Priority   Status
------------------------------------------------------------
  0            /usr/lib/postgresql14   140       auto mode
* 1            /usr/lib/postgresql13   130       manual mode
  2            /usr/lib/postgresql14   140       manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Re-running the failed commands I now get this

ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Jul 25 18:45 /usr/bin/pg_config -> /etc/alternatives/pg_config

ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory
lrwxrwxrwx 1 root root 35 Jul 25 18:45 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config

/usr/bin/pg_config --version
PostgreSQL 13.11

which pg_config
/usr/bin/pg_config
3 Likes

Awesome! So that was it.

@phillxnet has a very sound explanation as to what might have happened and it relates to the presence of the other postgresql (14) but not all of its packages, in combination with the distribution upgrade (15.3 to 15.4). I’ll let them detail a bit more if/when desired.

Now, you can try to reinstall the rockstor rpm:

zypper in --no-recommends -f rockstor

And look at the poetry install log file to confirm all is well (hopefully): /opt/rockstor/poetry-install.txt.

3 Likes

Hi @Flox,

I was just doing these command and thought I would post it but you beat me to it. Rockstor is up and running and my Rock-ons are now starting up as well.

Seems we have got to the bottom of my system issues nice one and thank you.

3 Likes

Hi @Flox,

Once I get home as I have been doing all this work on the train I will fully test the Rock-ons as at the moment I can’t access them but I can see from docker ps that the docker images are up, Top is also showing lots of activity.

thanks

3 Likes

Glad we could work it all out!
Thank you for not only reporting this, but also your help in figuring it all out!

One point: do you remember if you ever manually install postgresql14 on that machine (before or after the move to 15.4)? We’re just trying to see if there is a reproducible scenario that would lead to the situation in which you found yourself.

3 Likes

Hi @Flox,

I do not know how postgresql14 was installed as I learnt from your troubleshooting how to install postgresql13 :slight_smile:

I had to uninstall with Rock-ons and install them again as they were broken for some reason. They are all now working just fine.

thanks

3 Likes