Skip to content

Commit 6c71f7e

Browse files
MB-61292: Move logs and audit deks to config dir
It is always normal to remove logs and audit folder. It is very easy to remove the deks folder with them, and ideally it should also be ok, but is not that easy to handle key removal properly in this case (we don't know if it is a hard error that we can't read the key or it is ok, and we should ignore it). It seems to be much easier to move deks to config dir and assume that all deks should always be present instead of assumming that some deks can suddenly disappear at any moment Change-Id: I9232038202e167284c344e4dbf8a2b9e5e227c09 Reviewed-on: https://review.couchbase.org/c/ns_server/+/221169 Reviewed-by: Navdeep S Boparai <[email protected]> Tested-by: Timofey Barmin <[email protected]> Well-Formed: Build Bot <[email protected]>
1 parent 4d051bf commit 6c71f7e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

apps/ns_babysitter/src/cb_gosecrets_runner.erl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,18 +690,15 @@ key_path(bucketDek, Cfg) ->
690690

691691
defaults() ->
692692
ConfigDir = path_config:component_path(data, "config"),
693-
%% Note: when it is invoked from dump-guts, error_logger_mf_dir is not set
694-
LogDir = application:get_env(ns_server, error_logger_mf_dir, undefined),
695693
[{es_password_env, "CB_MASTER_PASSWORD"},
696694
{es_password_source, env},
697695
{es_encrypt_key, true},
698696
{es_key_path_type, auto},
699697
{es_key_storage_type, 'file'},
700698
{kek_path, iolist_to_binary(filename:join(ConfigDir, "keks"))},
701699
{config_dek_path, iolist_to_binary(filename:join(ConfigDir, "deks"))},
702-
{audit_dek_path, iolist_to_binary(filename:join(LogDir, "audit_deks"))},
703-
{log_dek_path,
704-
iolist_to_binary(filename:join([LogDir, "deks"]))}].
700+
{audit_dek_path, iolist_to_binary(filename:join(ConfigDir, "audit_deks"))},
701+
{log_dek_path, iolist_to_binary(filename:join(ConfigDir, "logs_deks"))}].
705702

706703
format_error({write_failed, CfgPath, Error}) ->
707704
io_lib:format("Could not write file '~s': ~s (~p)",

0 commit comments

Comments
 (0)