mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: build phony etcd server binary for unsupported architectures
We don't qualify etcdserver for anything other than amd64, so don't build binaries that are untested and might be unreliable.
This commit is contained in:
parent
570775fe61
commit
5f304b4dee
@ -134,6 +134,9 @@ The `v2` API responses should not change after the 2.0.0 release but new feature
|
||||
|
||||
etcd has known issues on 32-bit systems due to a bug in the Go runtime. See #[358][358] for more information.
|
||||
|
||||
To avoid inadvertantly producing an unstable etcd server, 32-bit builds emit an `etcd` that prints
|
||||
a warning message and immediately exits.
|
||||
|
||||
[358]: https://github.com/coreos/etcd/issues/358
|
||||
|
||||
### License
|
||||
|
@ -12,6 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// TODO: support arm64
|
||||
// +build amd64
|
||||
|
||||
package etcdmain
|
||||
|
||||
import (
|
||||
|
31
etcdmain/etcd_phony.go
Normal file
31
etcdmain/etcd_phony.go
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2016 CoreOS, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build !amd64
|
||||
|
||||
package etcdmain
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/coreos/pkg/capnslog"
|
||||
)
|
||||
|
||||
var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdmain")
|
||||
|
||||
func Main() {
|
||||
fmt.Println("unsupported architecture; unreliable, unstable")
|
||||
os.Exit(-1)
|
||||
}
|
@ -38,7 +38,7 @@ var (
|
||||
// InitialMmapSize is the initial size of the mmapped region. Setting this larger than
|
||||
// the potential max db size can prevent writer from blocking reader.
|
||||
// This only works for linux.
|
||||
InitialMmapSize = 10 * 1024 * 1024 * 1024
|
||||
InitialMmapSize = int64(10 * 1024 * 1024 * 1024)
|
||||
)
|
||||
|
||||
type Backend interface {
|
||||
|
@ -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),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user