Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

[BUG] Casskop refuses to set nodesPerRacks to 0 even after cleaning up cassandra keyspaces #369

@srteam2020

Description

@srteam2020

Bug Report

We find that sometimes casskop and Cassandra disagrees on the keyspace which prevents us from setting nodesPerRacks to 0.

  1. Create a CassandraCluster with 3 DC, each DC with 1 rack, and nodesPerRacks is set to 1
  2. Clean up Cassandra pods by running kubectl casskop cleanup --pod cassandra-cluster-dc1-rack1-0. The operator will use Jolokia to communicate with cassandra and issue the keyspace deletion operation. In operator's log, it shows,
[cassandra-cluster-dc1-rack1-0.cassandra-cluster]: Cleanup of keyspace system_distributed
[cassandra-cluster-dc1-rack1-0.cassandra-cluster]: Cleanup of keyspace system_auth
[cassandra-cluster-dc1-rack1-0.cassandra-cluster]: Cleanup of keyspace system_traces
  1. Set nodesPerRacks of first DC to 0, the operator still reject the operation due to detection of existing keyspaces,
The Operator has refused the ScaleDown. Keyspaces still having data [system_distributed system_auth system_traces]

In step 2 it seems that the keyspace is already deleted and the node is already cleaned up, but some how in step 3 we still cannot set nodesPerRacks to 0, thus cannot delete a dc.

What did you do?
Try to set nodesPerRacks to 0 before deleting a dc.

What did you expect to see?
nodesPerRacks is set to 0.

What did you see instead? Under which circumstances?
The operator still reject the operation due to detection of existing keyspaces.

Environment

  • casskop version:
    f87c8e0 (master branch)

  • Kubernetes version information:
    1.18.9

  • Cassandra version:
    3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions