Merge pull request #351 from marineam/fix-blank-data

Fix blank user-data, fix fleet, fix coretest
This commit is contained in:
Michael Marineau 2014-02-11 21:36:20 -08:00
commit 346c44fbdb
11 changed files with 43 additions and 38 deletions

View File

@ -34,5 +34,4 @@ src_install() {
dobin ${S}/bin/fleetctl
systemd_dounit "${FILESDIR}"/${PN}.service
systemd_enable_service multi-user.target ${PN}.service
}

View File

@ -10,7 +10,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~x86"
else
CROS_WORKON_COMMIT="7baa3e940b094accb7fb9ca344aafba69a13a732"
CROS_WORKON_COMMIT="69e8bc8b5d20007c933ac8095253e7d5e7bfbb2f"
KEYWORDS="amd64 arm x86"
fi

View File

@ -0,0 +1 @@
coretest-9999.ebuild

View File

@ -1,29 +0,0 @@
#
# $Header:$
#
EAPI=4
CROS_WORKON_COMMIT="000fa3a301fdfd04b3fe34e3a761285e5f7d12dd"
CROS_WORKON_PROJECT="coreos/coretest"
CROS_WORKON_LOCALNAME="coretest"
CROS_WORKON_REPO="git://github.com"
inherit cros-workon
DESCRIPTION="Sanity tests for CoreOS"
HOMEPAGE="https://github.com/coreos/coretest"
SRC_URI=""
LICENSE="APACHE"
SLOT="0"
KEYWORDS="amd64 arm x86"
IUSE=""
DEPEND=">=dev-lang/go-1.1"
src_compile() {
./build
}
src_install() {
dobin "${S}/${PN}"
}

View File

@ -0,0 +1,34 @@
# Copyright (c) 2014 The CoreOS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
CROS_WORKON_PROJECT="coreos/coretest"
CROS_WORKON_LOCALNAME="coretest"
CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~x86"
else
CROS_WORKON_COMMIT="daf0a79a981fd6912bad81978f15461f5e161f11"
KEYWORDS="amd64 arm x86"
fi
inherit cros-workon
DESCRIPTION="Sanity tests for CoreOS"
HOMEPAGE="https://github.com/coreos/coretest"
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
DEPEND=">=dev-lang/go-1.1"
src_compile() {
./build || die
}
src_install() {
dobin "${S}/${PN}"
}

View File

@ -18,7 +18,11 @@ BOOTSTRAP_PEERS="/var/run/etcd/bootstrap.config"
BOOTSTRAP_DISCO="/var/run/etcd/bootstrap.disco"
META_URL="http://169.254.169.254/latest"
MY_IP=$(curl -s $META_URL/meta-data/local-ipv4)
MY_IP=$(curl --fail -s $META_URL/meta-data/local-ipv4)
if [ $? -ne 0 ]; then
echo "Request to meta-data service failed" >&2
exit 1
fi
ARGS="${ARGS} -name ${MY_IP} -addr ${MY_IP}:4001 -peer-addr ${MY_IP}:7001 -peer-bind-addr 0.0.0.0"
@ -27,13 +31,10 @@ if [ -e $BOOTSTRAP_DISCO ]; then
ARGS="${ARGS} -discovery ${DISCOVERY_URL}"
elif [ -e $BOOTSTRAP_PEERS ]; then
IPS=$(grep -v $MY_IP $BOOTSTRAP_PEERS | grep -v '^\n$' | sed 's/$/:7001/'| tr '\n' ','| sed 's/^,//' | sed 's/,$//')
IPS=$(grep -v $MY_IP $BOOTSTRAP_PEERS | grep -v '^$' | sed 's/$/:7001/'| tr '\n' ','| sed 's/^,//' | sed 's/,$//')
if [ -n "$IPS" ]; then
ARGS="${ARGS} -C ${IPS}"
fi
else
echo "Could not find any bootstrap configuration"
exit 1
fi
exec /usr/bin/etcd $ARGS

View File

@ -1,6 +1,6 @@
[Unit]
Description=etcd
Wants=coreos-c10n.service
Requires=coreos-c10n.service
After=coreos-c10n.service
[Service]