Expected behaviour - bucket type created, prompted to activate new type.
Actual behaviour:
[root@localhost ~]# riak admin bucket-type create n_val_of_2 '{"props":{"n_val":2}}'
Cannot create bucket type n_val_of_2: invalid json
[root@localhost ~]# riak admin bucket-type create user_account_bucket '`cat /tmp/props.json`'
RPC to '[email protected]' failed: {'EXIT',
{function_clause,
[{riak_kv_console,bucket_type_create,
[["user_account_bucket","{","\"props\":",
"{","\"precommit\":",
"[\"syntax_check\"],","\"postcommit\":",
"[\"welcome_email\",",
"\"update_registry\"]","}","}"]],
[{file,
"/root/riak/rel/pkg/out/BUILD/riak-3.0.1/_build/default/lib/riak_kv/src/riak_kv_console.erl"},
{line,499}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,197}]}]}}
The props.json file is owned by the riak user and is as follows:
{
"props": {
"precommit": ["syntax_check"],
"postcommit": ["welcome_email", "update_registry"]
}
}
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:
[root@localhost ~]# curl -XPUT -H "Content-Type: text/plain" -d "vroom" http://localhost:8098/buckets/dodge/keys/viper?w=3
[root@localhost ~]# curl http://localhost:8098/buckets/dodge/keys/viper
vroom
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: