basho / cuttlefish

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

More chkconfig magic would be helpful #158

Closed macintux closed 9 years ago

macintux commented 10 years ago

Related to #59

If advanced.config contains a simple tuple without an enclosing array, the error looks like this:

escript: exception error: no function clause matching
                 lists:foldl(#Fun<cuttlefish_advanced.0.102210937>,
                             [{yokozuna,
                               [{root_dir,"./data/yz"},
                                {anti_entropy_data_dir,
                                 "./data/yz_anti_entropy"},
                                {solr_jvm_opts,
                                 "-d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops"},
                                {solr_jmx_port,8985},
seancribbs commented 10 years ago

Can you include an example of the erroneous advanced.config?

macintux commented 10 years ago

Anything that is not a list should trigger that. I had the riak_kv tuple with add_path inside it, but no global list.

Sent from my iPhone

On Jun 26, 2014, at 1:27 PM, Sean Cribbs notifications@github.com wrote:

Can you include an example of the erroneous advanced.config?

— Reply to this email directly or view it on GitHub.

seancribbs commented 10 years ago

Thanks @macintux, that's sufficient to know.

seancribbs commented 9 years ago

@macintux Please see if this suits your needs.

macintux commented 9 years ago

I am unenthused by the error messages, but it's definitely better than before.

The problem now is that the error message doesn't provide anything useful in some cases, and the debug option the command recommends doesn't help either.

E.g., removing the trailing period from the list:

15:07:47.191 [error] Error parsing /Users/John/github/Basho/cuttlefish-cribbs/riak/rel/riak/bin/../etc/advanced.config: 8: syntax error before:

Running riak config generate -l debug as recommended gives a boatload of unrelated information before spitting out the same error.

So definitely better, but would be nice if it were better yet.

seancribbs commented 9 years ago

@macintux Do you have specific ways the error messages could be improved in this case? I'd like this to land in 2.0.2.

macintux commented 9 years ago

syntax error at end of file would be better, missing period at end of list would be moar better, but I don't know how practical either of those are.

I'm fine with this being something we periodically improve (and thus can merge now).

seancribbs commented 9 years ago

This should have targeted 2.0. Closing.