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

*: build phony etcd server binary for unsupported architectures #4721

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

heyitsanthony
Copy link
Contributor

We don't qualify etcdserver for anything other than amd64, so don't
build binaries that are untested and might be unreliable.

@heyitsanthony
Copy link
Contributor Author

/cc @hongchaodeng @xiang90 @luxas

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build amd64
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: support arm64?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@heyitsanthony heyitsanthony force-pushed the build-scary-archs branch 2 times, most recently from b4b88ad to 89774e4 Compare March 8, 2016 20:51
@xiang90
Copy link
Contributor

xiang90 commented Mar 8, 2016

update https://github.com/coreos/etcd/blob/master/README.md#32-bit-systems to reflect that etcd will build but simply print out waring instead of starting?

@luxas
Copy link
Contributor

luxas commented Mar 8, 2016

Hey, please please check out #4715 first

@@ -30,5 +30,5 @@ import (
// silently ignore this flag. Please update your kernel to prevent this.
var boltOpenOptions = &bolt.Options{
MmapFlags: syscall.MAP_POPULATE,
InitialMmapSize: InitialMmapSize,
InitialMmapSize: int(InitialMmapSize),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will make etcd unreliable for amd64, and was the cause to the #4715 (comment) failure. If you merge this etcd won't work. See https://play.golang.org/p/3Slqmtf9JC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, that was not the reason for the test failure. I tested it with a 256MB mmap reservation and it still failed.

Likewise, go playground compiles with arch "amd64p32", which is why the ints are getting truncated. I tested on an amd64 arch and it gives the correct 64-bit value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you changing this anyway? AFAIU it worked fine on amd64 before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bolt.Options expects an int; declaring InitialMmapSize as int64 so that arm builds won't complain causes a type error without the int cast

@heyitsanthony
Copy link
Contributor Author

@luxas #4715 breaks darwin builds and does nothing about arm being unstable...

We don't qualify etcdserver for anything other than amd64, so don't
build binaries that are untested and might be unreliable.
@luxas
Copy link
Contributor

luxas commented Mar 8, 2016

@heyitsanthony #4715 doesn't break darwin,amd64. Have you seen the newest commit?

@heyitsanthony
Copy link
Contributor Author

@luxas OK, I see it's fine now. However, it's still emitting an unstable server binary for arm. Have you tried running the tests on an arm machine? I'm very uncomfortable putting that in mainline for a system that's meant to be reliable.

@hongchaodeng
Copy link
Contributor

LGTM.

IMHO this is a better solution to #4715. It fix the build while preventing unexpected use of 32 bit systems. Let's get this in as fast as possible.

@heyitsanthony
Copy link
Contributor Author

readme updated /cc @xiang90

@xiang90
Copy link
Contributor

xiang90 commented Mar 8, 2016

@luxas I think this is a good way to go. I do not think we should build a unusable/unreliable version of etcd.

For #4715, it is a separate issues. I do agree that is a step towards to make arm32 work.

LGTM

heyitsanthony pushed a commit that referenced this pull request Mar 8, 2016
*: build phony etcd server binary for unsupported architectures
@heyitsanthony heyitsanthony merged commit 6dd53ec into etcd-io:master Mar 8, 2016
@luxas
Copy link
Contributor

luxas commented Mar 8, 2016

Why aren't you writing out a really big warning that the binary isn't supported only? That's the way to go. Then you aren't shutting doors for the community. We all know you're not supporting it commercially. There are folks that use open source just for fun and hack on cheap ARM devices just because they can.

@heyitsanthony
Copy link
Contributor Author

@luxas Here's why: people ignore docs; a big warning won't do much since people already ignore the 32-bit support warning. Right now arm support is clearly broken even when the source is hacked to build it. I worry people will build broken systems with etcd with the mistaken impression that since it runs it must be fine (this actually happens). I believe this is a legitimate concern and somewhat reckless to disregard.

If you want an arm build of etcdserver, it's a two line change (maybe three?). Likewise, the client still builds fine; etcdserver can be hosted on amd64 nodes. Fully supporting etcd on arm would be great but it needs to be stable first; anything less seems rather irresponsible.

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.

4 participants