Bug 857284 - Installer makes invalid edits to jabberd configs, violates system path rules, and files NOT owned by 'root'
Installer makes invalid edits to jabberd configs, violates system path rules,...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
1.7
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Milan Zázrivec
Red Hat Satellite QA List
:
Depends On:
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-09-13 22:52 EDT by matthew patton
Modified: 2012-11-01 12:17 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-01 12:17:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
xml patches (6.30 KB, text/plain)
2012-09-13 22:52 EDT, matthew patton
no flags Details

  None (edit)
Description matthew patton 2012-09-13 22:52:23 EDT
Created attachment 612708 [details]
xml patches

Description of problem:
I'm using Spacewalk 1.7.38

Jabberd won't bind if IPV6 is disabled since the installer changed the bind IP for no good reason. Which also causes OSA-dispatcher to fail and spew endless errors.

Jabberd log and pid files are flagrantly misplaced in /var/lib/jabberd instead of /var/{run,log}/jabberd.

Jabberd logging is set to syslog and facility local3 which is improper. It should be 'daemon' like everything else. Since many sysadmins will deliberately and with good reason filter out 'local0-7' from being logged or will otherwise pay it little attention, jabberd failures will be ignored or not easily ascertained. Satellite/Spacewalk already has too many moving parts and inter-dependencies, the logging should be easy to find.

The rest of the Spacewalk/Satellite subsystems log to a file, so a reasonable case could be made that Jabberd should do likewise.

Finally, no daemon should EVER own it's configuration files. Yet all the files in /etc/jabberd including the directory are uid=jabber. They all properly should be uid=root. gid=jabber is fine.

The initscript also makes assumptions on PIDFILE names. The proper thing to do is to either parse the *.xml files for <pidfile> stanzas, or better yet, force the value by running 'sed -e' against the *.xml files according to what the initscript is expecting. Those values can furthermore be derived from /etc/sysconfig/jabberd as well.

Version-Release number of selected component (if applicable):

2.2.14-3.el6

How reproducible:

always

Steps to Reproduce:
1. disable IPV6; 
2. service start jabberd

  
Actual results:

no port bound (5222)

Expected results:

daemon listening on 0.0.0.0:5222

Additional info:
Comment 1 Jan Pazdziora 2012-09-14 02:09:32 EDT
Moving to Spacewalk product.
Comment 2 Jan Pazdziora 2012-09-14 04:55:23 EDT
Matthew,

as for the issues with jabberd on Spacewalk after you've disabled IPv6, please run

  # spacewalk-setup-jabberd

and it will update the .xml configuration files to match your /proc/net/if_inet6. Then start jabberd. Please let us know if it fixes the problem for you.

As for all the other issues you list in comment 0, since the package comes from EPEL, please open bugzilla against EPEL's jabberd component to reach the correct maintainer. Or let us know and I'll clone this bugzilla to EPEL for you.

Thank you,

Jan
Comment 3 matthew patton 2012-09-14 15:07:29 EDT
Hopefully I've cloned it correctly. (857540)

The spacewalk-setup-jabberd unfortunately is hard-coded to insert ipv6 strings because even with no ipv6 interfaces defined (/proc/net/if_inet6 is empty) it replaced the IPV4 values. And as a direct consequence we get:

attempting connection to router at ::1, port=5347
connection attempt to router failed: network is unreachable (101)
Comment 4 Milan Zázrivec 2012-09-17 07:25:54 EDT
Could you please provide content of the following files from your system
(the one running your Spacewalk instance):

/etc/sysconfig/network-scripts/ifcfg-lo
/etc/sysconfig/network-scripts/ifcfg-eth0 (or any other active net interface)
/etc/sysconfig/network
/etc/sysctl.conf

?

Feel free to obfuscate any info from the files above that you feel is private
and / or simply do not want to share.

Thanks.
Comment 5 matthew patton 2012-09-18 15:20:33 EDT
the only lines that influence IPV6 are in sysctl.conf

net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
Comment 6 Milan Zázrivec 2012-09-19 08:04:52 EDT
Fair enough, the following fix from spacewalk.git master:

    6d931e6abb6724fa7131d2c718aa047b9f3fc28e

modifies spacewalk-setup-jabberd not to setup IPv6 addresses in jabberd's
configuration if /proc/net/if_inet6 is empty (although it may exist).

Thank you for your report & sorry for the trouble.
Comment 7 Jan Pazdziora 2012-10-30 15:22:28 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 8 Jan Pazdziora 2012-11-01 12:17:23 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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