Bug 840245 - "@" in PostgreSQL database password breaks "spacewalk-setup"
Summary: "@" in PostgreSQL database password breaks "spacewalk-setup"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space19
TreeView+ depends on / blocked
 
Reported: 2012-07-14 18:31 UTC by Frank Thommen
Modified: 2013-03-06 18:34 UTC (History)
1 user (show)

Fixed In Version: spacewalk-backend-1.9.41-1 spacewalk-schema-1.9.37-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-06 18:34:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Frank Thommen 2012-07-14 18:31:56 UTC
Description of problem:
-------------------------------------------------------------
Having an "@" in the database password (using PostgreSQL) breaks spacewalk-setup.


Version-Release number of selected component (if applicable):
-------------------------------------------------------------
Installed spacewalk packages:
[root@balrog pgsql]# rpm -qa | grep spacew
spacewalk-branding-1.7.1-1.el5
spacewalk-grail-1.7.28-1.el5
spacewalk-backend-xml-export-libs-1.7.38-1.el5
spacewalk-setup-1.7.10-1.el5
spacewalk-slf4j-1.6.1-1.el5
spacewalk-backend-xp-1.7.38-1.el5
spacewalk-admin-1.8.3-1.el5
spacewalk-backend-sql-postgresql-1.7.38-1.el5
spacewalk-backend-server-1.7.38-1.el5
spacewalk-backend-package-push-server-1.7.38-1.el5
spacewalk-repo-1.7-5.el5
spacewalk-config-1.7.3-1.el5
spacewalk-backend-config-files-1.7.38-1.el5
spacewalk-monitoring-1.4.1-1.el5
spacewalk-taskomatic-1.7.54-1.el5
spacewalk-common-1.7.3-1.el5
spacewalk-backend-libs-1.7.38-1.el5
spacewalk-java-config-1.7.54-1.el5
spacewalk-java-postgresql-1.7.54-1.el5
spacewalk-backend-1.7.38-1.el5
spacewalk-backend-iss-export-1.7.38-1.el5
spacewalk-monitoring-selinux-1.7.2-1.el5
spacewalk-java-1.7.54-1.el5
spacewalk-client-repo-1.7-5.el5
spacewalk-setup-jabberd-1.6.5-1.el5
spacewalk-backend-iss-1.7.38-1.el5
spacewalk-pxt-1.7.28-1.el5
spacewalk-sniglets-1.7.28-1.el5
spacewalk-certs-tools-1.7.3-1.el5
spacewalk-search-1.7.3-1.el5
spacewalk-backend-config-files-tool-1.7.38-1.el5
spacewalk-base-1.7.28-1.el5
spacewalk-postgresql-1.7.3-1.el5
spacewalk-base-minimal-1.7.28-1.el5
spacewalk-java-lib-1.7.54-1.el5
spacewalk-doc-indexes-1.1.1-1.el5
spacewalk-backend-applet-1.7.38-1.el5
spacewalk-backend-tools-1.7.38-1.el5
spacewalk-backend-config-files-common-1.7.38-1.el5
spacewalk-html-1.7.28-1.el5
spacewalk-backend-sql-1.7.38-1.el5
spacewalk-backend-app-1.7.38-1.el5
spacewalk-schema-1.7.55-1.el5
spacewalk-backend-xmlrpc-1.7.38-1.el5
spacewalk-selinux-1.7.2-1.el5
[root@balrog pgsql]# 

CentOS-Release: 5.8


How reproducible:
-------------------------------------------------------------
Steps to Reproduce:
1. Follow installation instructions on https://fedorahosted.org/spacewalk/wiki/HowToInstall
2. Set up the database admin password with a "@" somewhere in it
3. Run spacewalk-setup --disconnected


Actual results:
-------------------------------------------------------------
`spacewalk-setup --disconnected` ends prematurely with:

[...]
** Loading Spacewalk Certificate.
** Verifying certificate locally.
** Activating Spacewalk.
There was a problem validating the satellite certificate: 1


The logfile shows:
-----------------
[root@XXXX pgsql]# cat /var/log/rhn/rhn_installation.log.24
Installation log of Spacewalk
Command: /usr/bin/spacewalk-setup 

Shutting down spacewalk services...
Stopping RHN Taskomatic...
RHN Taskomatic was not running.
Stopping cobbler daemon: [FAILED]
Stopping rhn-search...
rhn-search was not running.
Stopping httpd: [FAILED]
Stopping tomcat5: Shutting down osa-dispatcher: [FAILED]
Terminating jabberd processes ...
Stopping router: [FAILED]
Stopping sm: [FAILED]
Stopping c2s: [FAILED]
Stopping s2s: [FAILED]
Done.
Enabling spacewalk services...
Done
/root/.gnupg/pubring.gpg
------------------------
pub   1024D/F24F1B08 2002-04-23 [expired: 2004-04-22]
uid                  Red Hat, Inc (Red Hat Network) <rhn-feedback>

gpg: key F24F1B08: "Red Hat, Inc (Red Hat Network) <rhn-feedback>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
/var/lib/rhn/rhn-satellite-prep/etc/rhn/cluster.ini
/var/lib/rhn/rhn-satellite-prep/etc/rhn/rhn.conf.orig
/var/lib/rhn/rhn-satellite-prep/etc/rhn/rhn.conf
/var/lib/rhn/rhn-satellite-prep/etc -> /etc
/var/lib/rhn/rhn-satellite-prep/etc/rhn -> /etc/rhn
/var/lib/rhn/rhn-satellite-prep/etc/rhn/cluster.ini -> /etc/rhn/cluster.ini
 * Making backup of /etc/rhn/cluster.ini to /etc/sysconfig/rhn/backup-2012-07-14-19:03/etc/rhn/cluster.ini
/var/lib/rhn/rhn-satellite-prep/etc/rhn/rhn.conf -> /etc/rhn/rhn.conf
 * Making backup of /etc/rhn/rhn.conf to /etc/sysconfig/rhn/backup-2012-07-14-19:03/etc/rhn/rhn.conf

ERROR: unhandled exception occurred:
Traceback (most recent call last):
  File "/usr/bin/rhn-satellite-activate", line 42, in ?
    sys.exit(abs(mod.main() or 0))
  File "/usr/lib/python2.4/site-packages/spacewalk/satellite_tools/rhn_satellite_activate.py", line 584, in main
    username=db_user, password=db_password, database=database)
  File "/usr/lib/python2.4/site-packages/spacewalk/server/rhnSQL/__init__.py", line 107, in initDB
    (password, dsn) = temp.split("@")
ValueError: too many values to unpack
[root@XXXX pgsql]# 



Expected results:
-------------------------------------------------------------
No error

Additional info:
-------------------------------------------------------------
none

Comment 1 Jan Pazdziora 2013-02-28 12:44:49 UTC
Addressed in Spacewalk master, we no longer join and split the db_* parameters, we use them directly. Having

db_password = jezek@$%

now works.

Comment 2 Stephen Herr 2013-03-01 17:07:05 UTC
Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9.

Comment 3 Stephen Herr 2013-03-06 18:34:28 UTC
Spacewalk 1.9 has been released.

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19


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