Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-4499

Support for cassandra versions >3.11.4 and 4.x

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • London Release
    • SDC

      Currently SDC supports only cassandra versions <=3.11.4 due to the fact, that:

      in SDC https://git.onap.org/sdc/tree/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb

      echo "create user $SDC_USER with password '$SDC_PASSWORD' nosuperuser;" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT

      In cassandra >3.11.4 this leads to the error (in the DB job):

      2023-05-16T07:05:12.990Z|||main||SDC-TOOL||INFO|||beFqdn_IS_UNDEFINED||o.o.s.b.d.c.schema.SdcSchemaBuilder||ActivityType=<log>, Desc=<creating Schema for Cassandra.>
      2023-05-16T07:05:13.001Z|||main||SDC-TOOL||INFO|||beFqdn_IS_UNDEFINED||o.o.s.b.d.c.schema.SdcSchemaBuilder||ActivityType=<log>, Desc=<creating Keyspaces.>
      2023-05-16T07:05:13.002Z|||main||SDC-TOOL||INFO|||beFqdn_IS_UNDEFINED||o.o.s.b.d.c.schema.SdcSchemaBuilder||ActivityType=<log>, Desc=<creating keyspace:sdcartifact.>
      2023-05-16T07:05:15.035Z|||main||SDC-TOOL||ERROR|||beFqdn_IS_UNDEFINED||o.o.s.b.d.c.schema.SdcSchemaBuilder||ActivityType=<log>, Desc=<User asdc_user has no CREATE permission on <all keyspaces> or any of its parents>

      Solution could be to use the "create role" command instead and grant the permissions to the keyspaces (all or single), e.g.

      echo "create role $SDC_USER with password='$SDC_PASSWORD' AND LOGIN = true AND ACCESS TO ALL DATACENTERS;" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT
      echo "grant all permissions on all keyspaces to $SDC_USER;" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT 

      Problem to change to cassandra version 4.x:

            Unassigned Unassigned
            andreasgeissler Andreas Geissler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: