riptano / ccm

A script to easily create and destroy an Apache Cassandra cluster on localhost
Apache License 2.0
1.22k stars 303 forks source link

rename __update_yaml -> _update_yaml so DseNode calls it's own method #647

Closed beltran closed 6 years ago

beltran commented 6 years ago

When running the commands: ccm updatedseconf "authorization_options.enabled: true" # dse.yaml is updated as expected ccm updateconf "authorizer: com.Authorizer" The last commands updates cassandra.yaml and restores dse.yaml to the default removing the effect of the first command. This is because on updateconf the following stack happens

ClusterUpdateconfCmd.run ->
    self.cluster.set_configuration_options -> 
        self._persist_config ->
            node.import_config_files ->
                self.copy_config_files # This overrides all the configuration files, which for a DseNode include dse.yaml and cassandra.yaml
                self._update_yaml # This is a private method so the _update_yaml from Node is called instead of the method from DseNode, therefore only the cassandra.yaml is updated leaving us with the overriden default dse.yaml from before

I can look into another fix if we want to keep the __update_yaml private.