The cassandra charm already ends up with cqlsh installed and available, so a subordinate does not seem necessary. The cs:~cassandra-charmers/cqlshrc charm was primarily written to test the cassandra charm, and available as it might be useful to provide CLI access to a user who should not have access to the cassandra machine itself.
A suboprdinate would also need to be careful to not conflict, eg. both attempting to own the cqlshrc files in ~root. But if you have a use case I can't see why not. A subordinate would only need to handle the relation and write out authentication credentials, as the cassandra tools would already be installed. A subordinate would only get connection details to the local node due to the different relation scope, but that isn't really a problem with Cassandra as the other nodes would be discovered by the client (assuming the local Cassandra server is running).
System information as of Tue Apr 28 10:57:37 UTC 2020
System load: 0.01 Processes: 89
Usage of /: 20.7% of 9.52GB Users logged in: 0
Memory usage: 77% IP address for ens2: 10.48.129.114
Swap usage: 0%
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@juju-e60653-default-29:~$ cqlsh
Connected to juju at 10.48.129.114:9042.
[cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
jujucharm@cqlsh>
The cassandra charm already ends up with cqlsh installed and available, so a subordinate does not seem necessary. The cs:~cassandra- charmers/ cqlshrc charm was primarily written to test the cassandra charm, and available as it might be useful to provide CLI access to a user who should not have access to the cassandra machine itself.
A suboprdinate would also need to be careful to not conflict, eg. both attempting to own the cqlshrc files in ~root. But if you have a use case I can't see why not. A subordinate would only need to handle the relation and write out authentication credentials, as the cassandra tools would already be installed. A subordinate would only get connection details to the local node due to the different relation scope, but that isn't really a problem with Cassandra as the other nodes would be discovered by the client (assuming the local Cassandra server is running).
$ juju ssh cassandra/9
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-96-generic x86_64)
* Documentation: https:/ /help.ubuntu. com /landscape. canonical. com /ubuntu. com/advantage
* Management: https:/
* Support: https:/
System information as of Tue Apr 28 10:57:37 UTC 2020
System load: 0.01 Processes: 89
Usage of /: 20.7% of 9.52GB Users logged in: 0
Memory usage: 77% IP address for ens2: 10.48.129.114
Swap usage: 0%
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software; doc/*/copyright .
the exact distribution terms for each program are described in the
individual files in /usr/share/
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@ juju-e60653- default- 29:~$ cqlsh
Connected to juju at 10.48.129.114:9042.
[cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
jujucharm@cqlsh>