-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcd 3.4.0 won't start with name flag override when environment ETCD_NAME is available. #11111
Comments
My understanding is that the new behavior is to prevent potential user error. It is highlighted in the changelog as breaking change: https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.4.md#breaking-changes For more context: #9382, #8380 cc @gyuho |
@jingyih is right.
etcd does not set any environmental variable. You have to find out where |
ETCD_NAME is being set to this on one instance 189cc9c436df446abc589ece1bc5bb01 by default when loaded through ignition spec and to f066cbe511bf425b9879de728cf7b28c on another. So it looks like some kind of random string generation. It seems ETCD_NAME defaults to the machine id when using the RKT wrapper which is in the unit file generated by the ignition spec.
|
In stand-alone mode, the configuration file has not changed. Upgrading from version 3.3.15 to 3.4.0 or 3.4.1 has failed, and can not start. I don't know how to handle it.
It was my mistake, to refer to the document etcd-configuration The startup command changed |
i have the same problem with
i do not set any system enviroment variable |
i tryd the version 3.2,and it is ok |
Any suggested workaround to use the hostname as etcd_name?? I tried setting ETCD_NAME environment variable but using one env var to set another doesn't seem to work:
I tried using systemd var %H but its returning localhost instead, probably because hostname is not set yet |
I encountered a similar problem and solved it. etcd 3.4 will exit on shadowed environment variables So, flag and environment cannot coexist. error example:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
I have a similar problem:
or
It show the following error: and i found a variables in my /etc/profile files aoubt "ETCDCTL_ENDPOINTS",when i unset variables in "/etc/profile" file, It becomes normal。 Is there can't use flag in command to overwrite variables ? Or there have other way to resolv this question? |
@saltbo Hello, saltbo。 you have ensure that flag and environment cannot coexist Right? |
Yes. @allenjol |
@saltbo Thank you very much! |
I use CoreOS container linux and ignition files to boot a cluster.
A snip of a Jinja2 yaml which gets transpiled to Container linux config looks like this:
Since 3.4.0 it seems I can't override with the --name flag. Because somewhere on a fresh container linux system it defaults an ETCD_NAME environment variable which now prevents starting up the RKT etcd 3.4.0 process. I'm not sure where this ETCD_NAME environment variable comes from because I didn't set it anywhere. It seems the behaviour between 3.4.0 and 3.3.15 with name override has changed.
A small demo with docker explains the override issue I'm seeing with RKT too.
In etcd 3.3.15 it worked fine:
In etcd 3.4.0 the process stops.
It would be great if etcd 3.4.0 name override would behave just like 3.3.15 if that is still possible.
Other tips and tricks where I can find the conflicting ETCD_NAME environment variable would be great. I could add another dropin in the ignition files where I set the ETCD_NAME explicitly basicly overriding it again but I prefer not too.
Regards,
Patrick
The text was updated successfully, but these errors were encountered: