k8ssandra / management-api-for-apache-cassandra

RESTful / Secure Management Sidecar for Apache Cassandra
Apache License 2.0
73 stars 52 forks source link

NettyTlsClientAuthTest fails because cassandra script is not executable #355

Open olim7t opened 1 year ago

olim7t commented 1 year ago

(Encountered on MacOS, this might be system-dependent.)

NettyTlsClientAuthTest requires a local distribution of Cassandra, that gets downloaded and untarred by the Maven build. However, there seems to be an issue when making the startup script executable:

[INFO] --- maven-antrun-plugin:3.0.0:run (download.cassandra.bin) @ datastax-mgmtapi-server ---
[INFO] Executing tasks
[INFO]     [mkdir] Created dir: management-api-for-apache-cassandra/management-api-server/.cassandra-bin
[INFO]       [get] Getting: https://archive.apache.org/dist/cassandra/3.11.15/apache-cassandra-3.11.15-bin.tar.gz
[INFO]       [get] To: management-api-for-apache-cassandra/management-api-server/.cassandra-bin/apache-cassandra-3.11.15-bin.tar.gz
[INFO]     [untar] Expanding: management-api-for-apache-cassandra/management-api-server/.cassandra-bin/apache-cassandra-3.11.15-bin.tar.gz into management-api-for-apache-cassandra/management-api-server/.cassandra-bin
[ERROR]     [chmod] Result: 137

The offending instruction is:

<chmod file=".cassandra-bin/apache-cassandra-${cassandra3.version}/bin/cassandra" perm="777"/>

As a result, the test fails with a message saying that CASSANDRA_HOME is not set.

TODO:

An easy workaround is to fix the permissions manually:

chmod +x management-api-server/.cassandra-bin/apache-cassandra-3.11.15/bin/cassandra

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: MAPI-27

emerkle826 commented 1 year ago

@burmanm ran into this I believe as well. I think this is a MacOS thing as it's not a problem on Linux.