You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Eric Evans (JIRA)" <ji...@apache.org> on 2011/01/12 17:33:46 UTC

[jira] Updated: (CASSANDRA-1718) cassandra should chdir / when daemonizing

     [ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1718:
----------------------------------

    Attachment: v1-0001-CASSANDRA-1718-switch-to-home-directory-on-startup.txt

> cassandra should chdir / when daemonizing
> -----------------------------------------
>
>                 Key: CASSANDRA-1718
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1718
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>         Environment: Debian squeeze, Cassandra 0.7.0-beta3 and trunk (r1032649)
>            Reporter: paul cannon
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.7.1
>
>         Attachments: v1-0001-CASSANDRA-1718-switch-to-home-directory-on-startup.txt
>
>
> Common practice when daemonizing is to cd / to avoid pinning a filesystem.  For example, if the oper happens to start Cassandra (by itself, or with a manual jsvc invocation, or with the initscript) in /mnt/usb-storage, and there is something mounted there, then the oper will not be able to unmount the usb device that was mounted at that location, since the cassandra process has it open as its cwd.
> evidence that this isn't being done already:
> {noformat}
> ~% sudo lsof -p 9775 | awk '$4=="cwd"'
> jsvc    9775 cassandra  cwd    DIR                8,1     4096 147675 /home/paul/packages/cassandra/trunk
> {noformat}
> (That instance was invoked using the Debian initscript.)
> Obviously chdir("/") isn't necessary when not daemonizing, although it shouldn't hurt either.
> If there are concerns about Cassandra having an ongoing ability to open filenames relative to its original working directory, then it should be sufficient just to do a "cd /" in the initscript before starting Cassandra.  That case, at least, is particularly important.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.