[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456591#comment-17456591 ] Brandon Williams commented on CASSANDRA-17136: -- Heh, circle fails the teardown with this test: bq. PermissionError: [Errno 13] Permission denied: 'baddir' I've updated the test to change the permissions back afterward, circle is [running|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136-trunk] again. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.re
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456498#comment-17456498 ] Brandon Williams commented on CASSANDRA-17136: -- [circle for trunk|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136-trunk]. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.Delegatin
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456174#comment-17456174 ] Berenguer Blasi commented on CASSANDRA-17136: - ^ lgtm. I would add a comment in the test explaining why the file and permissions change, otherwise it's difficult to grasp without the context of the ticket. ^This is only the 4.0 CI run so +1 conditioned to a successful trunk CI. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454201#comment-17454201 ] Brandon Williams commented on CASSANDRA-17136: -- We can't reproduce exactly the same error without being able to become another unix user, but I added a dtest [here:https://github.com/driftx/cassandra-dtest/tree/CASSANDRA-17136] that reproduces the NPE by reducing permissions. [!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1308/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1308/pipeline] > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(R
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447251#comment-17447251 ] Berenguer Blasi commented on CASSANDRA-17136: - Couldn't we add a quick test at least checking the folder was/wasn't cleaned? > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17446053#comment-17446053 ] Brandon Williams commented on CASSANDRA-17136: -- ||Branch||CI|| |[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-17136]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136], [!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1287/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1287/pipeline]| |[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-17136]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136-trunk], [!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1288/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1288/pipeline]| > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.j
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445510#comment-17445510 ] Brandon Williams commented on CASSANDRA-17136: -- This broke some FullQueryLoggerTests I'll look into. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445415#comment-17445415 ] Brandon Williams commented on CASSANDRA-17136: -- bq. So the thing that got me to uncover this was that fqltool dump command can very conveniently create a directory layout just like the one above. Aha, I see. bq. looks like we only cleanDirectory when enabling FQL via JMX, so we can probably just catch the exception and let the user know. cleanDirectory is what calls the JVMStabilityInspector, so instead I disabled it when called via JMX. ||Branch||CI|| |[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-17136]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136], [!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1285/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1285/pipeline]| |[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-17136]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136-trunk], [!https://ci-cassandra.apache.org/job/Cassandra-devbranch/1285/badge/icon!|https://ci-cassandra.apache.org/blue/organizations/jenkins/Cassandra-devbranch/detail/Cassandra-devbranch/1286/pipeline]| > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterfac
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444973#comment-17444973 ] Marcus Eriksson commented on CASSANDRA-17136: - This sounds like a bug to me, looks like we only {{cleanDirectory}} when enabling FQL via JMX, so we can probably just catch the exception and let the user know. [~brandon.williams] feel free to reassign this to me > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444903#comment-17444903 ] Brendan Cicchi commented on CASSANDRA-17136: So the thing that got me to uncover this was that {{fqltool dump}} command can very conveniently create a directory layout just like the one above. So an example scenario would only have to be this: {code:java} mkdir /tmp/dir chown cassandra:cassandra /tmp/dir cd /tmp/dir fqltool dump # ... whoops, that was accidental (copy paste, bash history line, or just general badness, etc..) nodetool enablefullquerylog --path /tmp/dir # Node is now down{code} Directory structure: {code:java} /tmp/dir: total 12 drwxr-xr-x 3 cassandra cassandra 4096 Nov 17 02:18 . drwxrwxrwt 15 root root 4096 Nov 17 02:18 .. drwxr-xr-x 2 root root 4096 Nov 17 02:18 cassandra.logdir_IS_UNDEFINED/tmp/dir/cassandra.logdir_IS_UNDEFINED: total 8 drwxr-xr-x 2 root root 4096 Nov 17 02:18 . drwxr-xr-x 3 cassandra cassandra 4096 Nov 17 02:18 .. -rw-r--r-- 1 root root 0 Nov 17 02:18 debug.log -rw-r--r-- 1 root root 0 Nov 17 02:18 system.log {code} I personally don't think the path to hit this is all that difficult to do for an operator. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanser
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17444654#comment-17444654 ] Brandon Williams commented on CASSANDRA-17136: -- Thanks, that works. This is a fairly rare and specific set of circumstances, and the policy is triggered by deleteWithConfirm, which I assume was chosen intentionally in this situation, so I'm not sure we should fix this, though it would be nice to not have it triggered via JMX. [~marcuse] wdyt? > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) >
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442767#comment-17442767 ] Brendan Cicchi commented on CASSANDRA-17136: Okay here are the exact commands that repro the issue for me on 4.0.1 (checked centos and ubuntu just in case): {code:java} mkdir -p /tmp/dir/ chown cassandra:cassandra /tmp/dir mkdir /tmp/dir/sub touch /tmp/dir/sub/file nodetool enablefullquerylog --path /tmp/dir {code} Let me know if that does not work. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) > at > javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) >
[jira] [Commented] (CASSANDRA-17136) FQL: Enabling via nodetool can trigger disk_failure_mode
[ https://issues.apache.org/jira/browse/CASSANDRA-17136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442443#comment-17442443 ] Brandon Williams commented on CASSANDRA-17136: -- Hmm, it seems there is some other element to this, as I can't repro with the steps provided: {noformat} $ bin/nodetool enablefullquerylog --path /tmp/test error: null -- StackTrace -- java.lang.NullPointerException at org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:490) at org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) at org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) at org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) at org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5929) {noformat} But the solution is likely the same: [branch|https://github.com/driftx/cassandra/tree/CASSANDRA-17136], [CI|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-17136]. I'd still like to reproduce and also check the audit log for the same issue. > FQL: Enabling via nodetool can trigger disk_failure_mode > > > Key: CASSANDRA-17136 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17136 > Project: Cassandra > Issue Type: Bug > Components: Tool/fql >Reporter: Brendan Cicchi >Assignee: Brandon Williams >Priority: Normal > Fix For: 4.0.x > > > When enabling fullquerylog via nodetool, if there is a non empty directory > present under the location specified via --path which would trigger an > java.nio.file.AccessDeniedException during cleaning, the node will trigger > the disk_failure_policy which by default is stop. This is a fairly easy way > to offline a cluster if someone executes this in parallel. I don't that think > the behavior is desirable for enabling via nodetool. > > Repro (1 node cluster already up): > {code:bash} > mkdir /some/path/dir > touch /some/path/dir/file > chown -R user: /some/path/dir # Non Cassandra process user > chmod 700 /some/path/dir > nodetool enablefullquerylog --path /some/path > {code} > Nodetool will give back this error: > {code:java} > error: /some/path/dir/file > -- StackTrace -- > java.nio.file.AccessDeniedException: /some/path/dir/file > at > sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) > at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) > at > sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) > at > sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) > at java.nio.file.Files.delete(Files.java:1126) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:250) > at > org.apache.cassandra.io.util.FileUtils.deleteWithConfirm(FileUtils.java:237) > at > org.apache.cassandra.utils.binlog.BinLog.deleteRecursively(BinLog.java:492) > at > org.apache.cassandra.utils.binlog.BinLog.cleanDirectory(BinLog.java:477) > at > org.apache.cassandra.utils.binlog.BinLog$Builder.build(BinLog.java:436) > at > org.apache.cassandra.fql.FullQueryLogger.enable(FullQueryLogger.java:106) > at > org.apache.cassandra.service.StorageService.enableFullQueryLogger(StorageService.java:5915) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:276) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(