Repository: k8ssandra/k8ssandra-operator (go)

Issue:
K8SSAND-1189 ⁃ Thrift should be disabled for 3.11.x clusters
<!--

Feel free to ask questions on Discord at https://discord.com/invite/y4s64xC9 or in the forum at https://forum.k8ssandra.io/. 
-->

**What happened?**
#249 introduced a structured config for cassandra.yaml. `start_rpc` was left out which makes sense. Unfortunately cass-config-definitions sets it to `true` by default. It should be disabled.

I came across this while debugging some e2e test failures the other day. Tests previously were explicitly setting `start_rpc: false` to tune things down. That's no longer possible now. Maybe this is contributing to some of the recent test flakes.

**Did you expect to see something different?**

Thrift should be turned off, or we should expose it and turn it off be default. Right now, it is enabled and the user cannot disable it. This should be fixed for 1.0.0.



┆Issue is synchronized with this [Jira Bug](https://k8ssandra.atlassian.net/browse/K8SSAND-1189) by [Unito](https://www.unito.io)
┆fixVersions: k8ssandra-operator-v1.0.0
┆friendlyId: K8SSAND-1189
┆priority: Medium


Pull request description:
StartRpc should be explicitly false by default  [K8SSAND-1189]
**What this PR does**:

Cass config builder has logic which sets `start_rpc` to true by default. The current config logic in k8ssandra-operator does not allow the user to set `start_rpc` (because it was considered deprecated), however propagation of the nil value leads to config builder enabling `start_rpc` by default.

This PR to explicitly set `start_rpc` false if not defined, or propagate the value; for Cassandra 3.11 clusters only.

**Which issue(s) this PR fixes**:
Fixes #315

**Checklist**
- [ ] Changes manually tested
- [ ] Automated Tests added/updated
- [ ] Documentation added/updated
- [ ] CHANGELOG.md updated (not required for documentation PRs)
- [ ] CLA Signed:  [DataStax CLA](https://cla.datastax.com/)


Patch:
diff --git a/pkg/cassandra/config.go b/pkg/cassandra/config.go
index e0da6fbf..baa2efa1 100644
--- a/pkg/cassandra/config.go
+++ b/pkg/cassandra/config.go
@@ -20,12 +20,19 @@ const (
 // config is an internal type that is intended to be marshaled into JSON that is a valid
 // value for CassandraDatacenter.Spec.Config.
 type config struct {
-	api.CassandraYaml
+	CassYamlIR
 	cassandraVersion     string
 	jvmOptions           jvmOptions
 	additionalJvmOptions []string
 }
 
+// CassYamlIR is an internal representation of the cassandra.yaml. It is required because we want to make some options (esp. start_rpc) invisible to the user,
+// but some of those options still need to be rendered out into the final cassandra.yaml.
+type CassYamlIR struct {
+	api.CassandraYaml `json:",inline,omitempty"`
+	StartRpc          *bool `json:"start_rpc,omitempty"`
+}
+
 // jvmOptions is an internal type that is intended to be marshaled into JSON that is valid
 // for the jvm options portion of the value supplied to CassandraDatacenter.Spec.Config.
 type jvmOptions struct {
@@ -55,7 +62,7 @@ func (c config) MarshalJSON() ([]byte, error) {
 		}
 	}
 
-	config["cassandra-yaml"] = c.CassandraYaml
+	config["cassandra-yaml"] = c.CassYamlIR
 
 	if c.jvmOptions.InitialHeapSize != nil || c.jvmOptions.MaxHeapSize != nil || c.jvmOptions.HeapNewGenSize != nil {
 		if isCassandra4(c.cassandraVersion) {
@@ -77,35 +84,45 @@ func (c config) MarshalJSON() ([]byte, error) {
 	return json.Marshal(&config)
 }
 
+// NewIRYaml returns a new Cassandra Yaml with all internal fields set to their mandatory values. For example, StartRpc must always be set false,
+// NewIRYaml ensures this happens.
+func NewIRYaml(cassAPIYaml api.CassandraYaml) CassYamlIR {
+	return CassYamlIR{
+		CassandraYaml: cassAPIYaml,
+		StartRpc:      pointer.Bool(false),
+	}
+}
+
 func newConfig(apiConfig api.CassandraConfig, cassandraVersion string) (config, error) {
 	// Filters out config element which do not exist in the Cassandra version in use
-	filteredConfig := apiConfig.DeepCopy()
-	filterConfigForVersion(cassandraVersion, filteredConfig)
-	cfg := config{CassandraYaml: filteredConfig.CassandraYaml, cassandraVersion: cassandraVersion}
-	err := validateConfig(filteredConfig)
+	apiConfig = *apiConfig.DeepCopy()
+	irCfgYaml := NewIRYaml(apiConfig.CassandraYaml)
+	filterConfigForVersion(cassandraVersion, &irCfgYaml)
+	cfg := config{CassYamlIR: irCfgYaml, cassandraVersion: cassandraVersion}
+	err := validateConfig(&irCfgYaml)
 	if err != nil {
 		return cfg, err
 	}
 
-	if filteredConfig.JvmOptions.HeapSize != nil {
-		heapSize := filteredConfig.JvmOptions.HeapSize.Value()
+	if apiConfig.JvmOptions.HeapSize != nil {
+		heapSize := apiConfig.JvmOptions.HeapSize.Value()
 		cfg.jvmOptions.InitialHeapSize = &heapSize
 		cfg.jvmOptions.MaxHeapSize = &heapSize
 	}
 
-	if filteredConfig.JvmOptions.HeapNewGenSize != nil {
-		newGenSize := filteredConfig.JvmOptions.HeapNewGenSize.Value()
+	if apiConfig.JvmOptions.HeapNewGenSize != nil {
+		newGenSize := apiConfig.JvmOptions.HeapNewGenSize.Value()
 		cfg.jvmOptions.HeapNewGenSize = &newGenSize
 	}
 
-	cfg.additionalJvmOptions = filteredConfig.JvmOptions.AdditionalOptions
+	cfg.additionalJvmOptions = apiConfig.JvmOptions.AdditionalOptions
 
 	return cfg, nil
 }
 
 // Some settings in Cassandra are using a float type, which isn't supported for CRDs.
 // They were changed to use a string type, and we validate here that if set they can parse correctly to float.
-func validateConfig(config *api.CassandraConfig) error {
+func validateConfig(config *CassYamlIR) error {
 	if config.CassandraYaml.CommitlogSyncBatchWindowInMs != nil {
 		if _, err := strconv.ParseFloat(*config.CassandraYaml.CommitlogSyncBatchWindowInMs, 64); err != nil {
 			return fmt.Errorf("CommitlogSyncBatchWindowInMs must be a valid float: %v", err)
@@ -150,130 +167,131 @@ func validateConfig(config *api.CassandraConfig) error {
 
 // Filters out config element which do not exist in the Cassandra version in use
 // Generated using the filter columns in the first sheet of https://docs.google.com/spreadsheets/d/1P0bw5avkppBnoLXY00qVQmntgx6UJQbUidZtHfCRp_c/edit?usp=sharing
-func filterConfigForVersion(cassandraVersion string, filteredConfig *api.CassandraConfig) {
+func filterConfigForVersion(cassandraVersion string, cassandraYamlIR *CassYamlIR) {
 	if IsCassandra3(cassandraVersion) {
-		filteredConfig.CassandraYaml.AllocateTokensForLocalReplicationFactor = nil
-		filteredConfig.CassandraYaml.AuditLoggingOptions = nil
-		filteredConfig.CassandraYaml.AuthReadConsistencyLevel = nil
-		filteredConfig.CassandraYaml.AuthWriteConsistencyLevel = nil
-		filteredConfig.CassandraYaml.AutoHintsCleanupEnabled = nil
-		filteredConfig.CassandraYaml.AutoOptimiseFullRepairStreams = nil
-		filteredConfig.CassandraYaml.AutoOptimiseIncRepairStreams = nil
-		filteredConfig.CassandraYaml.AutoOptimisePreviewRepairStreams = nil
-		filteredConfig.CassandraYaml.AutocompactionOnStartupEnabled = nil
-		filteredConfig.CassandraYaml.AutomaticSstableUpgrade = nil
-		filteredConfig.CassandraYaml.AvailableProcessors = nil
-		filteredConfig.CassandraYaml.BlockForPeersInRemoteDcs = nil
-		filteredConfig.CassandraYaml.BlockForPeersTimeoutInSecs = nil
-		filteredConfig.CassandraYaml.ClientErrorReportingExclusions = nil
-		filteredConfig.CassandraYaml.CommitlogSyncGroupWindowInMs = nil
-		filteredConfig.CassandraYaml.CompactionTombstoneWarningThreshold = nil
-		filteredConfig.CassandraYaml.ConcurrentMaterializedViewBuilders = nil
-		filteredConfig.CassandraYaml.ConcurrentValidations = nil
-		filteredConfig.CassandraYaml.ConsecutiveMessageErrorsThreshold = nil
-		filteredConfig.CassandraYaml.CorruptedTombstoneStrategy = nil
-		filteredConfig.CassandraYaml.DefaultKeyspaceRf = nil
-		filteredConfig.CassandraYaml.DenylistConsistencyLevel = nil
-		filteredConfig.CassandraYaml.DenylistInitialLoadRetrySeconds = nil
-		filteredConfig.CassandraYaml.DenylistMaxKeysPerTable = nil
-		filteredConfig.CassandraYaml.DenylistMaxKeysTotal = nil
-		filteredConfig.CassandraYaml.DenylistRefreshSeconds = nil
-		filteredConfig.CassandraYaml.DiagnosticEventsEnabled = nil
-		filteredConfig.CassandraYaml.EnableDenylistRangeReads = nil
-		filteredConfig.CassandraYaml.EnableDenylistReads = nil
-		filteredConfig.CassandraYaml.EnableDenylistWrites = nil
-		filteredConfig.CassandraYaml.EnablePartitionDenylist = nil
-		filteredConfig.CassandraYaml.EnableTransientReplication = nil
-		filteredConfig.CassandraYaml.FailureDetector = nil
-		filteredConfig.CassandraYaml.FileCacheEnabled = nil
-		filteredConfig.CassandraYaml.FlushCompression = nil
-		filteredConfig.CassandraYaml.FullQueryLoggingOptions = nil
-		filteredConfig.CassandraYaml.HintWindowPersistentEnabled = nil
-		filteredConfig.CassandraYaml.IdealConsistencyLevel = nil
-		filteredConfig.CassandraYaml.InitialRangeTombstoneListAllocationSize = nil
-		filteredConfig.CassandraYaml.InternodeApplicationReceiveQueueCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeApplicationReceiveQueueReserveEndpointCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeApplicationReceiveQueueReserveGlobalCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeApplicationSendQueueCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeApplicationSendQueueReserveEndpointCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeApplicationSendQueueReserveGlobalCapacityInBytes = nil
-		filteredConfig.CassandraYaml.InternodeErrorReportingExclusions = nil
-		filteredConfig.CassandraYaml.InternodeMaxMessageSizeInBytes = nil
-		filteredConfig.CassandraYaml.InternodeSocketReceiveBufferSizeInBytes = nil
-		filteredConfig.CassandraYaml.InternodeSocketSendBufferSizeInBytes = nil
-		filteredConfig.CassandraYaml.InternodeStreamingTcpUserTimeoutInMs = nil
-		filteredConfig.CassandraYaml.InternodeTcpConnectTimeoutInMs = nil
-		filteredConfig.CassandraYaml.InternodeTcpUserTimeoutInMs = nil
-		filteredConfig.CassandraYaml.KeyCacheMigrateDuringCompaction = nil
-		filteredConfig.CassandraYaml.KeyspaceCountWarnThreshold = nil
-		filteredConfig.CassandraYaml.MaxConcurrentAutomaticSstableUpgrades = nil
-		filteredConfig.CassandraYaml.MinimumKeyspaceRf = nil
-		filteredConfig.CassandraYaml.NativeTransportAllowOlderProtocols = nil
-		filteredConfig.CassandraYaml.NativeTransportIdleTimeoutInMs = nil
-		filteredConfig.CassandraYaml.NativeTransportMaxRequestsPerSecond = nil
-		filteredConfig.CassandraYaml.NativeTransportRateLimitingEnabled = nil
-		filteredConfig.CassandraYaml.NativeTransportReceiveQueueCapacityInBytes = nil
-		filteredConfig.CassandraYaml.NetworkAuthorizer = nil
-		filteredConfig.CassandraYaml.NetworkingCacheSizeInMb = nil
-		filteredConfig.CassandraYaml.PaxosCacheSizeInMb = nil
-		filteredConfig.CassandraYaml.PeriodicCommitlogSyncLagBlockInMs = nil
-		filteredConfig.CassandraYaml.RangeTombstoneListGrowthFactor = nil
-		filteredConfig.CassandraYaml.RejectRepairCompactionThreshold = nil
-		filteredConfig.CassandraYaml.RepairCommandPoolFullStrategy = nil
-		filteredConfig.CassandraYaml.RepairCommandPoolSize = nil
-		filteredConfig.CassandraYaml.RepairSessionSpaceInMb = nil
-		filteredConfig.CassandraYaml.RepairedDataTrackingForPartitionReadsEnabled = nil
-		filteredConfig.CassandraYaml.RepairedDataTrackingForRangeReadsEnabled = nil
-		filteredConfig.CassandraYaml.ReportUnconfirmedRepairedDataMismatches = nil
-		filteredConfig.CassandraYaml.SnapshotLinksPerSecond = nil
-		filteredConfig.CassandraYaml.SnapshotOnRepairedDataMismatch = nil
-		filteredConfig.CassandraYaml.StreamEntireSstables = nil
-		filteredConfig.CassandraYaml.StreamingConnectionsPerHost = nil
-		filteredConfig.CassandraYaml.TableCountWarnThreshold = nil
-		filteredConfig.CassandraYaml.TrackWarnings = nil
-		filteredConfig.CassandraYaml.TraverseAuthFromRoot = nil
-		filteredConfig.CassandraYaml.UseDeterministicTableId = nil
-		filteredConfig.CassandraYaml.UseOffheapMerkleTrees = nil
-		filteredConfig.CassandraYaml.ValidationPreviewPurgeHeadStartInSec = nil
+		cassandraYamlIR.AllocateTokensForLocalReplicationFactor = nil
+		cassandraYamlIR.AuditLoggingOptions = nil
+		cassandraYamlIR.AuthReadConsistencyLevel = nil
+		cassandraYamlIR.AuthWriteConsistencyLevel = nil
+		cassandraYamlIR.AutoHintsCleanupEnabled = nil
+		cassandraYamlIR.AutoOptimiseFullRepairStreams = nil
+		cassandraYamlIR.AutoOptimiseIncRepairStreams = nil
+		cassandraYamlIR.AutoOptimisePreviewRepairStreams = nil
+		cassandraYamlIR.AutocompactionOnStartupEnabled = nil
+		cassandraYamlIR.AutomaticSstableUpgrade = nil
+		cassandraYamlIR.AvailableProcessors = nil
+		cassandraYamlIR.BlockForPeersInRemoteDcs = nil
+		cassandraYamlIR.BlockForPeersTimeoutInSecs = nil
+		cassandraYamlIR.ClientErrorReportingExclusions = nil
+		cassandraYamlIR.CommitlogSyncGroupWindowInMs = nil
+		cassandraYamlIR.CompactionTombstoneWarningThreshold = nil
+		cassandraYamlIR.ConcurrentMaterializedViewBuilders = nil
+		cassandraYamlIR.ConcurrentValidations = nil
+		cassandraYamlIR.ConsecutiveMessageErrorsThreshold = nil
+		cassandraYamlIR.CorruptedTombstoneStrategy = nil
+		cassandraYamlIR.DefaultKeyspaceRf = nil
+		cassandraYamlIR.DenylistConsistencyLevel = nil
+		cassandraYamlIR.DenylistInitialLoadRetrySeconds = nil
+		cassandraYamlIR.DenylistMaxKeysPerTable = nil
+		cassandraYamlIR.DenylistMaxKeysTotal = nil
+		cassandraYamlIR.DenylistRefreshSeconds = nil
+		cassandraYamlIR.DiagnosticEventsEnabled = nil
+		cassandraYamlIR.EnableDenylistRangeReads = nil
+		cassandraYamlIR.EnableDenylistReads = nil
+		cassandraYamlIR.EnableDenylistWrites = nil
+		cassandraYamlIR.EnablePartitionDenylist = nil
+		cassandraYamlIR.EnableTransientReplication = nil
+		cassandraYamlIR.FailureDetector = nil
+		cassandraYamlIR.FileCacheEnabled = nil
+		cassandraYamlIR.FlushCompression = nil
+		cassandraYamlIR.FullQueryLoggingOptions = nil
+		cassandraYamlIR.HintWindowPersistentEnabled = nil
+		cassandraYamlIR.IdealConsistencyLevel = nil
+		cassandraYamlIR.InitialRangeTombstoneListAllocationSize = nil
+		cassandraYamlIR.InternodeApplicationReceiveQueueCapacityInBytes = nil
+		cassandraYamlIR.InternodeApplicationReceiveQueueReserveEndpointCapacityInBytes = nil
+		cassandraYamlIR.InternodeApplicationReceiveQueueReserveGlobalCapacityInBytes = nil
+		cassandraYamlIR.InternodeApplicationSendQueueCapacityInBytes = nil
+		cassandraYamlIR.InternodeApplicationSendQueueReserveEndpointCapacityInBytes = nil
+		cassandraYamlIR.InternodeApplicationSendQueueReserveGlobalCapacityInBytes = nil
+		cassandraYamlIR.InternodeErrorReportingExclusions = nil
+		cassandraYamlIR.InternodeMaxMessageSizeInBytes = nil
+		cassandraYamlIR.InternodeSocketReceiveBufferSizeInBytes = nil
+		cassandraYamlIR.InternodeSocketSendBufferSizeInBytes = nil
+		cassandraYamlIR.InternodeStreamingTcpUserTimeoutInMs = nil
+		cassandraYamlIR.InternodeTcpConnectTimeoutInMs = nil
+		cassandraYamlIR.InternodeTcpUserTimeoutInMs = nil
+		cassandraYamlIR.KeyCacheMigrateDuringCompaction = nil
+		cassandraYamlIR.KeyspaceCountWarnThreshold = nil
+		cassandraYamlIR.MaxConcurrentAutomaticSstableUpgrades = nil
+		cassandraYamlIR.MinimumKeyspaceRf = nil
+		cassandraYamlIR.NativeTransportAllowOlderProtocols = nil
+		cassandraYamlIR.NativeTransportIdleTimeoutInMs = nil
+		cassandraYamlIR.NativeTransportMaxRequestsPerSecond = nil
+		cassandraYamlIR.NativeTransportRateLimitingEnabled = nil
+		cassandraYamlIR.NativeTransportReceiveQueueCapacityInBytes = nil
+		cassandraYamlIR.NetworkAuthorizer = nil
+		cassandraYamlIR.NetworkingCacheSizeInMb = nil
+		cassandraYamlIR.PaxosCacheSizeInMb = nil
+		cassandraYamlIR.PeriodicCommitlogSyncLagBlockInMs = nil
+		cassandraYamlIR.RangeTombstoneListGrowthFactor = nil
+		cassandraYamlIR.RejectRepairCompactionThreshold = nil
+		cassandraYamlIR.RepairCommandPoolFullStrategy = nil
+		cassandraYamlIR.RepairCommandPoolSize = nil
+		cassandraYamlIR.RepairSessionSpaceInMb = nil
+		cassandraYamlIR.RepairedDataTrackingForPartitionReadsEnabled = nil
+		cassandraYamlIR.RepairedDataTrackingForRangeReadsEnabled = nil
+		cassandraYamlIR.ReportUnconfirmedRepairedDataMismatches = nil
+		cassandraYamlIR.SnapshotLinksPerSecond = nil
+		cassandraYamlIR.SnapshotOnRepairedDataMismatch = nil
+		cassandraYamlIR.StreamEntireSstables = nil
+		cassandraYamlIR.StreamingConnectionsPerHost = nil
+		cassandraYamlIR.TableCountWarnThreshold = nil
+		cassandraYamlIR.TrackWarnings = nil
+		cassandraYamlIR.TraverseAuthFromRoot = nil
+		cassandraYamlIR.UseDeterministicTableId = nil
+		cassandraYamlIR.UseOffheapMerkleTrees = nil
+		cassandraYamlIR.ValidationPreviewPurgeHeadStartInSec = nil
 	}
 	if isCassandra4(cassandraVersion) {
-		filteredConfig.CassandraYaml.AuthReadConsistencyLevel = nil
-		filteredConfig.CassandraYaml.AuthWriteConsistencyLevel = nil
-		filteredConfig.CassandraYaml.AutoHintsCleanupEnabled = nil
-		filteredConfig.CassandraYaml.AvailableProcessors = nil
-		filteredConfig.CassandraYaml.ClientErrorReportingExclusions = nil
-		filteredConfig.CassandraYaml.CompactionTombstoneWarningThreshold = nil
-		filteredConfig.CassandraYaml.DefaultKeyspaceRf = nil
-		filteredConfig.CassandraYaml.DenylistConsistencyLevel = nil
-		filteredConfig.CassandraYaml.DenylistInitialLoadRetrySeconds = nil
-		filteredConfig.CassandraYaml.DenylistMaxKeysPerTable = nil
-		filteredConfig.CassandraYaml.DenylistMaxKeysTotal = nil
-		filteredConfig.CassandraYaml.DenylistRefreshSeconds = nil
-		filteredConfig.CassandraYaml.EnableDenylistRangeReads = nil
-		filteredConfig.CassandraYaml.EnableDenylistReads = nil
-		filteredConfig.CassandraYaml.EnableDenylistWrites = nil
-		filteredConfig.CassandraYaml.EnablePartitionDenylist = nil
-		filteredConfig.CassandraYaml.FailureDetector = nil
-		filteredConfig.CassandraYaml.HintWindowPersistentEnabled = nil
-		filteredConfig.CassandraYaml.IndexInterval = nil
-		filteredConfig.CassandraYaml.InternodeErrorReportingExclusions = nil
-		filteredConfig.CassandraYaml.InternodeRecvBuffSizeInBytes = nil
-		filteredConfig.CassandraYaml.InternodeSendBuffSizeInBytes = nil
-		filteredConfig.CassandraYaml.MinimumKeyspaceRf = nil
-		filteredConfig.CassandraYaml.NativeTransportMaxRequestsPerSecond = nil
-		filteredConfig.CassandraYaml.NativeTransportRateLimitingEnabled = nil
-		filteredConfig.CassandraYaml.OtcBacklogExpirationIntervalMs = nil
-		filteredConfig.CassandraYaml.PaxosCacheSizeInMb = nil
-		filteredConfig.CassandraYaml.RequestScheduler = nil
-		filteredConfig.CassandraYaml.RequestSchedulerId = nil
-		filteredConfig.CassandraYaml.RequestSchedulerOptions = nil
-		filteredConfig.CassandraYaml.StreamingSocketTimeoutInMs = nil
-		filteredConfig.CassandraYaml.ThriftFramedTransportSizeInMb = nil
-		filteredConfig.CassandraYaml.ThriftMaxMessageLengthInMb = nil
-		filteredConfig.CassandraYaml.ThriftPreparedStatementsCacheSizeMb = nil
-		filteredConfig.CassandraYaml.TrackWarnings = nil
-		filteredConfig.CassandraYaml.TraverseAuthFromRoot = nil
-		filteredConfig.CassandraYaml.UseDeterministicTableId = nil
+		cassandraYamlIR.AuthReadConsistencyLevel = nil
+		cassandraYamlIR.AuthWriteConsistencyLevel = nil
+		cassandraYamlIR.AutoHintsCleanupEnabled = nil
+		cassandraYamlIR.AvailableProcessors = nil
+		cassandraYamlIR.ClientErrorReportingExclusions = nil
+		cassandraYamlIR.CompactionTombstoneWarningThreshold = nil
+		cassandraYamlIR.DefaultKeyspaceRf = nil
+		cassandraYamlIR.DenylistConsistencyLevel = nil
+		cassandraYamlIR.DenylistInitialLoadRetrySeconds = nil
+		cassandraYamlIR.DenylistMaxKeysPerTable = nil
+		cassandraYamlIR.DenylistMaxKeysTotal = nil
+		cassandraYamlIR.DenylistRefreshSeconds = nil
+		cassandraYamlIR.EnableDenylistRangeReads = nil
+		cassandraYamlIR.EnableDenylistReads = nil
+		cassandraYamlIR.EnableDenylistWrites = nil
+		cassandraYamlIR.EnablePartitionDenylist = nil
+		cassandraYamlIR.FailureDetector = nil
+		cassandraYamlIR.HintWindowPersistentEnabled = nil
+		cassandraYamlIR.IndexInterval = nil
+		cassandraYamlIR.InternodeErrorReportingExclusions = nil
+		cassandraYamlIR.InternodeRecvBuffSizeInBytes = nil
+		cassandraYamlIR.InternodeSendBuffSizeInBytes = nil
+		cassandraYamlIR.MinimumKeyspaceRf = nil
+		cassandraYamlIR.NativeTransportMaxRequestsPerSecond = nil
+		cassandraYamlIR.NativeTransportRateLimitingEnabled = nil
+		cassandraYamlIR.OtcBacklogExpirationIntervalMs = nil
+		cassandraYamlIR.PaxosCacheSizeInMb = nil
+		cassandraYamlIR.RequestScheduler = nil
+		cassandraYamlIR.RequestSchedulerId = nil
+		cassandraYamlIR.RequestSchedulerOptions = nil
+		cassandraYamlIR.StartRpc = nil
+		cassandraYamlIR.StreamingSocketTimeoutInMs = nil
+		cassandraYamlIR.ThriftFramedTransportSizeInMb = nil
+		cassandraYamlIR.ThriftMaxMessageLengthInMb = nil
+		cassandraYamlIR.ThriftPreparedStatementsCacheSizeMb = nil
+		cassandraYamlIR.TrackWarnings = nil
+		cassandraYamlIR.TraverseAuthFromRoot = nil
+		cassandraYamlIR.UseDeterministicTableId = nil
 	}
 }
 


Test patch:
diff --git a/pkg/cassandra/config_test.go b/pkg/cassandra/config_test.go
index b17aab57..8a91de5f 100644
--- a/pkg/cassandra/config_test.go
+++ b/pkg/cassandra/config_test.go
@@ -158,7 +158,8 @@ func TestCreateJsonConfig(t *testing.T) {
 			},
 			want: `{
               "cassandra-yaml": {
-                "num_tokens": 256
+                "num_tokens": 256,
+				"start_rpc": false
               },
               "jvm-options": {
                 "initial_heap_size": 1073741824,
@@ -300,7 +301,8 @@ func TestCreateJsonConfig(t *testing.T) {
 			want: `{
               "cassandra-yaml": {
 				"num_tokens": 256,
-                "thrift_prepared_statements_cache_size_mb": 1
+                "thrift_prepared_statements_cache_size_mb": 1,
+				"start_rpc": false
               }
             }`,
 		},
@@ -328,7 +330,8 @@ func TestCreateJsonConfig(t *testing.T) {
 			},
 			want: `{
               "cassandra-yaml": {
-                "num_tokens": 32
+                "num_tokens": 32,
+				"start_rpc": false
               }
             }`,
 		},
@@ -388,7 +391,8 @@ func TestCreateJsonConfig(t *testing.T) {
 					"permissions_update_interval_in_ms": 456,
 					"credentials_validity_in_ms": 789,
 					"credentials_update_interval_in_ms": 789,
-					"num_tokens": 256
+					"num_tokens": 256,
+					"start_rpc":false
 				}
 		   }`,
 		},
@@ -803,6 +807,7 @@ func TestCreateJsonConfig(t *testing.T) {
 					"snapshot_before_compaction": true,
 					"snapshot_on_duplicate_row_detection": true,
 					"sstable_preemptive_open_interval_in_mb": 241,
+					"start_rpc":false, 
 					"stream_throughput_outbound_megabits_per_sec": 246,
 					"streaming_keep_alive_period_in_secs": 248,
 					"streaming_socket_timeout_in_ms": 249,