Bug 857284

Summary: Installer makes invalid edits to jabberd configs, violates system path rules, and files NOT owned by 'root'
Product: [Community] Spacewalk Reporter: matthew patton <pattonme>
Component: InstallationAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.7CC: jpazdziora, mzazrivec
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-01 16:17:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 871344    
Attachments:
Description Flags
xml patches none

Description matthew patton 2012-09-14 02:52:23 UTC
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 06:09:32 UTC
Moving to Spacewalk product.

Comment 2 Jan Pazdziora 2012-09-14 08:55:23 UTC
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 19:07:29 UTC
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 11:25:54 UTC
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 19:20:33 UTC
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 12:04:52 UTC
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 19:22:28 UTC
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 16:17:23 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18