Skip to content

data-key-rotation-period doesn't accept duration in days. #3987

Closed
@dveeden

Description

Bug Report

data-key-rotation-period doesn't accept duration in days.

https://docs.pingcap.com/tidb/stable/encryption-at-rest sets this to 7d or TiKV. However doing the same for PD doesn't work.

What did you do?

Set this in the PD config:

[security.encryption]
data-encryption-method = aes256-ctr
data-key-rotation-period = 1d

What did you expect to see?

PD starting with encryption enabled

What did you see instead?

[2021/08/13 11:53:03.625 +02:00] [FATAL] [main.go:58] ["parse cmd flags error"] [error="time: unknown unit \"d\" in duration \"1d\""] [errorVerbose="time: unknown unit \"d\" in duration \"1d\"\ngithub.com/tikv/pd/pkg/typeutil.(*Duration).UnmarshalText\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/pkg/typeutil/duration.go:57\ngithub.com/BurntSushi/toml.(*MetaData).unifyText\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:464\ngithub.com/BurntSushi/toml.(*MetaData).unify\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:183\ngithub.com/BurntSushi/toml.(*MetaData).unifyStruct\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:265\ngithub.com/BurntSushi/toml.(*MetaData).unify\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:209\ngithub.com/BurntSushi/toml.(*MetaData).unifyStruct\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:265\ngithub.com/BurntSushi/toml.(*MetaData).unify\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:209\ngithub.com/BurntSushi/toml.(*MetaData).unifyStruct\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:265\ngithub.com/BurntSushi/toml.(*MetaData).unify\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:209\ngithub.com/BurntSushi/toml.Decode\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:123\ngithub.com/BurntSushi/toml.DecodeFile\n\t/nfs/cache/mod/github.com/!burnt!sushi/toml@v0.3.1/decode.go:133\ngithub.com/tikv/pd/server/config.(*Config).configFromFile\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/server/config/config.go:621\ngithub.com/tikv/pd/server/config.(*Config).Parse\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/server/config/config.go:378\nmain.main\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:44\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\ngithub.com/tikv/pd/server/config.(*Config).configFromFile\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/server/config/config.go:622\ngithub.com/tikv/pd/server/config.(*Config).Parse\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/server/config/config.go:378\nmain.main\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:44\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371"] [stack="main.main\n\t/home/jenkins/agent/workspace/build_pd_multi_branch_master/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225"]

What version of PD are you using (pd-server -V)?

Release Version: v5.2.0-alpha-74-g87f41e43
Edition: Community
Git Commit Hash: 87f41e43d50fca3e4ae9d0fbe7a54928d7cd9fff
Git Branch: master
UTC Build Time:  2021-08-12 04:33:23

Related:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions