Closed Bob-The-Marauder closed 3 years ago
These console commands all get handled by relx (having previously been under the guise of nodetool). Whatever was handling json inputs no longer works in relx.
All the tests attach to the node to set bucket types, so this should still work via riak remote_console
:
(riak@127.0.0.1)1> riak_core_bucket_type:create(<<"maps">>, [{datatype, map}]).
(riak@127.0.0.1)2> riak_core_bucket_type:activate(<<"maps">>).
This is the best workaround for the moment. I don't know what's going to be involved in fixing the way relx scripts work to get all the old console commands going again.
I have a fix for this. I'll create a PR shortly.
https://github.com/basho/riak_kv/pull/1781 resolves the issue when no props are passed - a type is created with empty props
Fixed in Riak KV 3.0.2. Default bucket type behaviour updated to match 2.x.x from Riak KV 3.0.3
Expected behaviour - bucket type created, prompted to activate new type. Actual behaviour:
The props.json file is owned by the riak user and is as follows:
The inline example is copied from https://www.tiot.jp/riak-docs/riak/kv/2.2.6/using/reference/bucket-types/#bucket-types-and-the-allow-mult-setting and the props.json file used is copied directly from https://www.tiot.jp/riak-docs/riak/kv/2.2.6/using/reference/bucket-types/#bucket-type-example
Attempting to create a bucket type with no special properties i.e.
riak-admin bucket-type create namespace_bucket '{"props":{}}'
also returns "invalid json".I have tried with both the Yokozuna and non-Yokozuna packages for KV 3.0.1. I also tried with a devrel and got a different path for riak_kv_console.erl in the error that was specific to my devrel build.
Manual experimentation with the json format for the inline example either results in "invalid json" or the same error as when trying to create from a json file.
Non-bucket type creation seems to work fine e.g. taking the curl example from https://www.tiot.jp/riak-docs/riak/kv/2.2.6/developing/usage/creating-objects/#write-parameters gives: