Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix self-signed-cert-validity parameter cannot be specified in the co… #13237

Merged
merged 2 commits into from
Jul 28, 2021

Conversation

tangcong
Copy link
Contributor

Fix issue #13235

@rafariossaa
Copy link

Hi,
Do you have any estimation on when this is going to be merged and a in which version ?.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm Thanks @tangcong
This should be mention in the Changelog, and also backported to 3.5.0.

@tangcong
Copy link
Contributor Author

@spzala CHANGELOG has been updated. After pr is merged, I will cherry-pick it to release-3.5 branch. thanks.

@spzala
Copy link
Member

spzala commented Jul 28, 2021

@spzala CHANGELOG has been updated. After pr is merged, I will cherry-pick it to release-3.5 branch. thanks.

@tangcong awesome, thank you! I just approved CI and will merge once it done running.

@@ -125,6 +125,9 @@ peer-transport-security:
# Peer TLS using generated certificates.
auto-tls: false

# The validity period of the self-signed certificate, the unit is year.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tangcong glad you didn't forget this :) thanks!

Copy link
Contributor Author

@tangcong tangcong Jul 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. It can guide users how to set a reasonable expiration time, such as this issue. We'd better also update the document.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, agree. For etcd.io, I will create an issue/work on clean sweep with all new flags. Thanks!

@tangcong
Copy link
Contributor Author

Hi,
Do you have any estimation on when this is going to be merged and a in which version ?.

In etcd 3.5.0 version, you can specify parameters(etcd --self-signed-cert-validity 5) to bypass this problem.

@spzala spzala merged commit 9182a3c into etcd-io:main Jul 28, 2021
@rafariossaa
Copy link

@tangcong Many thanks !

@rafariossaa
Copy link

Hi, @tangcong
The workaround you indicated is not working for me:

#  /opt/bitnami/etcd/bin/etcd --config-file /opt/bitnami/etcd/conf/etcd.conf.yml --self-signed-cert-validity 5
{"level":"info","ts":"2021-08-03T09:02:08.732Z","caller":"etcdmain/config.go:337","msg":"loaded server configuration, other configuration command line flags and environment variables will be ignored if provided","path":"/opt/bitnami/etcd/conf/etcd.conf.yml"}
{"level":"info","ts":"2021-08-03T09:02:08.733Z","caller":"etcdmain/etcd.go:72","msg":"Running: ","args":["/opt/bitnami/etcd/bin/etcd","--config-file","/opt/bitnami/etcd/conf/etcd.conf.yml","--self-signed-cert-validity","5"]}
{"level":"info","ts":"2021-08-03T09:02:08.733Z","caller":"etcdmain/etcd.go:93","msg":"detected default host for advertise","host":"10.10.101.183"}
{"level":"info","ts":"2021-08-03T09:02:08.733Z","caller":"etcdmain/etcd.go:115","msg":"server has been already initialized","data-dir":"/opt/bitnami/etcd/data","dir-type":"member"}
{"level":"info","ts":"2021-08-03T09:02:08.733Z","caller":"embed/etcd.go:131","msg":"configuring peer listeners","listen-peer-urls":["http://localhost:2380"]}
{"level":"warn","ts":"2021-08-03T09:02:08.733Z","caller":"transport/listener.go:189","msg":"cannot generate cert","error":"selfSignedCertValidity is invalid,it should be greater than 0"}
{"level":"fatal","ts":"2021-08-03T09:02:08.733Z","caller":"embed/etcd.go:475","msg":"failed to get peer self-signed certs","error":"selfSignedCertValidity is invalid,it should be greater than 0","stacktrace":"go.etcd.io/etcd/server/v3/embed.configurePeerListeners\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/embed/etcd.go:475\ngo.etcd.io/etcd/server/v3/embed.StartEtcd\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/embed/etcd.go:135\ngo.etcd.io/etcd/server/v3/etcdmain.startEtcd\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/etcdmain/etcd.go:227\ngo.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/etcdmain/etcd.go:122\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/etcdmain/main.go:40\nmain.main\n\t/tmp/etcd-release-3.5.0/etcd/release/etcd/server/main.go:32\nruntime.main\n\t/home/remote/sbatsche/.gvm/gos/go1.16.3/src/runtime/proc.go:225"}

Not sure if there is something I am missing something.

hexfusion added a commit that referenced this pull request Aug 6, 2021
#13237-origin-release-3.5

[backport 3.5]: Automated cherry pick of #13145 #13237
@petersutty
Copy link

for the moment (on 3.5.0) in etcd.conf you need to use selfSignedCertValidity: 1
instead of self-signed-cert-validity: 1

@rafariossaa
Copy link

Thanks, I will try and I will come back to share my result.

@rafariossaa
Copy link

Hi,
Just to let you know that this worked for me.
Thanks !!

hasbro17 pushed a commit to hasbro17/etcd that referenced this pull request Feb 2, 2022
…of-#13145-etcd-io#13237-origin-release-3.5

[backport 3.5]: Automated cherry pick of etcd-io#13145 etcd-io#13237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants