FS#53028 - [consul] Version announcement

Attached to Project: Community Packages
Opened by Xavier D. (magicrhesus) - Monday, 20 February 2017, 10:02 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 20 April 2017, 15:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Fix version announcement and creation of directories


Additional info:
* package version(s): community/0.7.5-1
* config and/or log files etc.


Steps to reproduce:
Improved PKGBUILD :

# $Id: PKGBUILD 212506 2017-02-15 05:50:23Z felixonmars $
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=consul
pkgver=0.7.5
pkgrel=2
pkgdesc="A tool for service discovery, monitoring and configuration."
arch=('i686' 'x86_64')
url="https://www.consul.io"
license=('MPL')
depends=('glibc')
makedepends=('git' 'go')
source=("git+https://github.com/hashicorp/consul.git#tag=v$pkgver"
consul.service)
md5sums=('SKIP'
'dc6cbeefe9fa250d5961221f155cdf98')

prepare() {
cd consul

[ ! -d build ] && mkdir build
if [ ! -d .gopath/src/github.com/hashicorp/consul ]; then {
mkdir -p .gopath/src/github.com/hashicorp
ln -sf "$PWD" .gopath/src/github.com/hashicorp/consul
}
fi
export GOPATH="$PWD/.gopath"
sed -i "s/Version = \"unknown\"/Version = \"${pkgver}\"/g" version/version.go
sed -i "s/VersionPrerelease = \"unknown\"/VersionPrerelease = \"\"/g" version/version.go
}

build() {
cd consul

go get github.com/mitchellh/cli
go build -o build/consul # -gccgoflags "$CFLAGS $LDFLAGS"
}

package() {
cd consul

install -Dm755 build/consul "$pkgdir"/usr/bin/consul
install -Dm644 "$srcdir"/consul.service "$pkgdir"/usr/lib/systemd/system/consul.service
install -d "$pkgdir"/etc/consul.d
}
This task depends upon

Closed by  Felix Yan (felixonmars)
Thursday, 20 April 2017, 15:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.8.1-2
Comment by Yuji Hagiwara (yuuzi41) - Tuesday, 18 April 2017, 15:59 GMT
I think this issue is became to IMPORTANT problem in this package newer than v0.8.0.

When i tried to create cluster using consul v0.8.0 or v0.8.1, I got the log message such as below, and I couldn't bootstrapping.
2017/04/18 23:39:35 [WARN] memberlist: ignoring alive message for 'wgw1.dc': Member 'wgw1.dc' is not a server

As far as i know, this message means Consul failed to merge this node to alive nodes list,
https://github.com/hashicorp/memberlist/blob/master/state.go
because IsConsulServer function compares version between nodes posterior to v0.8.0.
https://github.com/hashicorp/consul/blob/v0.7.5/consul/agent/server.go
https://github.com/hashicorp/consul/blob/v0.8.0/consul/agent/server.go

Loading...