You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "paul cannon (JIRA)" <ji...@apache.org> on 2010/11/08 20:41:14 UTC
[jira] Created: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
cassandra should chdir / when daemonizing
-----------------------------------------
Key: CASSANDRA-1718
URL: https://issues.apache.org/jira/browse/CASSANDRA-1718
Project: Cassandra
Issue Type: Bug
Environment: Debian squeeze, Cassandra 0.7.0-beta3 and trunk (r1032649)
Reporter: paul cannon
Priority: Minor
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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981617#action_12981617 ]
Jonathan Ellis commented on CASSANDRA-1718:
-------------------------------------------
Bingo.
> 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.
[jira] Updated: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1718:
--------------------------------------
Component/s: Packaging
Fix Version/s: 0.7.1
tagging fix-for 0.7.1 because I don't want to risk any more breakage for 0.7.0
> 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
> Priority: Minor
> Fix For: 0.7.1
>
>
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980795#action_12980795 ]
Jonathan Ellis commented on CASSANDRA-1718:
-------------------------------------------
bq. Is there some way to tell the JVM to put its detritus elsewhere?
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html lists -XX:HeapDumpPath but nothing for a JVM crash log that I see.
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980780#action_12980780 ]
Jonathan Ellis commented on CASSANDRA-1718:
-------------------------------------------
bq. Maybe best would be to chdir() to cassandra's data directory
I like that idea.
> 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
>
>
> 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.
[jira] Updated: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans updated CASSANDRA-1718:
----------------------------------
Attachment: v2-0001-CASSANDRA-1718-chdir-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, v2-0001-CASSANDRA-1718-chdir-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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968843#action_12968843 ]
Eric Evans commented on CASSANDRA-1718:
---------------------------------------
Huh. I thought jsvc was doing this (and I want to say that it _was_ at some point). It really seems like it ought to be.
bq. 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.
We should consider it a bug if anything here relies on relative paths (and I don't think it does).
> 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
>
>
> 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.
[jira] Resolved: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Evans resolved CASSANDRA-1718.
-----------------------------------
Resolution: Fixed
Did.
> 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, v2-0001-CASSANDRA-1718-chdir-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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "paul cannon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980794#action_12980794 ]
paul cannon commented on CASSANDRA-1718:
----------------------------------------
+1 this patch
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "paul cannon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981615#action_12981615 ]
paul cannon commented on CASSANDRA-1718:
----------------------------------------
-XX:ErrorFile ?
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "paul cannon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980768#action_12980768 ]
paul cannon commented on CASSANDRA-1718:
----------------------------------------
Maybe best would be to chdir() to cassandra's data directory, then. It should be ok to pin that. But definitely we want it to be predictable, not "whatever directory the admin was in the last time she started it up".
> 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
>
>
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984273#action_12984273 ]
Hudson commented on CASSANDRA-1718:
-----------------------------------
Integrated in Cassandra-0.7 #182 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/182/])
chdir / on startup
Patch by eevans for CASSANDRA-1718
> 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, v2-0001-CASSANDRA-1718-chdir-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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980302#action_12980302 ]
Jonathan Ellis commented on CASSANDRA-1718:
-------------------------------------------
Note: this means hprof and err files will be created in /, since they are dumped in CWD.
> 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
>
>
> 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.
[jira] Commented: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980788#action_12980788 ]
Eric Evans commented on CASSANDRA-1718:
---------------------------------------
Is there some way to tell the JVM to put its detritus elsewhere? Barring that, /var/lib/cassandra is an improvement over, "wherever".
> 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.
[jira] Assigned: (CASSANDRA-1718) cassandra should chdir / when
daemonizing
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis reassigned CASSANDRA-1718:
-----------------------------------------
Assignee: Eric Evans
> 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
>
>
> 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.