Compare commits

...

19 Commits

Author SHA1 Message Date
Shlomi Livne
5c1da98145 release: prepare for 2.0.5
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2018-05-24 14:28:23 +03:00
Shlomi Livne
50f831c7ce release: prepare for 2.0.4
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2018-04-23 09:12:22 +03:00
Amnon Heiman
182fd10927 FailureDetector: check that states is not null before use
When a node is part of a cluster but is down (like in the situation where
a cluster is taken down and up again but not all nodes are up). There is
no application_state information for that node.

This patch check that the information exists before using it to prevent
null pointer exception.

After this patch, a call to nodetool gossipinfo would return the
available information without failing.

See scylladb/scylla#3330

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20180329115345.29357-1-amnon@scylladb.com>
(cherry picked from commit 4e4589ba6f)
2018-03-29 15:25:16 +03:00
Shlomi Livne
2f097c510e release: prepare for 2.0.3
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2018-02-08 18:12:49 +02:00
Shlomi Livne
65da215b8d release: prepare for 2.0.2
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-11-30 21:02:09 +02:00
Shlomi Livne
0c1cadd317 release: prepare for 2.0.1
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-11-10 16:39:09 +02:00
Shlomi Livne
e9c546af13 release: prepare for 2.0.0
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-09-29 21:12:46 +03:00
Shlomi Livne
c21ca954e0 release: prepare for 2.0.rc5
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-09-17 17:05:19 +03:00
Shlomi Livne
1f5ec0183d release: prepare for 2.0.rc4
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-09-03 14:58:20 +03:00
Shlomi Livne
511ecbf85a release: prepare for 2.0.rc3
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-08-28 14:56:52 +03:00
Shlomi Livne
fdfca8e7ad release: prepare for 2.0.rc2
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-08-15 15:53:11 +03:00
Takuya ASADA
da30975df9 dist/debian: append postfix '~DISTRIBUTION' to scylla package version
We are moving to aptly to release .deb packages, that requires debian repository
structure changes.
After the change, we will share 'pool' directory between distributions.
However, our .deb package name on specific release is exactly same between
distributions, so we have file name confliction.
To avoid the problem, we need to append distribution name on package version.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1502351777-11559-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit 631605eff1)
2017-08-10 11:39:34 +03:00
Avi Kivity
19762be495 Merge "make sure mock config is always sane" from Glauber
"This patchset makes sure that we provide a mock configuration file and won't rely
on defaults that might not work for us"

* 'ourmock' of http://github.com/glommer/scylla-jmx:
  default to our in-tree mock config when building on CentOS
  provide mock configuration file

(cherry picked from commit eb4dc47ba9)
2017-07-31 17:46:43 +03:00
Shlomi Livne
3451d25c84 release: prepare for 2.0.rc1
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-07-23 09:46:06 +03:00
Takuya ASADA
81a951f867 dist/debian: use correct variable to detect distribution version
Since we switched to pbuilder and supported cross build, we no longer able to
use $DISTRIBUTION and $RELEASE in the script.
Use $TARGET instead.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1500540534-27951-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit 81b0d12dfe)
2017-07-20 12:01:05 +03:00
Takuya ASADA
3cf9dab680 dist/debian: add more versions of Debian/Ubuntu releases
This will add Debian 9(stretch) support, and also non-official support of
Debian testing/unstable and Ubuntu non-LTS versions.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1500501275-8419-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit 8c32e4f8a4)
2017-07-20 10:33:03 +03:00
Takuya ASADA
d1aa0db3a1 dist/debian: no need to rm -rf non-existent file
This line copied from scylla-tools-java, and conf/hotspot_compiler does not
exist on scylla-jmx, so drop the entry.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497902645-29487-1-git-send-email-syuu@scylladb.com>
(cherry picked from commit 2b33ce558d)
2017-07-20 10:33:01 +03:00
Takuya ASADA
81c8900eb9 dist/debian: append 'scylla-jmx' prefix to pbuilder tgz and directories
We want to allocate pbuilder chroot image and build directories for each
scylla repository to make sure build environment is always clean.

So append 'scylla-jmx' prefix for them.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1497902645-29487-2-git-send-email-syuu@scylladb.com>
(cherry picked from commit 9147faed36)
2017-07-20 10:32:58 +03:00
Shlomi Livne
de7bc9284f release: prepare for 2.0.rc0
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2017-06-27 12:39:45 +03:00
6 changed files with 94 additions and 18 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
VERSION=666.development
VERSION=2.0.5
if test -f version
then

View File

@ -48,7 +48,7 @@ if [ "$(arch)" != "x86_64" ]; then
fi
if [ -e debian ] || [ -e build/release ]; then
rm -rf debian build conf/hotspot_compiler
rm -rf debian build
mkdir build
fi
if is_debian_variant; then
@ -100,12 +100,12 @@ cp dist/debian/rules.in debian/rules
sed -i -e "s/@@VERSION@@/$SCYLLA_VERSION/g" debian/changelog
sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" debian/changelog
sed -i -e "s/@@CODENAME@@/$TARGET/g" debian/changelog
if [ "$DISTRIBUTION" = "Ubuntu" ]; then
sed -i -e "s/@@REVISION@@/0ubuntu1/g" debian/changelog
if [ "$TARGET" = "trusty" ] || [ "$TARGET" = "xenial" ] || [ "$TARGET" = "yakkety" ] || [ "$TARGET" = "zesty" ] || [ "$TARGET" = "artful" ]; then
sed -i -e "s/@@REVISION@@/0ubuntu1~$TARGET/g" debian/changelog
else
sed -i -e "s/@@REVISION@@/1/g" debian/changelog
sed -i -e "s/@@REVISION@@/1~$TARGET/g" debian/changelog
fi
if [ "$RELEASE" = "14.04" ]; then
if [ "$TARGET" = "trusty" ]; then
sed -i -e "s/@@DH_INSTALLINIT@@/--upstart-only/g" debian/rules
else
sed -i -e "s/@@DH_INSTALLINIT@@//g" debian/rules
@ -114,7 +114,7 @@ cp dist/common/systemd/scylla-jmx.service.in debian/scylla-jmx.service
sed -i -e "s#@@SYSCONFDIR@@#/etc/default#g" debian/scylla-jmx.service
cp ./dist/debian/pbuilderrc ~/.pbuilderrc
sudo rm -fv /var/cache/pbuilder/$TARGET-base.tgz
sudo rm -fv /var/cache/pbuilder/scylla-jmx-$TARGET.tgz
sudo -E DIST=$TARGET /usr/sbin/pbuilder clean
sudo -E DIST=$TARGET /usr/sbin/pbuilder create
sudo -E DIST=$TARGET /usr/sbin/pbuilder update

View File

@ -1,23 +1,25 @@
USENETWORK=yes
BUILD_HOME=/tmp
BASETGZ="/var/cache/pbuilder/$DIST-base.tgz"
BASETGZ="/var/cache/pbuilder/scylla-jmx-$DIST.tgz"
DISTRIBUTION="$DIST"
BUILDRESULT="/var/cache/pbuilder/$DIST/result/"
APTCACHE="/var/cache/pbuilder/$DIST/aptcache/"
BUILDRESULT="/var/cache/pbuilder/scylla-jmx-$DIST/result/"
APTCACHE="/var/cache/pbuilder/scylla-jmx-$DIST/aptcache/"
ALLOWUNTRUSTED=yes
if [ "$DIST" = "trusty" ] || [ "$DIST" = "xenial" ]; then
if [ "$DIST" = "trusty" ] || [ "$DIST" = "xenial" ] || [ "$DIST" = "yakkety" ] || [ "$DIST" = "zesty" ] || [ "$DIST" = "artful" ]; then
MIRRORSITE="http://archive.ubuntu.com/ubuntu/"
COMPONENTS="main restricted universe multiverse"
DEBOOTSTRAPOPTS="--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg"
if [ "$DIST" = "trusty" ]; then
OTHERMIRROR="deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main"
fi
elif [ "$DIST" = "jessie" ]; then
MIRRORSITE="http://ftp.us.debian.org/debian/"
elif [ "$DIST" = "jessie" ] || [ "$DIST" = "stretch" ] || [ "$DIST" = "buster" ] || [ "$DIST" = "sid" ]; then
MIRRORSITE="http://deb.debian.org/debian/"
COMPONENTS="main contrib non-free"
DEBOOTSTRAPOPTS="--keyring=/usr/share/keyrings/debian-archive-keyring.gpg"
if [ "$DIST" = "jessie" ]; then
OTHERMIRROR="deb http://httpredir.debian.org/debian jessie-backports main"
fi
else
echo "Unknown distribution: $DIST"
exit 1

View File

@ -43,7 +43,7 @@ if [ "$(arch)" != "x86_64" ]; then
fi
if [ -z "$TARGET" ]; then
if [ "$ID" = "centos" -o "$ID" = "rhel" ] && [ "$VERSION_ID" = "7" ]; then
TARGET=epel-7-x86_64
TARGET=./dist/redhat/mock/scylla-jmx-epel-7-x86_64.cfg
elif [ "$ID" = "fedora" ]; then
TARGET=$ID-$VERSION_ID-x86_64
else

View File

@ -0,0 +1,72 @@
config_opts['root'] = 'epel-7-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
config_opts['rpmbuild_networking'] = True
config_opts['yum.conf'] = """
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
mdpolicy=group:primary
best=1
# repos
[base]
name=BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7
gpgcheck=1
[updates]
name=updates
enabled=1
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7
gpgcheck=1
[epel]
name=epel
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=x86_64
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[extras]
name=extras
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7
gpgcheck=1
[testing]
name=epel-testing
enabled=0
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel7&arch=x86_64
failovermethod=priority
[local]
name=local
baseurl=https://kojipkgs.fedoraproject.org/repos/epel7-build/latest/x86_64/
cost=2000
enabled=0
[epel-debuginfo]
name=epel-debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-7&arch=x86_64
failovermethod=priority
enabled=0
"""

View File

@ -105,10 +105,12 @@ public class FailureDetector extends APIMBean implements FailureDetectorMBean {
ep.setAliave(obj.getBoolean("is_alive"));
ep.setUpdateTimestamp(obj.getJsonNumber("update_time").longValue());
JsonArray states = obj.getJsonArray("application_state");
if (states != null) {
for (int j = 0; j < states.size(); j++) {
JsonObject state = states.getJsonObject(j);
ep.addApplicationState(state.getInt("application_state"), state.getString("value"));
}
}
res.put(obj.getString("addrs"), ep);
}
return res;