Bug 431135

Summary: qpidd --data-dir enhancement.
Product: Red Hat Enterprise MRG Reporter: Alan Conway <aconway>
Component: qpid-cppAssignee: Ted Ross <tross>
Status: CLOSED CURRENTRELEASE QA Contact: Kim van der Riet <kim.vdriet>
Severity: high Docs Contact:
Priority: high    
Version: beta   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 431196    

Description Alan Conway 2008-01-31 21:56:54 UTC
Description of problem:

Need a place to store broker data: not just rhm store but files from other qpid
components, e.g. management identity, cluster roles etc. 
It should be
 - collected: all data for a broker in one directory.
 - locked: can't be used by 2 brokers simultaneously.
 - open: new services can add their own files.

Proposed solution:

Changes for qpid:

 --data-dir DIR (/var/lib/qpidd) Directory to contain persistent data generated
by the broker. 

On startup: qpidd creates <data-dir>/lock, startup fails if data-dir does not
exist, has wrong permissions or is already locked.

--data-dir="" is allowed - it means "disable all features that need data-dir"
Provides an easy way to run a transient broker for tests etc. 
Features that can use the data-dir may run with reduced functionality e.g.
management works but wont give history over restarts, can join a cluster but
cant resume a previous cluster identity etc. 

Changes for RHM:

Store dir defaults to  <data-dir>/rhm_store. 
We can keep a --store-dir override since store is high-volume data that a user
might want to put on  special disk partitions. 


- Why default to /var/lib/qpidd? 

This is the sane default for qpidd running as a system service, we want qpidd to
run properly as a system service by default.

Why not /var/lib if run as root, something else otherwise?
It's common to run system services as a non-root special user, so root isn't
always the special case.

Why not default to something convenient for developers like ~/.qpidd?

1. We want to default to deployed behavior not developer behavior.
2. The default will always be overridden if there is an /etc/qpidd.conf with a
data-dir setting. Thats more confusing than helpful.

For clarity & sanity you *must* to specify something on the command line if you
are not running the default deployed broker. Note that it's very easy though. 3

1. Transient broker for demos/tests: qpidd --data-dir=
2. Broker with own storage, but use /etc/qpidd.conf & defaults for everything
else: qpidd --data-dir=mydata
3. Broker with a private config file: qpidd --config=myconf

Comment 1 Mike Bonnet 2008-02-29 16:43:12 UTC
qpidd-0.2-24.el5, qpidc-0.2-24.el5, and rhm-0.2-18.el5 have been pushed to the staging repo for testing