Bug 737962

Summary: matahari broker in /etc/sysconfig/matahari ignored
Product: Red Hat Enterprise Linux 6 Reporter: Dave Johnson <dajohnso>
Component: matahariAssignee: Russell Bryant <rbryant>
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: matahari-maint, rbryant, zbitter
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-14 15:31:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dave Johnson 2011-09-13 13:42:00 UTC
Description of problem:
==================================
The value for the broker of /etc/sysconfig/matahari is being ignored

***broker is up and working***
[root@agent ~]# /usr/sbin/matahari-qmf-hostd -vvv -b 10.16.64.96
mh_connect: Trying: amqp:tcp:10.16.64.96:49000
mh_os_uuid: Got uuid: ce76da54cbe7c1d9ed1d44ce00000023
mh_hostname: Got hostname: agent.test.com
mh_os_uuid: Got uuid: ce76da54cbe7c1d9ed1d44ce00000023
mh_hostname: Got hostname: agent.test.com
mainloop_add_qmf: Added source: 1
heartbeat: Updating stats: 1 5
mh_hostname: Got hostname: agent.test.com
run: Starting agent mainloop

*** can't find the broker... ***
[root@agent ~]# /usr/sbin/matahari-qmf-hostd -vvv
mh_hostname: Got hostname: agent.test.com
mh_dnsdomainname: Got dnsdomainname: 'test.com'
mh_connect: SRV query not successful: _matahari._tcp.test.com
mh_connect: Trying: amqp:tcp:localhost:49000
2011-09-13 09:24:08 warning Connect failed: Connection refused
2011-09-13 09:24:08 warning Connection  closed
2011-09-13 09:24:11 warning Connect failed: Connection refused
2011-09-13 09:24:11 warning Connection  closed

*** ...even though it is configured ***
[root@agent ~]# cat /etc/sysconfig/matahari
# Connect to a broker on the named host
# If this is not defined, agents will attempt to connect to the server specified
# by the _matahari._tcp SRV record in DNS if that exists, otherwise to localhost
MATAHARI_BROKER=10.16.64.96

# Connect to a broker on a non-standard port
#MATAHARI_PORT=49000






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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Dave Johnson 2011-09-13 13:59:58 UTC
This was tested against v0.4.2-2....

Comment 3 Russell Bryant 2011-09-14 11:05:55 UTC
Once I thought about this again, this is expected behavior.  /etc/sysconfig/matahari is only used when matahari is started as a service, not when you run the agent executable directly.  Can you please try starting it via the init script and verify that it works?

Comment 4 Dave Johnson 2011-09-14 15:31:56 UTC
Yeah, this is not an issue.  Not sure what I was thinking.

Comment 5 Zane Bitter 2011-09-15 11:33:26 UTC
I updated the man page to not imply that matahari-brokerd reads /etc/sysconfig/matahari-broker itself:

https://github.com/matahari/matahari/commit/08dd58975db6eeac53c8ccedc6a37b8e37e34bda