You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Alex Markham (Created) (JIRA)" <ji...@apache.org> on 2012/01/17 10:46:39 UTC

[jira] [Created] (COUCHDB-1380) logrotate doesn't work correctly with couchdb 1.2.x

logrotate doesn't work correctly with couchdb 1.2.x
---------------------------------------------------

                 Key: COUCHDB-1380
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1380
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.2
         Environment: CentOS 5.6 x64, couchdb 1.2.x (13th Jan 2012 - 1.2.0a-08d8f89-git), logrotate 3.7.4
            Reporter: Alex Markham
            Priority: Minor


Running logrotate -f with couchdb 1.2.x leaves null data at the start of the couch.log file, I'm guessing equal to the size of data that should have been removed and rotated into the log.1 (eg "head -c 1000000000 couch.log" is blank)

This does not happen on couchdb 1.1.1, 1.0.2 or 1.0.3

The log files then stay large, and when trying to grep or less them, they are reported as binary.

This seems to have happened to another user, but no details of OS or version were reported: http://comments.gmane.org/gmane.comp.db.couchdb.user/16049 

The logrotate config used is very similar to the one installed with couchdb -
/var/log/couchdb/*.log {
       size=150M
       rotate 5
       copytruncate
       compress
       delaycompress
       notifempty
       missingok
}

Has there been any changes to the interaction with log files/file handles since 1.1.1? Does couchdb need to receive a SIGHUP? Or can anyone reproduce this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (COUCHDB-1380) logrotate doesn't work correctly with couchdb 1.2.x

Posted by "Robert Newson (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson updated COUCHDB-1380:
-----------------------------------

    Priority: Blocker  (was: Minor)

Possibly disk_log is keeping an internal track of its write position and doing a positioned write (file:pwrite) call. After truncation by logrotate, this would cause a file hole on filesystems that support it and would actually fill in all that space with zeroes on filesystems that do not.

In any case, this should be fixed before the 1.2. release. Thanks for reporting it!
                
> logrotate doesn't work correctly with couchdb 1.2.x
> ---------------------------------------------------
>
>                 Key: COUCHDB-1380
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1380
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: CentOS 5.6 x64, couchdb 1.2.x (13th Jan 2012 - 1.2.0a-08d8f89-git), logrotate 3.7.4
>            Reporter: Alex Markham
>            Priority: Blocker
>              Labels: logging, logrotate
>
> Running logrotate -f with couchdb 1.2.x leaves null data at the start of the couch.log file, I'm guessing equal to the size of data that should have been removed and rotated into the log.1 (eg "head -c 1000000000 couch.log" is blank)
> This does not happen on couchdb 1.1.1, 1.0.2 or 1.0.3
> The log files then stay large, and when trying to grep or less them, they are reported as binary.
> This seems to have happened to another user, but no details of OS or version were reported: http://comments.gmane.org/gmane.comp.db.couchdb.user/16049 
> The logrotate config used is very similar to the one installed with couchdb -
> /var/log/couchdb/*.log {
>        size=150M
>        rotate 5
>        copytruncate
>        compress
>        delaycompress
>        notifempty
>        missingok
> }
> Has there been any changes to the interaction with log files/file handles since 1.1.1? Does couchdb need to receive a SIGHUP? Or can anyone reproduce this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (COUCHDB-1380) logrotate doesn't work correctly with couchdb 1.2.x

Posted by "Robert Newson (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson resolved COUCHDB-1380.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3
                   1.2

Introduction of disk_log reverted due to inability to rotate.
                
> logrotate doesn't work correctly with couchdb 1.2.x
> ---------------------------------------------------
>
>                 Key: COUCHDB-1380
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1380
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: CentOS 5.6 x64, couchdb 1.2.x (13th Jan 2012 - 1.2.0a-08d8f89-git), logrotate 3.7.4
>            Reporter: Alex Markham
>            Assignee: Robert Newson
>            Priority: Blocker
>              Labels: logging, logrotate
>             Fix For: 1.2, 1.3
>
>
> Running logrotate -f with couchdb 1.2.x leaves null data at the start of the couch.log file, I'm guessing equal to the size of data that should have been removed and rotated into the log.1 (eg "head -c 1000000000 couch.log" is blank)
> This does not happen on couchdb 1.1.1, 1.0.2 or 1.0.3
> The log files then stay large, and when trying to grep or less them, they are reported as binary.
> This seems to have happened to another user, but no details of OS or version were reported: http://comments.gmane.org/gmane.comp.db.couchdb.user/16049 
> The logrotate config used is very similar to the one installed with couchdb -
> /var/log/couchdb/*.log {
>        size=150M
>        rotate 5
>        copytruncate
>        compress
>        delaycompress
>        notifempty
>        missingok
> }
> Has there been any changes to the interaction with log files/file handles since 1.1.1? Does couchdb need to receive a SIGHUP? Or can anyone reproduce this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1380) logrotate doesn't work correctly with couchdb 1.2.x

Posted by "Filipe Manana (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187705#comment-13187705 ] 

Filipe Manana commented on COUCHDB-1380:
----------------------------------------

Agree with Robert's analys. Indeed it seems disk_log does pwrites and fseeks (file:position/2) in a few places. This partly explains why disk_log offers log rotating features.
Other then reverting the commit which added disk_log to couch_log, I don't see a better short term solution.
                
> logrotate doesn't work correctly with couchdb 1.2.x
> ---------------------------------------------------
>
>                 Key: COUCHDB-1380
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1380
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: CentOS 5.6 x64, couchdb 1.2.x (13th Jan 2012 - 1.2.0a-08d8f89-git), logrotate 3.7.4
>            Reporter: Alex Markham
>            Priority: Blocker
>              Labels: logging, logrotate
>
> Running logrotate -f with couchdb 1.2.x leaves null data at the start of the couch.log file, I'm guessing equal to the size of data that should have been removed and rotated into the log.1 (eg "head -c 1000000000 couch.log" is blank)
> This does not happen on couchdb 1.1.1, 1.0.2 or 1.0.3
> The log files then stay large, and when trying to grep or less them, they are reported as binary.
> This seems to have happened to another user, but no details of OS or version were reported: http://comments.gmane.org/gmane.comp.db.couchdb.user/16049 
> The logrotate config used is very similar to the one installed with couchdb -
> /var/log/couchdb/*.log {
>        size=150M
>        rotate 5
>        copytruncate
>        compress
>        delaycompress
>        notifempty
>        missingok
> }
> Has there been any changes to the interaction with log files/file handles since 1.1.1? Does couchdb need to receive a SIGHUP? Or can anyone reproduce this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (COUCHDB-1380) logrotate doesn't work correctly with couchdb 1.2.x

Posted by "Robert Newson (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson reassigned COUCHDB-1380:
--------------------------------------

    Assignee: Robert Newson
    
> logrotate doesn't work correctly with couchdb 1.2.x
> ---------------------------------------------------
>
>                 Key: COUCHDB-1380
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1380
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: CentOS 5.6 x64, couchdb 1.2.x (13th Jan 2012 - 1.2.0a-08d8f89-git), logrotate 3.7.4
>            Reporter: Alex Markham
>            Assignee: Robert Newson
>            Priority: Blocker
>              Labels: logging, logrotate
>
> Running logrotate -f with couchdb 1.2.x leaves null data at the start of the couch.log file, I'm guessing equal to the size of data that should have been removed and rotated into the log.1 (eg "head -c 1000000000 couch.log" is blank)
> This does not happen on couchdb 1.1.1, 1.0.2 or 1.0.3
> The log files then stay large, and when trying to grep or less them, they are reported as binary.
> This seems to have happened to another user, but no details of OS or version were reported: http://comments.gmane.org/gmane.comp.db.couchdb.user/16049 
> The logrotate config used is very similar to the one installed with couchdb -
> /var/log/couchdb/*.log {
>        size=150M
>        rotate 5
>        copytruncate
>        compress
>        delaycompress
>        notifempty
>        missingok
> }
> Has there been any changes to the interaction with log files/file handles since 1.1.1? Does couchdb need to receive a SIGHUP? Or can anyone reproduce this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira