Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 990972

Summary: data-dir options in config file is ignored due to bug in init file
Product: Red Hat Enterprise MRG Reporter: Zdenek Kraus <zkraus>
Component: qpid-cppAssignee: Ernie <eallen>
Status: CLOSED CURRENTRELEASE QA Contact: mick <mgoulish>
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: esammons, iboverma, jross, mgoulish
Target Milestone: 3.0Keywords: EasyFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22-20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 12:55:34 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:
Attachments:
Description Flags
Proposed patch
none
Modified patch none

Description Zdenek Kraus 2013-08-01 10:14:59 UTC
Description of problem:
The data-dir option set in config file is ignored when starting qpidd as service, because of bad statement in init file, that always adding --data-dir.

Thus only way to overwrite the data-dir is to make new sysconfig file "/etc/sysconfig/qpidd" and set the QPID_DATA_DIR variable there.

Version-Release number of selected component (if applicable):
qpid-cpp-0.14
qpid-cpp-0.18
qpid-cpp-0.22

How reproducible:
100%

Steps to Reproduce:
1. set the data-dir=/tmp/data_dir_in_conf into /etc/qpid/qpidd.conf
2. service qpidd start
3. check qpidd logs for store dir used

Actual results:
[0,r6x2 ~]$ tail -n 60 /var/lib/qpidd/qpidd.log 
2013-08-01 12:10:56 [Store] notice Journal "TplStore": Created
2013-08-01 12:10:56 [Store] notice Store module initialized; store-dir=/var/lib/qpidd
2013-08-01 12:10:56 [Security] notice SSL plugin not enabled, you must set --ssl-cert-db to enable it.
2013-08-01 12:10:56 [Store] notice Journal "q": Created
2013-08-01 12:10:56 [Broker] notice SASL disabled: No Authentication Performed
2013-08-01 12:10:56 [Network] notice Listening on TCP/TCP6 port 5672
2013-08-01 12:10:56 [Broker] notice Broker running


Expected results:
[0,r6x2 ~]$ tail -n 60 data-dir=/tmp/data_dir_in_conf
2013-08-01 12:10:56 [Store] notice Journal "TplStore": Created
2013-08-01 12:10:56 [Store] notice Store module initialized; store-dir=/var/lib/qpidd
2013-08-01 12:10:56 [Security] notice SSL plugin not enabled, you must set --ssl-cert-db to enable it.
2013-08-01 12:10:56 [Store] notice Journal "q": Created
2013-08-01 12:10:56 [Broker] notice SASL disabled: No Authentication Performed
2013-08-01 12:10:56 [Network] notice Listening on TCP/TCP6 port 5672
2013-08-01 12:10:56 [Broker] notice Broker running

the storedir is the one from qpidd.conf file


Additional info:

Comment 1 Zdenek Kraus 2013-08-01 12:56:07 UTC
Created attachment 781579 [details]
Proposed patch

Comment 2 Ernie 2013-08-01 21:07:51 UTC
Created attachment 781777 [details]
Modified patch

Modified slightly because one of the lines that was changed in the patch was recently changed on trunk.

Comment 3 Justin Ross 2013-08-05 18:52:15 UTC
https://svn.apache.org/r1510657
-> POST

Comment 4 mick 2013-08-27 19:16:09 UTC
--> verified

Here's how I did it:

    mkdir /var/lib/qpidd2
    chown -R qpidd: /var/lib/qpidd2

    # If you are using old packages:
    vi /etc/qpidd.conf
    # If you are using new packages:
    vi /etc/qpid/qpidd.conf
    data-dir=/var/lib/qpidd2
    :x

    service qpidd restart
    grep "store-dir="  /var/log/messages

confirm that you see /var/lib/qpidd2 as data dir in the log.

Comment 5 mick 2013-08-28 14:08:03 UTC
I observed bug fix against these packages:

cyrus-sasl-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-gssapi-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-md5-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64
perl-qpid-0.22-5.el6.x86_64
python-qpid-0.22-4.el6.noarch
python-qpid-qmf-0.22-7.el6.x86_64
python-saslwrapper-0.22-3.el6.x86_64
qpid-cpp-client-0.22-8.el6.x86_64
qpid-cpp-client-devel-0.22-8.el6.x86_64
qpid-cpp-client-devel-docs-0.22-8.el6.noarch
qpid-cpp-client-rdma-0.22-8.el6.x86_64
qpid-cpp-client-ssl-0.22-8.el6.x86_64
qpid-cpp-debuginfo-0.22-8.el6.x86_64
qpid-cpp-server-0.22-8.el6.x86_64
qpid-cpp-server-devel-0.22-8.el6.x86_64
qpid-cpp-server-ha-0.22-8.el6.x86_64
qpid-cpp-server-rdma-0.22-8.el6.x86_64
qpid-cpp-server-ssl-0.22-8.el6.x86_64
qpid-cpp-server-store-0.22-8.el6.x86_64
qpid-cpp-server-xml-0.22-8.el6.x86_64
qpid-cpp-tar-0.22-8.el6.noarch
qpid-java-client-0.22-5.el6.noarch
qpid-java-common-0.22-5.el6.noarch
qpid-java-example-0.22-5.el6.noarch
qpid-proton-c-0.4-2.2.el6.x86_64
qpid-proton-c-devel-0.4-2.2.el6.x86_64
qpid-proton-debuginfo-0.4-2.2.el6.x86_64
qpid-qmf-0.22-7.el6.x86_64
qpid-qmf-debuginfo-0.22-7.el6.x86_64
qpid-qmf-devel-0.22-7.el6.x86_64
qpid-snmpd-1.0.0-12.el6.x86_64
qpid-snmpd-debuginfo-1.0.0-12.el6.x86_64
qpid-tests-0.22-4.el6.noarch
qpid-tools-0.22-3.el6.noarch
rh-qpid-cpp-tests-0.22-8.el6.x86_64
ruby-qpid-0.7.946106-2.el6.x86_64
saslwrapper-0.22-3.el6.x86_64
saslwrapper-devel-0.22-3.el6.x86_64

Comment 6 Justin Ross 2013-10-03 18:33:34 UTC
This change needs to get reverted.  The original behavior is not in fact defective.  The system instance *should* override any data-dir setting in qpidd.conf.  qpidd.conf is used for setting system-wide defaults, not for narrowly controlling just the system instance.

Comment 9 Justin Ross 2013-10-15 21:31:47 UTC
Reverted in https://svn.apache.org/r1532542.

Comment 12 Valiantsina Hubeika 2014-01-31 15:32:24 UTC
checked & verified

qpid-cpp-server-ssl-0.22-33.el6
qpid-cpp-server-store-0.22-33.el6
qpid-cpp-client-devel-0.22-33.el6
qpid-cpp-client-ssl-0.22-33.el6
qpid-cpp-server-devel-0.22-33.el6
qpid-cpp-server-rdma-0.22-33.el6
qpid-cpp-server-ha-0.22-33.el6
qpid-cpp-debuginfo-0.22-33.el6
qpid-cpp-server-0.22-33.el6
qpid-cpp-client-rdma-0.22-33.el6
qpid-cpp-server-xml-0.22-33.el6
qpid-cpp-client-0.22-33.el6