Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Fix tikv config check failure on deploy (#1306) (#1307)
Browse files Browse the repository at this point in the history
Fix tikv config check failure on deploy due to wrong format of config template:
```
[TiKV1-1]: Ansible Failed! ==>
  changed=true
  cmd: cd /tmp/tidb_check_config && ./tikv-server --pd-endpoints pd:port --config ./tikv.toml --config-check
  delta: '0:00:00.524112'
  end: '2020-05-25 14:35:13.870777'
  msg: non-zero return code
  rc: 101
  start: '2020-05-25 14:35:13.346665'
  stderr: |-
    thread 'main' panicked at 'invalid auto generated configuration file ./tikv.toml, err missing field `type` for key `security.encryption.master-key`', /rustc/b2e36e6c2d229126b59e892c9147fbb68115d292/src/libstd/macros.rs:16:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  stderr_lines:
  - thread 'main' panicked at 'invalid auto generated configuration file ./tikv.toml, err missing field `type` for key `security.encryption.master-key`', /rustc/b2e36e6c2d229126b59e892c9147fbb68115d292/src/libstd/macros.rs:16:9
  - 'note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace'
  stdout: ''
  stdout_lines: <omitted>
``` 

The is because the `type` field of `[security.encryption.master-key]` is required if the table header presents.

Signed-off-by: Yi Wu <yiwu@pingcap.com>
  • Loading branch information
yiwu-arbug authored May 26, 2020
1 parent b9612c2 commit 47754f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions conf/tikv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,14 @@ security:
## type: "file"
## path: "/path/to/master/key/file"
##
master-key:
# type = "plaintext"
# master-key:
# type = "plaintext"

## Specifies the old master key when rotating master key. Same config format as master-key.
## The key is only access once during TiKV startup, after that TiKV do not need access to the key.
## And it is okay to leave the stale previous-master-key config after master key rotation.
previous-master-key:
# type: "plaintext"
# previous-master-key:
# type: "plaintext"

import:

Expand Down
8 changes: 4 additions & 4 deletions roles/tikv/vars/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,14 @@ security:
## type: "file"
## path: "/path/to/master/key/file"
##
master-key:
# type = "plaintext"
# master-key:
# type = "plaintext"

## Specifies the old master key when rotating master key. Same config format as master-key.
## The key is only access once during TiKV startup, after that TiKV do not need access to the key.
## And it is okay to leave the stale previous-master-key config after master key rotation.
previous-master-key:
# type: "plaintext"
# previous-master-key:
# type: "plaintext"

import:

Expand Down

0 comments on commit 47754f1

Please sign in to comment.