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

Doc: update etcd configuration detail with config file #9066

Merged
merged 1 commit into from
Dec 25, 2017

Conversation

spzala
Copy link
Member

@spzala spzala commented Dec 24, 2017

Add a reference of the config file, sample file link and precedence detail to the
configuration doc.

Fixes #9063

Contributing guidelines

Please read our contribution workflow before submitting a pull request.

@spzala
Copy link
Member Author

spzala commented Dec 24, 2017

/cc @gyuho @xiang90
Since the config file itself is used through a command line flag, I didn't create a new section but tried to add detail in the current sections on configuration flags. Thanks!

@xiang90
Copy link
Contributor

xiang90 commented Dec 24, 2017 via email

@spzala
Copy link
Member Author

spzala commented Dec 24, 2017

@xiang90 it seems like configuration.md is the doc which has all the flags usage and syntax documented that can be used in the config file.

@spzala
Copy link
Member Author

spzala commented Dec 24, 2017

@xiang90 I have tried modifying a line to show the relationship/mapping between file and flags as "A reusable configuration file is a YAML file made of one or more command-line flags...." if that look good? Thanks!


A reusable configuration file is a YAML file made of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed.

Options set on the command line take precedence over those from the environment. If a configuration file is provided, other command line flags will be ignored.
Copy link
Contributor

Choose a reason for hiding this comment

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

If a configuration file is provided, will env also be ignored? or they will be overwritten?

Copy link
Member Author

@spzala spzala Dec 25, 2017

Choose a reason for hiding this comment

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

@xiang90 env variables/other flags will be ignored in that case. I ran something like etcd --config-file etcd.conf.yml.sample --data-dir /tmp and I see that --data-dir was ignored. @gyuho please correct me if wrong :-) Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

can we clarify that here too besides other command line flags will be ignored?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

Copy link
Contributor

Choose a reason for hiding this comment

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

probably we should also add some logging in etcd itself saying config file is provided, xxx are ignored.

Copy link
Contributor

Choose a reason for hiding this comment

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

no need to be in this PR though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, both suggestions makes sense!

Copy link
Member Author

Choose a reason for hiding this comment

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

I have created second commit with your suggestions related to ignoring flags. Thanks!

@@ -2,9 +2,10 @@

etcd is configurable through a configuration file, various command-line flags, and environment variables.

A reusable configuration file is a YAML file made of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed.
A reusable configuration file is a YAML file made with name and value of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed.

Options set on the command line take precedence over those from the environment. If a configuration file is provided, other command line flags will be ignored.
Copy link
Contributor

Choose a reason for hiding this comment

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

If a configuration file is provided, other command line flags will be ignored.

->

If a configuration file is provided, other command line flags and env variables will be ignored.

@xiang90
Copy link
Contributor

xiang90 commented Dec 25, 2017

LGTM after add env variable clarification, and squash the commits into one. Thanks!

@spzala spzala force-pushed the etcdconfig branch 2 times, most recently from 8e86d9a to 253d1d4 Compare December 25, 2017 01:58
Add a reference, sample file link and precedence detail etc. to the
configuration doc.
@spzala
Copy link
Member Author

spzala commented Dec 25, 2017

@xiang90 sorry, squashing was messed up so I had to push few times to fix it but I hope it looks good now. Thanks!

@xiang90
Copy link
Contributor

xiang90 commented Dec 25, 2017 via email

@spzala
Copy link
Member Author

spzala commented Dec 25, 2017

@xiang90 thanks!! Merry Christmas.

@xiang90 xiang90 merged commit 5e78da1 into etcd-io:master Dec 25, 2017
spzala added a commit to spzala/etcd that referenced this pull request Dec 27, 2017
Adding information that when config file is used other command line flags
and env variables will be ignored. This changes are a follow up of a
disucssion under PR,
etcd-io#9066
@spzala spzala deleted the etcdconfig branch September 13, 2019 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants