Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openSUSE] don't rely on PGDATA env var. Fixes #2041 #2042

Conversation

phillxnet
Copy link
Member

Explicitly define Postgresql db 'data' directory, in openSUSE code path, via initdb's -D option. Use existing in code pg_data var which is set to the normal default of '/var/lib/pgsql/data' anyway. Prior use of pg_data in this code path was ineffectual.

Fixes #2041

Ready for review.

Please see issue text for context, including forum origin references.

Explicitly define Postgresql db 'data' directory, in openSUSE code path,
via initdb's -D option. Use existing in code pg_data var which is set to
the normal default of '/var/lib/pgsql/data' anyway. Prior use of pg_data
in this code path was ineffectual.
@phillxnet phillxnet added the needs review Ideally by prior rockstor-core contributor label May 3, 2019
Copy link
Member

@FroggyFlox FroggyFlox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @phillxnet!

Rockstor now builds successfully in:
Tumbleweed 20190517

linux-z6bp:~ # cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20190517"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20190517"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20190517"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
LOGO="distributor-logo"

linux-z6bp:~ # /opt/build/bin/buildout -N -c /opt/build/buildout.cfg 
(...)
setup-systemd-links: Running cp -f /opt/build/conf/rockstor-pre.service /etc/systemd/system/rockstor-pre.service &&
systemctl enable rockstor-pre.service &&
cp -f /opt/build/conf/rockstor.service /etc/systemd/system/rockstor.service &&
systemctl enable rockstor.service &&
cp -f /opt/build/conf/rockstor-bootstrap.service /etc/systemd/system/rockstor-bootstrap.service &&
systemctl enable rockstor-bootstrap.service &&
systemctl daemon-reload
Updating def-kernel.
def-kernel: Running grubby --set-default=/boot/vmlinuz-'4.12.4-1.el7.elrepo.x86_64'
/bin/sh: grubby: command not found
Updating start-rockstor.
start-rockstor: Running systemctl stop rockstor-pre &&
systemctl start rockstor

Leap 15.1 rc

linux-1pi9:~ # cat /etc/os-release 
NAME="openSUSE Leap"
VERSION="15.1 "
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.1"
PRETTY_NAME="openSUSE Leap 15.1"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

linux-1pi9:~ # /opt/build/bin/buildout -N -c /opt/build/buildout.cfg 
(...)
setup-systemd-links: Running cp -f /opt/build/conf/rockstor-pre.service /etc/systemd/system/rockstor-pre.service &&
systemctl enable rockstor-pre.service &&
cp -f /opt/build/conf/rockstor.service /etc/systemd/system/rockstor.service &&
systemctl enable rockstor.service &&
cp -f /opt/build/conf/rockstor-bootstrap.service /etc/systemd/system/rockstor-bootstrap.service &&
systemctl enable rockstor-bootstrap.service &&
systemctl daemon-reload
Updating def-kernel.
def-kernel: Running grubby --set-default=/boot/vmlinuz-'4.12.4-1.el7.elrepo.x86_64'
/bin/sh: grubby: command not found
Updating start-rockstor.
start-rockstor: Running systemctl stop rockstor-pre &&
systemctl start rockstor

CentOS

[root@rockdev ~]# cat /etc/os-release 
NAME="Rockstor"
VERSION="3 (Core)"
ID="rockstor"
ID_LIKE="rhel fedora"
VERSION_ID="3"
PRETTY_NAME="Rockstor 3 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:rockstor:rockstor:3"
HOME_URL="https://www.rockstor.com/"
BUG_REPORT_URL="https://www.rockstor.com/"

[root@rockdev ~]# /opt/build/bin/buildout -N -c /opt/build/buildout.cfg 
(...)
setup-systemd-links: Running cp -f /opt/build/conf/rockstor-pre.service /etc/systemd/system/rockstor-pre.service &&
systemctl enable rockstor-pre.service &&
cp -f /opt/build/conf/rockstor.service /etc/systemd/system/rockstor.service &&
systemctl enable rockstor.service &&
cp -f /opt/build/conf/rockstor-bootstrap.service /etc/systemd/system/rockstor-bootstrap.service &&
systemctl enable rockstor-bootstrap.service &&
systemctl daemon-reload
Updating def-kernel.
def-kernel: Running grubby --set-default=/boot/vmlinuz-'4.12.4-1.el7.elrepo.x86_64'
Updating start-rockstor.
start-rockstor: Running systemctl stop rockstor-pre &&
systemctl start rockstor

@phillxnet
Copy link
Member Author

@FroggyFlox Thanks for the review, much appreciated.

As this is only a trivial single line change and it's a pain to have to account for it during development and without it, due to upstream changes, our build on an openSUSE target is non functional I'll break normal protocol and merge now ahead of the next merge round. Also doesn't look to affect any outstanding earlier pull requests so shouldn't break their prior merge-ability.

@phillxnet phillxnet removed the needs review Ideally by prior rockstor-core contributor label May 20, 2019
@phillxnet phillxnet merged commit 1102e28 into rockstor:master May 20, 2019
@FroggyFlox
Copy link
Member

That makes sense! Thanks for preparing and writing this PR, @phillxnet!

@phillxnet phillxnet deleted the 2041_openSUSE_don't_rely_on_PGDATA_env_var branch May 20, 2019 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[openSUSE] don't rely on PGDATA env var
2 participants