X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by lists.alpinelinux.org (Postfix) with ESMTP id E4E21F831B8 for ; Fri, 1 Mar 2019 11:31:02 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id z84so11902624wmg.4 for ; Fri, 01 Mar 2019 03:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garethwilliams.me.uk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NvzVYr0Z4JMIyIGTJtJRqULXADq0QC3vrJX3VmkvHzw=; b=1K2dZLFRtv3lUyfdiF2d7iWBzJXd8i6tXbArvMzl+UlIlLSIFmBhNTWXYZ7b88IEeQ /UmdSAuuV09r95OTTY+AhIkIhfsukxGEWxIh6apydeHM0x9lcemXfLGzS3x+vH0zEYFz sMtQ4WKDDfbZyfwJ6T/2n31X8IVjee2+Hk2JvSfcjeUnCEkrquF/PJcGGritSAQSJq3h LZxb+dtqCeSWBK7I1UnlGYxUFjH2JlWdXrthN4oONDF0kSm1hiBen1i7Ai8bP3QJkLKp 49ugfgFau1n0kf0eMpItWp8HeOseJ1YpxWqRUvJW5aexE6y9CgNU0PGsofrl7yVNq0bM yWKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NvzVYr0Z4JMIyIGTJtJRqULXADq0QC3vrJX3VmkvHzw=; b=Srm369g151KAtatC2kPTnurxeNWoBHOe+fg3rd8P4KkDbDE4aEN/0QZ2UG34RzZeyR Cdh1NU0TeIpL534Ly3myGP0Zx/posZsghhyrlt0bXWanBNiYQH4AnncCNu+1/0vVlfVu 1kDuozZePG+R2YhEhcdw8mXGHqoUeSgiz0Iw1akNdJuw5Yk/gWIQnjgz2vuZuqhbiVtk id907Dwi556MOisfmQKKDEcWgOy+O7x8t3wZsClulvuUykWXonas0Cz5TJUxTuzRHmwm jlvj89uE95UFEzkTBTdM+9ST0HsuxTgfuvWukeHgjLD91U7fQG9RYtq+WOiz23g2zk8J RT8A== X-Gm-Message-State: AHQUAua1ISu53Lvtt0aa5ZZG1BUHF8NJTOv0ElWebB/PFzjxTS75dnqT nO6e+NCswJLpSaA2ufsk78ZyYAcyd9WJxA== X-Google-Smtp-Source: AHgI3Ib7vVCO0RKYoHfEMWIZk8MP/mgsRw0cusW+NrfRweJ4YV6EsDtUabWsiwwcZo+HDUNqsVzB1g== X-Received: by 2002:a1c:6306:: with SMTP id x6mr3143564wmb.144.1551439861513; Fri, 01 Mar 2019 03:31:01 -0800 (PST) Received: from alpine-build.test (171.203.125.91.dyn.plus.net. [91.125.203.171]) by smtp.gmail.com with ESMTPSA id c2sm29083817wrt.93.2019.03.01.03.31.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 03:31:00 -0800 (PST) From: Gareth Williams To: alpine-aports@lists.alpinelinux.org Cc: Gareth Williams Subject: [alpine-aports] [PATCH] testing/etcd: fix inability to read config options Date: Fri, 1 Mar 2019 11:30:55 +0000 Message-Id: <20190301113055.15662-1-gareth@garethwilliams.me.uk> X-Mailer: git-send-email 2.20.1 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fixes bug #7161 Options in /etc/conf.d/etcd aren't passed to the daemon. This patch configures etcd to read options from a YAML file instead. --- testing/etcd/APKBUILD | 7 +- testing/etcd/etcd.confd | 242 +--------------------------------------- testing/etcd/etcd.initd | 3 +- 3 files changed, 9 insertions(+), 243 deletions(-) diff --git a/testing/etcd/APKBUILD b/testing/etcd/APKBUILD index 75d66735dd..9bcac08b0f 100644 --- a/testing/etcd/APKBUILD +++ b/testing/etcd/APKBUILD @@ -13,6 +13,7 @@ pkgusers="$pkgname" pkggroups="$pkgname" subpackages="$pkgname-doc $pkgname-ctl $pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/coreos/etcd/archive/v$pkgver.tar.gz + $pkgname.yaml::https://raw.githubusercontent.com/etcd-io/etcd/release-3.3/etcd.conf.yml.sample $pkgname.confd $pkgname.initd" builddir="$srcdir"/$pkgname-$pkgver @@ -35,6 +36,7 @@ package() { mkdir -p "$pkgdir"/var/lib/$pkgname chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/$pkgname install -Dm755 bin/etcd "$pkgdir"/usr/bin/etcd + install -Dm644 $srcdir/$pkgname.yaml "$pkgdir"/etc/etcd/conf.yml install -Dm644 $srcdir/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -Dm755 $srcdir/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE @@ -46,5 +48,6 @@ ctl() { } sha512sums="848e241e816312307f74520b99aeabf7def6862093897035ace16cb230817d8e2681d7d2f1c1ac220d7c2b4c7c0a1262bbe3e4db927524f785de888566d2097c etcd-3.3.10.tar.gz -440c9f23decb318c565a79d376b107dbd2333e72d5d812ec1460732543348737468b3e66e82e06a1afa0f09760c1eb066804a668a24e92a23977758727e049d2 etcd.confd -cee78d665c6449aceed2e12e13a461e614b7c71a4e4800c967bdfff0175e58aad1f8b0b186b8fa49ceffe315e5e68eccf24b8f3a3e3f805df8850f7e81b4ad12 etcd.initd" +1fd53fccc524ab07f2780039d8155ef66af7fb23e13783ac24ab47e7841f417ac98973e7e6eaa6424c4122a9a6826cb0e20f453e02492c789514f096f0243d87 etcd.yaml +bd385f6eddd88e7bef77470c5f19f1bea839c3cfcbb08679037d2d7d1f761249430d1eee70dab62ca00c5f2c361f5aa0b0b0435b02aba72c62cd9e06aacf8a7b etcd.confd +b86181b6dc4e9336c533086e80f88b28e7c3af2a9415a21cfde058ece11419e93f36664592f762785db3c64a41b79e1e372dc794d649927394b5644630d53cb5 etcd.initd" diff --git a/testing/etcd/etcd.confd b/testing/etcd/etcd.confd index c0c912261f..d1226be490 100644 --- a/testing/etcd/etcd.confd +++ b/testing/etcd/etcd.confd @@ -2,13 +2,9 @@ SVCNAME=etcd PIDPATH=/var/run/${SVCNAME} PIDFILE=${PIDPATH}/${SVCNAME}.pid LOGPATH=/var/log/${SVCNAME} -DATADIR=/var/lib/${SVCNAME} USER=$SVCNAME -# -# default: "default" -# -ETCD_NAME="default" +ETCD_CONFIG=/etc/etcd/conf.yml # Path to the data directory. # @@ -17,240 +13,8 @@ ETCD_NAME="default" # ETCD_DATA_DIR="/var/lib/etcd" -# Path to the dedicated wal directory. -# If this flag is set, etcd will write the WAL files -# to the walDir rather than the dataDir. +# Any additional command-line options # # default: "" # -# ETCD_WAL_DIR="" - -# Number of committed transactions to trigger a snapshot to disk. -# -# default: 10000 -# -# ETCD_SNAPSHOT_COUNT=10000 - -# Time (in milliseconds) of a heartbeat interval. -# -# default: 100 -# -# ETCD_HEARTBEAT_INTERVAL=100 - -# Time (in milliseconds) for an election to timeout. -# -# default: 1000 -# -# ETCD_ELECTION_TIMEOUT=1000 - -# List of URLs to listen on for peer traffic. -# -# default: "http://localhost:2380,http://localhost:7001" -# -# ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001" - -# List of URLs to listen on for client traffic. -# -# default: "http://localhost:2379,http://localhost:4001" -# -# ETCD_LISTEN_CLIENT_URLS="http://localhost:2379,http://localhost:4001" - -# Maximum number of snapshot files to retain (0 is unlimited) -# -# default: 5 -# -# ETCD_MAX_SNAPSHOTS=5 - -# Maximum number of wal files to retain (0 is unlimited) -# -# default: 5 -# -# ETCD_MAX_WALS=5 - -# Comma_separated white list of origins for CORS (cross_origin resource sharing). -# -# default: none -# -# ETCD_CORS= - -# List of this member's peer URLs to advertise to the rest of the cluster. -# These addresses are used for communicating etcd data around the cluster. -# At least one must be routable to all cluster members. -# -# default: "http://localhost:2380,http://localhost:7001" -# -# ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001" - -# Initial cluster configuration for bootstrapping. -# -# default: "default=http://localhost:2380,default=http://localhost:7001" -# distribution default: "default=http://localhost:2380,default=http://localhost:7001" -# -# ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001" - -# Initial cluster state ("new" or "existing"). -# Set to new for all members present during initial static or DNS bootstrapping. -# If this option is set to existing, etcd will attempt to join the existing cluster. -# If the wrong value is set, etcd will attempt to start but fail safely. -# -# default: "new" -# -# ETCD_INITIAL_CLUSTER_STATE="new" - -# Initial cluster token for the etcd cluster during bootstrap. -# -# default: "etcd_cluster" -# -# ETCD_INITIAL_CLUSTER_TOKEN="etcd_cluster" - -# List of this member's client URLs to advertise to the rest of the cluster. -# -# default: "http://localhost:2379,http://localhost:4001" -# -# ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001" - -# Discovery URL used to bootstrap the cluster. -# -# default: none -# -# ETCD_DISCOVERY= - -# DNS srv domain used to bootstrap the cluster. -# -# default: none -# -# ETCD_DISCOVERY_SRV= - -# Expected behavior ("exit" or "proxy") when discovery services fails. -# -# default: "proxy" -# -# ETCD_DISCOVERY_FALLBACK="proxy" - -# HTTP proxy to use for traffic to discovery service. -# -# default: none -# -# ETCD_DISCOVERY_PROXY= - -# Proxy mode setting ("off", "readonly" or "on"). -# -# default: "off" -# -# ETCD_PROXY="off" - -# Time (in milliseconds) an endpoint will be held -# in a failed state before being reconsidered for proxied requests. -# -# default: 5000 -# -# ETCD_PROXY_FAILURE_WAIT=5000 - -# Time (in milliseconds) of the endpoints refresh interval. -# -# default: 30000 -# -# ETCD_PROXY_REFRESH_INTERVAL=30000 - -# Time (in milliseconds) for a dial to timeout or 0 to disable the timeout. -# -# default: 1000 -# -# ETCD_PROXY_DIAL_TIMEOUT=1000 - -# Time (in milliseconds) for a write to timeout or 0 to disable the timeout. -# -# default: 5000 -# -# ETCD_PROXY_WRITE_TIMEOUT=5000 - -# Time (in milliseconds) for a read to timeout or 0 to disable the timeout. -# Don't change this value if you use watches because they are using long polling requests. -# -# default: 0 -# -# ETCD_PROXY_READ_TIMEOUT=0 - -# Path to the client server TLS CA file. -# -# default: none -# -# ETCD_CA_FILE= - -# Path to the client server TLS cert file. -# -# default: none -# -# ETCD_CERT_FILE= - -# Path to the client server TLS key file. -# -# default: none -# -# ETCD_KEY_FILE= - -# Enable client cert authentication. -# -# default: false -# -# ETCD_CLIENT_CERT_AUTH=false - -# Path to the client server TLS trusted CA key file. -# -# default: none -# -# ETCD_TRUSTED_CA_FILE= - -# [DEPRECATED] Path to the peer server TLS CA file. -# -# default: none -# -# ETCD_PEER_CA_FILE= - -# Path to the peer server TLS cert file. -# -# default: none -# -# ETCD_PEER_CERT_FILE= - -# Path to the peer server TLS key file. -# -# default: none -# -# ETCD_PEER_KEY_FILE= - -# Enable peer client cert authentication. -# -# default: false -# -# ETCD_PEER_CLIENT_CERT_AUTH=false - -# Path to the peer server TLS trusted CA file. -# -# default: none -# -# ETCD_PEER_TRUSTED_CA_FILE= - -# Drop the default log level to DEBUG for all subpackages. -# -# default: false (INFO for all packages) -# -# ETCD_DEBUG=false - -# Set individual etcd subpackages to specific log levels. -# An example being etcdserver=WARNING,security=DEBUG -# -# default: none (INFO for all packages) -# -# ETCD_LOG_PACKAGE_LEVELS= - -# Force to create a new one_member cluster. -# It commits configuration changes in force to remove all existing members in the cluster and add itself. -# It needs to be set to restore a backup. -# -# default: false -# -# ETCD_FORCE_NEW_CLUSTER=false - -# vim:ft=sh: - +#ETCD_OPTS="" diff --git a/testing/etcd/etcd.initd b/testing/etcd/etcd.initd index 2383c88c9b..14c687967c 100644 --- a/testing/etcd/etcd.initd +++ b/testing/etcd/etcd.initd @@ -22,7 +22,7 @@ start() { --background \ --make-pidfile \ --exec /usr/bin/etcd -- \ - --name=$ETCD_NAME \ + --config-file=$ETCD_CONFIG \ --data-dir="$ETCD_DATA_DIR" \ $ETCD_OPTS eend $? "Failed to start $SVCNAME" @@ -34,4 +34,3 @@ stop() { eend $? "Failed to stop $SVCNAME" rm -f "$PIDFILE" } - -- 2.20.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---