From 48d39e77ee07f0fcad55bb88fea6dbb74ec6ab8a Mon Sep 17 00:00:00 2001 From: Kazuhiro Suzuki Date: Tue, 9 Jun 2015 18:15:35 +0900 Subject: [PATCH 1/4] Fix missing syslog items in config --- rel/files/riak_cs.schema | 23 +++++++++++++++++++++++ test/riak_cs_config_test.erl | 12 ++++++++++++ 2 files changed, 35 insertions(+) diff --git a/rel/files/riak_cs.schema b/rel/files/riak_cs.schema index 62ff672be..c863a4495 100644 --- a/rel/files/riak_cs.schema +++ b/rel/files/riak_cs.schema @@ -411,6 +411,29 @@ {datatype, flag} ]}. +%% @doc When set to 'on', enables log output to syslog. +{mapping, "log.syslog.ident", "lager.handlers", [ + {default, "riak-cs"}, + hidden +]}. + +%% @doc Syslog facility to log entries from Riak CS. +{mapping, "log.syslog.facility", "lager.handlers", [ + {default, daemon}, + {datatype, {enum,[kern, user, mail, daemon, auth, syslog, + lpr, news, uucp, clock, authpriv, ftp, + cron, local0, local1, local2, local3, + local4, local5, local6, local7]}}, + hidden +]}. + +%% @doc The severity level at which to log entries to syslog, default is 'info'. +{mapping, "log.syslog.level", "lager.handlers", [ + {default, info}, + {datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency, none]}}, + hidden +]}. + {translation, "lager.handlers", fun(Conf) -> diff --git a/test/riak_cs_config_test.erl b/test/riak_cs_config_test.erl index 5930538d5..e659c0151 100644 --- a/test/riak_cs_config_test.erl +++ b/test/riak_cs_config_test.erl @@ -96,6 +96,18 @@ gc_interval_infinity_test() -> cuttlefish_unit:assert_config(Config, "riak_cs.gc_interval", infinity), ok. +lager_syslog_test() -> + SchemaFiles = ["../rel/files/riak_cs.schema"], + {ok, Context} = file:consult("../rel/vars.config"), + Conf = [{["log", "syslog"], on}, + {["log", "syslog", "ident"], "ident-test"}, + {["log", "syslog", "facility"], local7}, + {["log", "syslog", "level"], debug} + ], + Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + cuttlefish_unit:assert_config(Config, "lager.handlers.lager_syslog_backend", ["ident-test", local7, debug]), + ok. + max_buckets_per_user_test() -> SchemaFiles = ["../rel/files/riak_cs.schema"], {ok, Context} = file:consult("../rel/vars.config"), From 733b5574010bbe6b968d8eeb8f42431a35848527 Mon Sep 17 00:00:00 2001 From: Kazuhiro Suzuki Date: Tue, 9 Jun 2015 19:02:32 +0900 Subject: [PATCH 2/4] Refactoring config test. Conflicts: test/riak_cs_config_test.erl --- test/riak_cs_config_test.erl | 47 ++++++++++++++---------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/test/riak_cs_config_test.erl b/test/riak_cs_config_test.erl index e659c0151..4cc254405 100644 --- a/test/riak_cs_config_test.erl +++ b/test/riak_cs_config_test.erl @@ -4,9 +4,7 @@ -include_lib("eunit/include/eunit.hrl"). default_config_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, [], Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), [], context()), cuttlefish_unit:assert_config(Config, "riak_cs.listener", {"127.0.0.1", 8080}), cuttlefish_unit:assert_config(Config, "riak_cs.riak_host", {"127.0.0.1", 8087}), cuttlefish_unit:assert_config(Config, "riak_cs.stanchion_host", {"127.0.0.1", 8085}), @@ -50,90 +48,74 @@ default_config_test() -> ok. modules_config_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Rewrite = riak_cs_oos_rewrite, Auth = riak_cs_keystone_auth, Conf = [{["rewrite_module"], Rewrite}, {["auth_module"], Auth}], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "riak_cs.rewrite_module", Rewrite), cuttlefish_unit:assert_config(Config, "riak_cs.auth_module", Auth), ok. ssl_config_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Conf = [{["ssl", "certfile"], "path/certfile"}, {["ssl", "keyfile"], "path/keyfile"}], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "riak_cs.ssl", [{keyfile, "path/keyfile"}, {certfile, "path/certfile"}]), ok. admin_ip_config_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Conf = [{["admin", "listener"], "0.0.0.0:9999"}], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "riak_cs.admin_listener", {"0.0.0.0", 9999}), ok. storage_schedule_config_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Conf = [{["stats", "storage", "schedule", "1"], "00:00"}, {["stats", "storage", "schedule", "2"], "19:45"}], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "riak_cs.storage_schedule", ["00:00", "19:45"]), ok. gc_interval_infinity_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Conf = [{["gc", "interval"], infinity}], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "riak_cs.gc_interval", infinity), ok. lager_syslog_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), Conf = [{["log", "syslog"], on}, {["log", "syslog", "ident"], "ident-test"}, {["log", "syslog", "facility"], local7}, {["log", "syslog", "level"], debug} ], - Config = cuttlefish_unit:generate_templated_config(SchemaFiles, Conf, Context), + Config = cuttlefish_unit:generate_templated_config(schema_files(), Conf, context()), cuttlefish_unit:assert_config(Config, "lager.handlers.lager_syslog_backend", ["ident-test", local7, debug]), ok. max_buckets_per_user_test() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), DefConf = [{["max_buckets_per_user"], "100"}], - DefConfig = cuttlefish_unit:generate_templated_config(SchemaFiles, DefConf, Context), + DefConfig = cuttlefish_unit:generate_templated_config(schema_files(), DefConf, context()), cuttlefish_unit:assert_config(DefConfig, "riak_cs.max_buckets_per_user", 100), UnlimitedConf = [{["max_buckets_per_user"], "unlimited"}], - UnlimitedConfig = cuttlefish_unit:generate_templated_config(SchemaFiles, UnlimitedConf, Context), + UnlimitedConfig = cuttlefish_unit:generate_templated_config(schema_files(), UnlimitedConf, context()), cuttlefish_unit:assert_config(UnlimitedConfig, "riak_cs.max_buckets_per_user", unlimited), ?assert(1000 < unlimited), NoConf = [], - NoConfig = cuttlefish_unit:generate_templated_config(SchemaFiles, NoConf, Context), + NoConfig = cuttlefish_unit:generate_templated_config(schema_files(), NoConf, context()), cuttlefish_unit:assert_config(NoConfig, "riak_cs.max_buckets_per_user", 100), ok. wm_log_config_test_() -> {setup, fun() -> - SchemaFiles = ["../rel/files/riak_cs.schema"], - {ok, Context} = file:consult("../rel/vars.config"), AssertAlog = fun(Conf, Expected) -> Config = cuttlefish_unit:generate_templated_config( - SchemaFiles, Conf, Context), + schema_files(), Conf, context()), case Expected of no_alog -> cuttlefish_unit:assert_config( @@ -164,3 +146,10 @@ wm_log_config_test_() -> no_alog))} ] end}. + +schema_files() -> + ["../rel/files/riak_cs.schema"]. + +context() -> + {ok, Context} = file:consult("../rel/vars.config"), + Context. From acaf2f790f4628dffea954ebd7a65b7294d01727 Mon Sep 17 00:00:00 2001 From: Shunichi Shinohara Date: Fri, 26 Jun 2015 15:29:06 +0900 Subject: [PATCH 3/4] Translate release note of 2.0.1 --- RELEASE-NOTES.ja.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/RELEASE-NOTES.ja.md b/RELEASE-NOTES.ja.md index c88b76d33..9f1e29ff5 100644 --- a/RELEASE-NOTES.ja.md +++ b/RELEASE-NOTES.ja.md @@ -1,3 +1,33 @@ +# Riak CS 2.0.1 リリースノート + +## General Information +これは Riak CS 2.0.x 系のバグフィックスリリースです。 + +## バグ修正 + +* Fix config item `gc.interval` not working when `infinity` is set ([#1125](https://github.com/basho/riak_cs/issues/1125)/[PR#1126](https://github.com/basho/riak_cs/pull/1126)). +* 設定項目 `gc.interval` に対して `infinity` を設定できないバグを修正 + ([#1125](https://github.com/basho/riak_cs/issues/1125) + / [PR#1126](https://github.com/basho/riak_cs/pull/1126)). +* Add `log.access` switch to disable access logging ([#1109](https://github.com/basho/riak_cs/issues/1109)/[PR#1115](https://github.com/basho/riak_cs/pull/1115)). +* アクセスログを無効化する設定項目 `log.access` を追加 + ([#1109](https://github.com/basho/riak_cs/issues/1109) + / [PR#1115](https://github.com/basho/riak_cs/pull/1115)). +* Add missing riak-cs.conf items:` max_buckets_per_user` and `gc.batch_size` ([#1109](https://github.com/basho/riak_cs/issues/1109)/[PR#1115](https://github.com/basho/riak_cs/pull/1115)). +* `riak-cs.conf` に不足していた項目 ` max_buckets_per_user` と `gc.batch_size` を追加 + ([#1109](https://github.com/basho/riak_cs/issues/1109) + / [PR#1115](https://github.com/basho/riak_cs/pull/1115)) +* Fix bugs around subsequent space characters for Delete Multiple Objects API and user administration API with XML content ([#1129](https://github.com/basho/riak_cs/issues/1129)/[PR#1135](https://github.com/basho/riak_cs/pull/1135)). +* XML を HTTP ボディに持つ Delete Multiple Object API とユーザ管理 API において + 連続する空白文字処理のバグを修正 + ([#1129](https://github.com/basho/riak_cs/issues/1129) + /[PR#1135](https://github.com/basho/riak_cs/pull/1135)) +* Fix URL path resource and query parameters to work in AWS v4 header authentication. Previously, `+` was being input instead of `%20` for blank spaces. ([PR#1141](https://github.com/basho/riak_cs/pull/1141)) +* AWS v4 ヘッダ認証での URL パスリソースとクエリパラメータのバグを修正。以前の + バージョンでは空白文字に対して `%20` ではなく `+` が使用されていた。 + ([PR#1141](https://github.com/basho/riak_cs/pull/1141)) + + # Riak CS 2.0.0 リリースノート ## 概要 From ea5c9a09e77b6d0993e67484f6c57fe6ceb44eda Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Mon, 29 Jun 2015 10:34:20 +0900 Subject: [PATCH 4/4] Remove original text --- RELEASE-NOTES.ja.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/RELEASE-NOTES.ja.md b/RELEASE-NOTES.ja.md index 9f1e29ff5..f11b245d6 100644 --- a/RELEASE-NOTES.ja.md +++ b/RELEASE-NOTES.ja.md @@ -1,28 +1,23 @@ # Riak CS 2.0.1 リリースノート ## General Information -これは Riak CS 2.0.x 系のバグフィックスリリースです。 +これはバグフィックスリリースです。 ## バグ修正 -* Fix config item `gc.interval` not working when `infinity` is set ([#1125](https://github.com/basho/riak_cs/issues/1125)/[PR#1126](https://github.com/basho/riak_cs/pull/1126)). * 設定項目 `gc.interval` に対して `infinity` を設定できないバグを修正 ([#1125](https://github.com/basho/riak_cs/issues/1125) / [PR#1126](https://github.com/basho/riak_cs/pull/1126)). -* Add `log.access` switch to disable access logging ([#1109](https://github.com/basho/riak_cs/issues/1109)/[PR#1115](https://github.com/basho/riak_cs/pull/1115)). * アクセスログを無効化する設定項目 `log.access` を追加 ([#1109](https://github.com/basho/riak_cs/issues/1109) / [PR#1115](https://github.com/basho/riak_cs/pull/1115)). -* Add missing riak-cs.conf items:` max_buckets_per_user` and `gc.batch_size` ([#1109](https://github.com/basho/riak_cs/issues/1109)/[PR#1115](https://github.com/basho/riak_cs/pull/1115)). * `riak-cs.conf` に不足していた項目 ` max_buckets_per_user` と `gc.batch_size` を追加 ([#1109](https://github.com/basho/riak_cs/issues/1109) / [PR#1115](https://github.com/basho/riak_cs/pull/1115)) -* Fix bugs around subsequent space characters for Delete Multiple Objects API and user administration API with XML content ([#1129](https://github.com/basho/riak_cs/issues/1129)/[PR#1135](https://github.com/basho/riak_cs/pull/1135)). * XML を HTTP ボディに持つ Delete Multiple Object API とユーザ管理 API において 連続する空白文字処理のバグを修正 ([#1129](https://github.com/basho/riak_cs/issues/1129) /[PR#1135](https://github.com/basho/riak_cs/pull/1135)) -* Fix URL path resource and query parameters to work in AWS v4 header authentication. Previously, `+` was being input instead of `%20` for blank spaces. ([PR#1141](https://github.com/basho/riak_cs/pull/1141)) * AWS v4 ヘッダ認証での URL パスリソースとクエリパラメータのバグを修正。以前の バージョンでは空白文字に対して `%20` ではなく `+` が使用されていた。 ([PR#1141](https://github.com/basho/riak_cs/pull/1141))