Upversion etcd to 3.3.15

3.3.15 is the default etcd used by kubernetes 1.16

Some patches from the old src rpm have been removed since
they are not compatible with the updated source tree, and
do not appear related to STX.

Change-Id: I6337a963d7b4af059ae445e4a4f11fb69efbe0a7
Story: 2005860
Task: 36701
Depends-On: https://review.opendev.org/#/c/684351
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-09-17 08:44:11 -05:00
parent c563674a43
commit a2bd894d1a
4 changed files with 3 additions and 94 deletions

View File

@ -1,4 +1,4 @@
VERSION=3.2.24
VERSION=3.3.15
TAR_NAME=etcd
TAR="$TAR_NAME-v$VERSION.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/*"

View File

@ -23,7 +23,7 @@
%global system_name etcd
Name: etcd
Version: 3.2.24
Version: 3.3.15
Release: 1%{?_tis_dist}.%{tis_patch_ver}
Summary: A highly-available key value store for shared configuration
License: ASL 2.0
@ -31,8 +31,6 @@ URL: https://%{provider_prefix}
Source0: %{name}-v%{version}.tar.gz
Source1: %{system_name}.service
Source2: %{system_name}.conf
Patch3: bz1350875-disaster-recovery-with-copies.patch
Patch4: expand-etcd-arch-validation.patch
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x}
@ -59,10 +57,7 @@ A highly-available key value store for shared configuration.
# move content of vendor under Godeps as has been so far
mkdir -p Godeps/_workspace/src
mv cmd/vendor/* Godeps/_workspace/src/.
%patch3 -p1
%patch4 -p1
mv vendor/* Godeps/_workspace/src/.
%build
mkdir -p src/github.com/coreos

View File

@ -1,56 +0,0 @@
From 7ad700a716c2122c3b6db6677a6f717919b88926 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Tue, 2 May 2017 09:56:02 +0200
Subject: [PATCH] bz1350875-disaster-recovery-with-copies:
---
etcdctl/ctlv2/command/backup_command.go | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/etcdctl/ctlv2/command/backup_command.go b/etcdctl/ctlv2/command/backup_command.go
index feda4b1..e77791f 100644
--- a/etcdctl/ctlv2/command/backup_command.go
+++ b/etcdctl/ctlv2/command/backup_command.go
@@ -18,6 +18,7 @@ import (
"fmt"
"log"
"path/filepath"
+ "strconv"
"time"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
@@ -40,6 +41,9 @@ 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 +103,19 @@ func handleBackup(c *cli.Context) error {
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 {
--
2.7.4

View File

@ -1,30 +0,0 @@
From b3e78645c1ffa84bcde511c90df4e3dde652c3fa Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Tue, 8 Aug 2017 15:01:04 +0200
Subject: [PATCH] expand etcd arch validation
---
etcdmain/etcd.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/etcdmain/etcd.go b/etcdmain/etcd.go
index 2f7f00d..61553d4 100644
--- a/etcdmain/etcd.go
+++ b/etcdmain/etcd.go
@@ -396,6 +396,13 @@ func checkSupportArch() {
if runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64le" {
return
}
+
+ if runtime.GOARCH == "arm64" || runtime.GOARCH == "s390x" {
+ plog.Warningf("Running etcd on %s architecture is experimental.", runtime.GOARCH)
+ plog.Warningf("Please report any bugs you encounter: https://bugzilla.redhat.com/")
+ return
+ }
+
if env, ok := os.LookupEnv("ETCD_UNSUPPORTED_ARCH"); ok && env == runtime.GOARCH {
plog.Warningf("running etcd on unsupported architecture %q since ETCD_UNSUPPORTED_ARCH is set", env)
return
--
2.7.5