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

*: add "--unsupported-arch" flag to remove confusing error message #9089

Closed
wants to merge 6 commits into from

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Jan 4, 2018

Fix #9077.

The confusing warning disappears with this.

@gyuho gyuho requested a review from xiang90 January 4, 2018 00:09
@gyuho gyuho added the WIP label Jan 4, 2018
@gyuho gyuho force-pushed the flag-error branch 3 times, most recently from a237048 to 814da31 Compare January 4, 2018 02:30
@gyuho gyuho added WIP and removed WIP labels Jan 4, 2018
@gyuho gyuho force-pushed the flag-error branch 2 times, most recently from 321dc7c to 2a1fb13 Compare January 4, 2018 05:45
@gyuho gyuho removed the WIP label Jan 4, 2018
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho gyuho changed the title *: add "--unsupported-arch" flag and remove confusing error message *: add "--unsupported-arch" flag to remove confusing error message Jan 4, 2018
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@a7d387c). Click here to learn what that means.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #9089   +/-   ##
=========================================
  Coverage          ?   75.96%           
=========================================
  Files             ?      359           
  Lines             ?    29953           
  Branches          ?        0           
=========================================
  Hits              ?    22754           
  Misses            ?     5608           
  Partials          ?     1591
Impacted Files Coverage Δ
etcdmain/etcd.go 50.67% <ø> (ø)
etcdmain/main.go 59.09% <ø> (ø)
etcdmain/config.go 81.5% <100%> (ø)
embed/config.go 62.54% <37.5%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7d387c...a0ebe8b. Read the comment docs.

return cfg.Validate()
}

func (cfg *Config) Validate() error {
// TODO qualify arm64
goArch := runtime.GOARCH
Copy link
Contributor

Choose a reason for hiding this comment

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

still keep this in a func?

@@ -32,7 +32,7 @@ For etcd to officially support a new platform as stable, a few requirements are

etcd has known issues on 32-bit systems due to a bug in the Go runtime. See the [Go issue][go-issue] and [atomic package][go-atomic] for more information.

To avoid inadvertently running a possibly unstable etcd server, `etcd` on unstable or unsupported architectures will print a warning message and immediately exit if the environment variable `ETCD_UNSUPPORTED_ARCH` is not set to the target architecture.
To avoid inadvertently running a possibly unstable etcd server, `etcd` on unstable or unsupported architectures will print a warning message and immediately exit if flag `--unsupported-arch` or environment variable `ETCD_UNSUPPORTED_ARCH` is not set to the target architecture.
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no flag for this feature since we do not really want to promote the usage of running etcd on unsupported platform, and do not want to make it a feature flag. env is much more easier to deprecated for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then should we just have special handling for ETCD_UNSUPPORTED_ARCH? Otherwise, we will keep warning

pkg/flags: unrecognized environment variable ETCD_UNSUPPORTED_ARCH=arm64

Copy link
Contributor

Choose a reason for hiding this comment

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

yes possiblely.

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.

3 participants