From 7987994fa49ac6b216f093f4f60115bac19b4c2b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 15 2016 07:37:09 +0000 Subject: import etcd-2.3.7-4.el7 --- diff --git a/SOURCES/bz1350875-disaster-recovery-with-copies.patch b/SOURCES/bz1350875-disaster-recovery-with-copies.patch new file mode 100644 index 0000000..7615046 --- /dev/null +++ b/SOURCES/bz1350875-disaster-recovery-with-copies.patch @@ -0,0 +1,41 @@ +--- etcd-2.3.7/etcdctl/command/backup_command.go.orig 2016-08-01 17:43:46.149281982 +0200 ++++ etcd-2.3.7/etcdctl/command/backup_command.go 2016-08-01 17:43:47.988279830 +0200 +@@ -19,6 +19,7 @@ import ( + "log" + "os" + "path" ++ "strconv" + "time" + + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli" +@@ -40,6 +41,8 @@ func NewBackupCommand() cli.Command { + cli.StringFlag{Name: "wal-dir", Value: "", Usage: "Path to the etcd wal dir"}, + cli.StringFlag{Name: "backup-dir", Value: "", Usage: "Path to the backup dir"}, + cli.StringFlag{Name: "backup-wal-dir", Value: "", Usage: "Path to the backup wal dir"}, ++ cli.BoolFlag{Name: "keep-cluster-id", Usage: "Do not rewrite the cluster id"}, ++ cli.StringFlag{Name: "node-id", Value: "", Usage: "Use custom node id instead of a random value"}, + }, + Action: handleBackup, + } +@@ -99,8 +102,19 @@ func handleBackup(c *cli.Context) { + var metadata etcdserverpb.Metadata + pbutil.MustUnmarshal(&metadata, wmetadata) + idgen := idutil.NewGenerator(0, time.Now()) +- metadata.NodeID = idgen.Next() +- metadata.ClusterID = idgen.Next() ++ explicitNodeId := c.String("node-id") ++ if explicitNodeId != "" { ++ metadata.NodeID, err = strconv.ParseUint(explicitNodeId, 16, 64) ++ if err != nil { ++ log.Fatal(err) ++ } ++ } else { ++ metadata.NodeID = idgen.Next() ++ } ++ keepClusterId := c.Bool("keep-cluster-id") ++ if !keepClusterId { ++ metadata.ClusterID = idgen.Next() ++ } + + neww, err := wal.Create(destWAL, pbutil.MustMarshal(&metadata)) + if err != nil { diff --git a/SOURCES/etcd.conf b/SOURCES/etcd.conf index 324a4ee..d2d2285 100644 --- a/SOURCES/etcd.conf +++ b/SOURCES/etcd.conf @@ -46,3 +46,6 @@ ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379" #ETCD_DEBUG="false" # examples for -log-package-levels etcdserver=WARNING,security=DEBUG #ETCD_LOG_PACKAGE_LEVELS="" +# +#[profiling] +#ETCD_ENABLE_PPROF="false" diff --git a/SPECS/etcd.spec b/SPECS/etcd.spec index 3bf1515..a9579f7 100644 --- a/SPECS/etcd.spec +++ b/SPECS/etcd.spec @@ -21,7 +21,7 @@ Name: %{repo} Version: 2.3.7 -Release: 2%{?dist} +Release: 4%{?dist} Summary: A highly-available key value store for shared configuration License: ASL 2.0 URL: https://%{provider_prefix} @@ -31,9 +31,10 @@ Source2: %{name}.conf Patch1: set-etcd-advertise-client-urls-if-needed.patch Patch2: bump-tls-version-to-1.2.patch +Patch3: bz1350875-disaster-recovery-with-copies.patch ExclusiveArch: x86_64 -BuildRequires: golang >= 1.2.1-3 +BuildRequires: golang >= 1.5 %if ! 0%{?with_bundled} BuildRequires: golang(github.com/bgentry/speakeasy) @@ -199,6 +200,7 @@ find . -name "*.go" \ %endif %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build # Make link for etcd itself @@ -353,6 +355,16 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/ %endif %changelog +* Mon Aug 15 2016 jchaloup - 2.3.7-4 +- Add --keep-cluster-id and --node-id to 'etcdctl backup' + resolves: #1350875 + +* Tue Jul 19 2016 jchaloup - 2.3.7-3 +- Bump minimal build-time golang version + resolves: #1357774 +- Add missing enable-pprof flag env into etcd.conf + resolves: #1357820 + * Mon Jul 18 2016 jchaloup - 2.3.7-2 - Bump tls version to 1.2 resolves: #1357621