Bug 1083986 - [MICG] Clarify usage of --efp-* parameters
Summary: [MICG] Clarify usage of --efp-* parameters
Keywords:
Status: CLOSED DUPLICATE of bug 1160367
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: Documentation
Version: 3.0
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Jared MORGAN
QA Contact: Michal Toth
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-03 11:01 UTC by Pavel Moravec
Modified: 2020-06-11 12:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
MICG: May be duplicated by 1160367
Last Closed: 2015-07-06 03:01:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2014-04-03 11:01:23 UTC
Description of problem:
Having created qls directory for some efp-* parameters values, changing either of the parameters and restarting the broker prevents creating a journal / durable queue.


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


How reproducible:
100%


Steps to Reproduce:
# first start qpidd with default efp params
qpidd --efp-partition=1 --efp-file-size=2048 &
sleep 1
qpid-config add queue Durable1 --durable
killall qpidd
sleep 1
qpidd --efp-partition=2 &
sleep 1
qpid-config add queue Durable2 --durable
killall qpidd
sleep 1
qpidd --efp-file-size=1024 &
qpid-config add queue Durable3 --durable


Actual results:
queues Durable2 and Durable3 are _not_ created with exception:

Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'Queue Durable2: create() failed: jexception 0x0d04 MessageStoreImpl::getEmptyFilePool() threw JERR_EFP_NOEFP: No Empty File Pool found for given partition and empty file size (Partition=1; EfpFileSize=1024 KiB) (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/linearstore/MessageStoreImpl.cpp:421)'}


Expected results:
Both queues and their journals properly created & able to be used


Additional info:
It might be documentation issue that --efp-* options must be set once forever at the beginning. If so, please clarify it in docs.

Comment 1 Pavel Moravec 2014-04-10 08:15:32 UTC
After clarifying with Kim, this is documentation issue (as --efp-* options not fully implemented yet). Quoting email communication:

> > In the current version, only one partition is possible, that is the
> > partition where the --store-dir is set. A future release will allow
> > other disk partitions to be also configured and selected.
> So this means:
> - I should not change --efp-* parameters since the first journal is created (or even broker start), until I remove qls directory. Am I right? (as trying to create a journal with different --efp-* value(s) end up in bz1083986 I raised)
> - --efp-partition makes no effect atm, just the dirname
Since it is not possible to select the EFP on a per-queue basis, it
makes sense to run using a single EFP size. However, it should be
possible to create several EFP directories with different sized file
pools, and depending on the --efp-file-size parameter, select the
*default* file size for all new queues. Existing queues should continue
using their original EFP pool size. However, this functionality remains
untested.


So what is required to change in MCIG:
1) Table 3.5. Journal Options: "--efp-partition N". Add text like "This option makes no real effect now and is reserved for future extension of linear store".

2) Section 5.3.1, replace text:

"In addition, the pools may exist on different partitions, allowing for some pools to exist on fast media (eg flash disks) while others may exist on standard media. It is possible to set the EFP identity (partition and empty file size within that partition) when creating a queue. "

by something like:

"Until --efp-partition option is fully implemented, choose --efp-file-size option at the beginning of your deployment / linear store usage and dont change it between broker restarts, until you delete qls directory"

(i.e. prevent the issue raised in comment #0 to happen)


(The above limitation of --efp-* parameters is applicable until https://issues.apache.org/jira/browse/QPID-5671 will be backported to MRG)

Comment 3 Jared MORGAN 2014-12-18 23:55:07 UTC
(In reply to Pavel Moravec from comment #1)
> So what is required to change in MCIG:
> 1) Table 3.5. Journal Options: "--efp-partition N". Add text like "This
> option makes no real effect now and is reserved for future extension of
> linear store".

I've added a note to this parameter indicating it is for future use.

http://docbuilder.usersys.redhat.com/18173/#Persistence_Options

> 
> 2) Section 5.3.1, replace text:
> 
> "In addition, the pools may exist on different partitions, allowing for some
> pools to exist on fast media (eg flash disks) while others may exist on
> standard media. It is possible to set the EFP identity (partition and empty
> file size within that partition) when creating a queue. "
> 
> by something like:
> 
> "Until --efp-partition option is fully implemented, choose --efp-file-size
> option at the beginning of your deployment / linear store usage and dont
> change it between broker restarts, until you delete qls directory"

I can't seem to find the original text anywhere in the MRG-M 3 docs. 

In the MICG, the section identified is http://docbuilder.usersys.redhat.com/18173/#MRG_3_Journal_Description

Was this the intended section?

Comment 4 Pavel Moravec 2014-12-22 15:29:14 UTC
It seems the relevant text has been removed from MCICG. Let it leave as is, or add to the added notice the sentence like "do not change this variable after first run of broker" (if it wont bee too confusing).

Comment 5 Jared MORGAN 2014-12-22 21:13:02 UTC
We'll leave it as is I think. Sending to ON_QA for verification.

Comment 6 Michal Toth 2015-03-25 15:06:40 UTC
I would suggest to change statement of "having no effect on qls implementation" regarding to 
== 1) Table 3.3. Journal Options: "--efp-partition N"
Note from "This option is implemented now in anticipation of a future extension of linear store. It has no effect on the current linear store implementation."

to something different, because it really brokes the broker usability.
Broker does not start properly and segfaults, when Pavel's reproducer from comment #1 is used:

1) first start qpidd with default efp params
qpidd --efp-partition=1 --efp-file-size=2048 &
sleep 1

2) create a durable queue
qpid-config add queue Durable1 --durable

3) kill a qpid broker
killall qpidd
sleep 1

4) Start broker anew using different --efp-partition
qpidd --efp-partition=2 &
sleep 1

Results in:
2015-03-25 15:37:31 [Store] warning Linear Store: Journal "Durable1": Journal file /var/lib/qpidd/qls/jrnl/Durable1/7876cf5b-f0f9-4890-920d-4186b00ba733.jrnl is uninitialized or corrupted
2015-03-25 15:37:31 [Store] info Linear Store: Journal "Durable1": 
     Journal recovery analysis (jid="Durable1"):
     <Journal empty, no journal files found>

[1]+  Segmentation fault      (core dumped) qpidd --efp-partition=2


5) Try to create another durable queue
qpid-config add queue Durable2 --durable

Results in:
Failed: ConnectError: [Errno 111] Connection refused

Thus, I would say it impacts the overall usability and that 
latter sentenced should be more clarified (or removed?).
Do not change this value, unless ~qpidd/qls directory is removed.

Tested on qpid-cpp-server-0.30-7


== 2)
I would also suggest to use something like Pavel's comment:
"Until --efp-partition option is fully implemented, choose --efp-file-size
option at the beginning of your deployment / linear store usage and dont
change it between broker restarts, until you delete qls directory"

We have open bug 1066256 which is hitting this issue. 
If we are really going to release qpid broker without fixing this issue, 
please use this addition at least as a note.
(Maybe put it in release notes?)

Comment 7 Jared MORGAN 2015-06-15 06:14:48 UTC
I think this has been fixed by adding a new parameter --efp-partition-num in https://bugzilla.redhat.com/show_bug.cgi?id=1160367

I'll implement the features in this bug, which should squash the issue in this bug. Do you agree Michal?

Comment 8 Jared MORGAN 2015-07-06 03:01:19 UTC

*** This bug has been marked as a duplicate of bug 1160367 ***

Comment 9 Michal Toth 2015-07-07 07:15:30 UTC
Yes,  I agree, Please go ahead and sorry for the delay.


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