Please review: [389 Project] #47606: replica init/bulk import errors should be more verbose
by Noriko Hosoi
https://fedorahosted.org/389/ticket/47606
https://fedorahosted.org/389/attachment/ticket/47606/0001-Ticket-47606-re...
Description:
1. maxbersize: If the size of an entry is larger than the consumer's
maxbersize, the following error used to be logged:
Incoming BER Element was too long, max allowable is ### bytes.
Change the nsslapd-maxbersize attribute in cn=config to increase.
This message does not indicate how large the maxbersize needs to be.
This patch adds the code to retrieve the failed ber size.
Revised message:
Incoming BER Element was @@@ bytes, max allowable is ### bytes.
Change the nsslapd-maxbersize attribute in cn=config to increase.
Note: There is no lber API that returns the ber size if it fails to
handle the ber. This patch borrows the internal structure of ber
and get the size. This could be risky since the size or structure
of the ber could be updated in the openldap lber.
2. cache size: The bulk import depends upon the nsslapd-cachememsize
value in the backend instance entry (e.g., cn=userRoot,cn=ldbm
database,cn=plugins,cn=config). If an entry size is larger than
the cachememsize, the bulk import used to fail with this message:
import userRoot: REASON: entry too large (@@@ bytes) for the
import buffer size (### bytes). Try increasing nsslapd-
cachememsize.
Also, the message follows the skipping entry message:
import userRoot: WARNING: skipping entry "<DN>"
but actually, it did NOT "skip" the entry and continue the bulk
import, but it failed there and completely wiped out the backend
database.
This patch modifies the message as follows:
import userRoot: REASON: entry too large (@@@ bytes) for the
effective import buffer size (### bytes). Try increasing nsslapd-
cachememsize for the backend instance "userRoot".
and as the message mentions, it just skips the failed entry and
continues the bulk import.
10 years, 4 months
Please review lib389 (take 3) 47625: DirSrv not conform to the design
by thierry bordaz
Hi all,
This review takes into account the previous review recommendations:
- change args.get with default values
- change list() so that it returns
- default the environment file related to the instance
(/etc/sysconfig/dirsrv-<serverid> or
$HOME/.dirsrv/dirsrv-<serverid>)
- all the environment files if called with 'list(all=True)'
- change exists() to return 'len(self.list()) == 1'
- start() rebinds to the instance so that its final state is
DIRSRV_STATE_ONLINE
- List( ) returns a list of dictionaries. Each dictionary is
built from config files found under <prefix>/etc/sysconfig/dirsrv-* or
$HOME/.dirsrv/dirsrv-*. The dictionary contains a kind of
<propname>:<value> where propname are basically the environment variable
set in those file. By default, list () only returns its instance config
file (if it exists). Else it returns all the instances.
- minor changes to set the 'sroot' attribute from what is found
in SERVER_DIR of the config file
https://fedorahosted.org/389/attachment/ticket/47625/0003-Ticket-47625-CI...
10 years, 4 months