basho / cuttlefish

never lose your childlike sense of wonder baby cuttlefish, promise me?
Apache License 2.0
205 stars 124 forks source link

Fail on unknown variable #124

Closed joedevivo closed 10 years ago

joedevivo commented 10 years ago

Currently, cuttlefish prints a warning about unknown configuration variables but continues on using the default.

If I were trying to set anti_entropy = passive and accidentally typed anti_entrophy, riak would start with the default of active. You could check the logs and see the warning, but if you just run riak start, there's no information on the console.

app.config would have worked the same way, so it's not crazy behavior, but cuttlefish is better than that.

joedevivo commented 10 years ago

Also related is a possible issue with node_package. It should be displaying this warning message when you run riak start I think both need to be addressed.

joedevivo commented 10 years ago

displaying this message during riak start is too much work for such little reward. The following user experience is fine:

➜  riak git:(develop) ✗ ./bin/riak start  
riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
➜  riak git:(develop) ✗ ./bin/riak console                       
08:40:42.269 [error] You've tried to set anti_entrophy, but there is no setting with that name.
08:40:42.269 [error]   Did you mean one of these?
08:40:42.287 [error]     anti_entropy
08:40:42.287 [error]     anti_entropy.throttle
08:40:42.287 [error]     riak_control
08:40:42.288 [error] Error generating configuration in phase transform_datatypes
08:40:42.288 [error] Conf file attempted to set unknown variable: anti_entrophy
Error generating config with cuttlefish

closing