Bug 1386140 - spacewalk-hostname-rename does not work on 5.8.0 with embedded PostgreSQL 9.5
Summary: spacewalk-hostname-rename does not work on 5.8.0 with embedded PostgreSQL 9.5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks: 1340444
TreeView+ depends on / blocked
 
Reported: 2016-10-18 09:30 UTC by Jan Hutař
Modified: 2017-06-21 12:18 UTC (History)
3 users (show)

Fixed In Version: spacewalk-web-2.5.2-7-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:18:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Hutař 2016-10-18 09:30:59 UTC
Description of problem:
spacewalk-hostname-rename does not work on 5.8.0 compose with embedded PostgreSQL 9.5


Version-Release number of selected component (if applicable):
spacewalk-utils-2.5.1-7.el6sat.noarch
rh-postgresql95-postgresql-server-9.5.4-2.el6.x86_64


How reproducible:
always


Steps to Reproduce:
1. Attempt to use spacewalk-hostname-rename


Actual results:
# spacewalk-hostname-rename 192.168.10.100
Validating IP ... OK
=============================================
hostname: satellite.example.com
ip: 192.168.10.100
=============================================
Stopping rhn-satellite services ... OK
Testing DB connection ... FAILED
Your database isn't running.
Fix the problem and run /usr/bin/spacewalk-hostname-rename again


Expected results:
Should work.


Additional info:
This fixed it for me:

# diff -u /usr/bin/spacewalk-hostname-rename{.ORIG,}
--- /usr/bin/spacewalk-hostname-rename.ORIG	2016-10-18 05:25:09.976366571 -0400
+++ /usr/bin/spacewalk-hostname-rename	2016-10-18 05:27:43.728366510 -0400
@@ -49,8 +49,8 @@
     if [ -x /etc/init.d/postgresql -o -f /usr/lib/systemd/system/postgresql.service ]; then
         DB_SERVICE="postgresql"
     fi
-    if [ -x /etc/init.d/postgresql92-postgresql ]; then
-        DB_SERVICE="postgresql92-postgresql"
+    if [ -x /etc/init.d/rh-postgresql95-postgresql ]; then
+        DB_SERVICE="rh-postgresql95-postgresql"
     fi
 fi

Comment 3 Radovan Drazny 2017-01-18 10:44:08 UTC
Verified on spacewalk-utils-2.5.1-10. 

# spacewalk-hostname-rename 10.19.41.82
Validating IP ... OK
=============================================
hostname: bkr-hv01-guest02.dsal.lab.eng.bos.redhat.com
ip: 10.19.41.82
=============================================
Stopping rhn-satellite services ... OK
Testing DB connection ... OK
Updating /etc/rhn/rhn.conf ... OK
Actual SSL key pair package: rhn-org-httpd-ssl-key-pair-bkr-hv01-guest02.dsal.lab.eng.bos-1.0-1.noarch
 No need to re-generate SSL certificate.
Regenerating new bootstrap client-config-overrides.txt ... OK
Updating other DB entries ... OK
Changing cobbler settings ... OK
Changing jabberd settings ... OK
Starting rhn-satellite services ... OK

VERIFIED


Note You need to log in before you can comment on or make changes to this bug.