Please review (take 2): [389 Project] #35: Log not clear enough on schema errors
by Noriko Hosoi
https://fedorahosted.org/389/ticket/35
https://fedorahosted.org/389/attachment/ticket/35/0001-Trac-Ticket-35-Log...
Thanks to Rich for his review. The new patch logs the lineno of the
corrupted entry in the input ldif file.
> Comment:
>
> Improved the error message to print the line number.
> Fix description: Cryptic error message:
> dse - parsing dse entry [attributeTypes]
> is replaced with:
> dse_read_one_file - Parsing entry in file
> /path/to/schema/03bad.ldif failed . (lineno: ##)
> dse_read_one_file - Invalid section [attributeTypes:
> <the rest of the invalid section up to 256 characters> ...]
>
> Sample log:
> [] - str2entry_dupcheck: entry has no dn
> [] dse_read_one_file - Parsing entry in file /path/to/schema/03bad.ldif
> failed. (lineno: 13)
> [] dse_read_one_file - Invalid section [#
> attributeTypes: ( 2.16.840.1.113730.3.1.10 NAME 'deleteOldRdn' DESC
> 'Changelog attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 X-ORIGIN
> 'Changelog Internet Draft' )
> attributeTypes: ( 2.16.840.1.113730.3.1.11 NAME 'newSuperior' DESC
> 'Changelog attrib ...]
>
11 years, 4 months
Please review: [389 Project] #35: Log not clear enough on schema errors
by Noriko Hosoi
https://fedorahosted.org/389/ticket/35
https://fedorahosted.org/389/attachment/ticket/35/0001-Trac-Ticket-35-Log...
> Comment:
>
> Fix description: Cryptic error message:
> dse - parsing dse entry [attributeTypes]
> is now replaced with:
> dse - Parsing entry in file /path/to/schema/03bad.ldif failed.
> dse - Invalid section [attributeTypes:<the rest of the invalid
> section up to 256 characters> ...]
>
> Full sample log:
> [] - str2entry_dupcheck: entry has no dn
> [] dse - Parsing entry in file /etc/dirsrv/slapd-ID/schema/03bad.ldif
> failed.
> [] dse - Invalid section [# attributes
> attributeTypes: ( 2.16.840.1.113730.3.1.5 NAME 'changeNumber' DESC
> 'Changelog attribute type' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 X-ORIGIN
> 'Changelog Internet Draft' )
> attributeTypes: ( 2.16.840.1.113730.3.1.6 NAME 'targetDn' DESC 'Changelog
> ...]
> [] dse - Please edit the file to correct the reported problems and then
> restart the server.
>
> The file which failed to parse is now in the error log. The previous
> error "entry has no dn" explains the cause of the failure.
11 years, 4 months