diff options
author | Ultrabug <ultrabug@gentoo.org> | 2019-11-27 10:18:35 +0100 |
---|---|---|
committer | Ultrabug <ultrabug@gentoo.org> | 2019-11-27 10:18:35 +0100 |
commit | 5625a61b213435a686663f50fbb3b7fac3a5da8c (patch) | |
tree | e082af66b1b3c0d0b2ec561802dbe80c985fb4e7 /dev-db/scylla | |
parent | dev-db/scylla: switch to yaml.safe_load (diff) | |
download | ultrabug-5625a61b213435a686663f50fbb3b7fac3a5da8c.tar.gz ultrabug-5625a61b213435a686663f50fbb3b7fac3a5da8c.tar.bz2 ultrabug-5625a61b213435a686663f50fbb3b7fac3a5da8c.zip |
dev-db/scylla: add patch to fix stuck repairs
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Manifest-Sign-Key: 34FCB257983BA23A8CEC5EB7EB9E6405C24BFAE5
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'dev-db/scylla')
-rw-r--r-- | dev-db/scylla/Manifest | 18 | ||||
-rw-r--r-- | dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch | 27 | ||||
-rw-r--r-- | dev-db/scylla/scylla-3.1.1-r1.ebuild | 252 |
3 files changed, 289 insertions, 8 deletions
diff --git a/dev-db/scylla/Manifest b/dev-db/scylla/Manifest index fc90b6a..09bf54f 100644 --- a/dev-db/scylla/Manifest +++ b/dev-db/scylla/Manifest @@ -10,6 +10,7 @@ AUX fix-fmt-3.5.0-compilation.patch 3785 BLAKE2B 3cd23ccffe1ec33d5f7e2c6c3583631 AUX scylla-server.confd 386 BLAKE2B e075e8f5cac2ac373a43a637a4080fde5cbd402b5bef2a3865980f3f9d123366315d994ebf9abbd749167db6e1fa9c840295171add7c5507120be70020aaefa1 SHA512 5d3c55933a02d3b16837013b37110f6669c14e01599532f30935b5dc29871a5bed897c9eb01a6e89469eab7d645c9231745a06c2ef827f6700e13c8faa9cdb87 AUX scylla-server.initd 962 BLAKE2B cbe13c8a03cb4d084e477dd449ff51355e886a31d70a8da1cf2a899b3f48c2c01680dd020d665c71497b1c6b2dadd38d417ea80389413b1e54ee622f207c37ce SHA512 b77473bba63e1fa9e83c0d0c9ba5cd7cc69920ada8b1a79de1a5bc609f797e870b7cd31af658cb11d84d019c905c78a4a0420173226163048ca6439ea2210a16 AUX scylla.sudoers 162 BLAKE2B 9aa0dce391da1f420a070d73d061452eeba60ad268f13a5bb8c0525d714d27dfa438efa9c6871c916b82ebf56f34c507826315de8b1fadc3d0eb5feae663cbcc SHA512 aabdeb3854eaad4b1cf9037a998cf94b8f55b2011e8f81a1778095b71806d89e217f2025e772c636569f833f7df45108e2e30c2c1e70fdb59acf37e6cdf81485 +AUX v1-0001-repair-Add-a-timer-for-repair-reader.patch 930 BLAKE2B f878c83a33fc56faa1735157266d2392987c5b9f93cb609b57b9554918fe48a35248d56a52d8e2cfd28b24c47a8ee7020711beee1b8b3bbcf0d549467beee00e SHA512 c4b9d725957ad847817ba2ea0ccd416cb79dddc06980554506903a965da35af0774ffd531ce69f3013e4904e2b6e6b1b66a12e073e19486b8be11b3e93a4502c DIST c-ares-fd6124c74da0801f23f9d324559d8b66fb83f533.tar.gz 1644001 BLAKE2B ee3f919dbb7de3f489a9027cf89b8db1dd36d9d5068e80f6e3851366c7a6fa532c67cf8ebf0d15e01b26a8ec5bb4e49e7844ec46b605f997fac1e961dcc436f1 SHA512 52b929e4d2615338d8ee4ce7c32f006f18e54ef2db9fbe2534c4e99cd3684d86661a6674d2659acb714592f439fac9c4f0ae6337d9d68c1ec3463d4d16572310 DIST fmt-f61e71ccb9ab253f6d76096b2d958caf38fcccaa.tar.gz 616708 BLAKE2B e71c4ff6d494490366e490307b83fb0619b29228e06650d3abb0a97797009cd6205c23af777a348622eb4c4a08203a0e41c5475ab95c437d0f0c382967e2491f SHA512 d234a58af428e238e559ceec1599ff449fbfbe4ecc212ed00c82ef3f057a3351a9eb59906d3b6f7efeec76188645a49376507d7a78dd68d61806cd63d0fbb3a0 DIST libdeflate-e7e54eab42d7fd3c684cfe8278084fc354a2455a.tar.gz 123934 BLAKE2B 430eba5f7f6b751d01964198d93ca3683c0131f41964b871c3c2872932f76f35d88dce4df1ac80b03f5719d618d0965097831fe8f12cb0bf0d8233129aad070b SHA512 7f63b71a2e29e6c5cbdb6d18c75122f2d54cc52e09cbce6694db9f76812c03757d1222c219bbd8a10a7d42ea2086d6641505b3385016345b2cb9b034848de1c7 @@ -27,20 +28,21 @@ EBUILD scylla-3.0.6.ebuild 9030 BLAKE2B a8ac0f6fef3c5b096a8df627c2bd3cb253742148 EBUILD scylla-3.0.8.ebuild 9111 BLAKE2B 565f5d1b42257afbfdf12ec729b7950b77b0f8d7bffb07960c4412e74223966ec368057236ee8fa75c8aee1bdc6f6fa6d06acb4d57a34ffedc2c8670a4178149 SHA512 477be22fcf71b9ec149aeb5b61b5419b3dd0cdb5b28e1d6c094f1acdd6b3aaa1c34b9b0d85bbd13feb9fd2d1b64ba8d90a7dda00b8cb1804f61eec1bdc73fd33 EBUILD scylla-3.0.9.ebuild 9218 BLAKE2B 0b2966a89c72872bebfd3dbe3bc6fea72257a40e269e812037f574491e5fa28f87b1838978251893e83cf207f6d19db63c4800783071a80d137f24cef6f72cde SHA512 1dbe1b9b4cc719c0241fd9f33f96dffbb2b3430963fc4b57e300059547d274dd3e6592db31bacc60cca783fbe862586c93efd58c8b3b6bbbb303864066d5be12 EBUILD scylla-3.1.0.ebuild 7051 BLAKE2B 282b4221655c0156d3a39f7245c8b6023a1f4352f864e51c720fbd7059435814a184743d5785a24c5b956f8201815e2ab3f211d261270f9754dc1cfc1605050b SHA512 b386d7394456070de65876c49f9976eaa487dfdf4f949555569d678396e6f18a655081c447681bce226bb8f59a5f1ee60e5e2390464e3d0bd21fd38125f8e244 +EBUILD scylla-3.1.1-r1.ebuild 7571 BLAKE2B 999faabaf0a6d2b8de9f555c0170288a1add0ac69d05afd3ab2b1976deb6e560e3046edede9caefcf56f38cd9995aa0e40f184ba14e15cec35b1f3ccf47e3b7c SHA512 fb6442b55e8152ed6c99f7473dd3b5075521f46e23d3124bfa01a13d6d134df872273c9eae207d96d09a7056f2496867c74deca37090c762c1af026708e55394 EBUILD scylla-3.1.1.ebuild 7505 BLAKE2B 1f3e068c6688c9f3a420102da25966a142dfd3be1f90d94c77c2d744274df4d0eaa82e4af1eeef53d7b6594d940f188263428befd018a4da9aa9ef0896f5799b SHA512 8769a7fd5f69038f958eddd38a70da8cdc76d606638422224394164be09b4b3c0f72c5aac807bcc199a3f56d05b1c3baf48d7dfd1523602b0aca00681fa8a0c4 EBUILD scylla-9999.ebuild 6833 BLAKE2B c21b0db85ca5b2dbe90a7523b739fa6614d40fd0264d8cd5bf77f1c1b37b31f1f042c946b76d5c1e74907badf931c188f7f5112105089658ff6acfc80f440021 SHA512 e5237eddd44fa0f4f88a6aa4bd2d6015dc6c61597636e03957ea932cce240de05533e223aae0abb68d37d16c7734e64267f2b77aedb3913c24b6b73210629972 MISC metadata.xml 249 BLAKE2B 40afa233e18ae5678e52194be8b1235d8deda4810e55b33ea192ded6b09a158f1bc941544f90a1b9e396db00bc0fe277c072d267568473ae4aa2dec8bc5c2f89 SHA512 6eae78a65db44c8f7ef2d20c10c8612cd2072c0204c6294798e4bf94f1283c684c22d1ad28e0f68e78e82a0c60526d6786492c9dacc438d83405218e51c1bf9c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQGTBAEBCAB9FiEEB7NG2KqNbQw8gqQ7Uf8j8ayXdy8FAl3NuypfFIAAAAAALgAo +iQGTBAEBCAB9FiEEB7NG2KqNbQw8gqQ7Uf8j8ayXdy8FAl3eP05fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDA3 QjM0NkQ4QUE4RDZEMEMzQzgyQTQzQjUxRkYyM0YxQUM5Nzc3MkYACgkQUf8j8ayX -dy/aAAf/a/dzZ+GfuC4GySBWeSZaXRIz6yTRX1/oI8rvUCiC90AEb55W9kMyYube -LXKxJ45NGV3+eyAhn3O5Oxoc+AFD+00gul8M+ycZBPnCK3ih4H1ERbare1+qR47X -VMr2KUxzbtZW6oXhNh6AsGJmcqauP9PYbVvZWP9SmRHKxKHyMeBNYiBv0G47tHkS -ne+CKeV0EzEYYJw/pB/P0kLM6ukI5qCPt7eFGorGmK6yUv3OR1bwNSOuiIMy1eol -59HMhWxizcVg5i0vhIRKlnbYapsjUMBFN0RzgZF4Wg9Acj2KGh2xsCJIzhrywFP8 -6OvFoExkxFpvllq/ElRUIQJqCXMTSw== -=2Gny +dy8fYQf+M4EfALAYpM5+f5gKxLKBz75DQllj/7cslhLYyUnnCUUO+p4N/B25vYmo ++EuQI/8DHePRcTb8VtD83uz9XWanzTc76oJbgIKiVdy6GVyGKdbwAd/1GRqFwWXc +5jjAkDulqLpp9xAxkwrYNJOCNBd8HiFr9VUHrNSBDPScxdk0xnK4YhPAp5NvpeY2 +kg4Foy0LgFPOtmu0QEZCpimZzgrWJpM4iHbC67DfjkcQ8fZIejFOxzUNvxpIWn9m +mM4jg343m0wsUulFzhHYzZeRypOHtOCV8b4FYRvuwlHeKgJVL9b2/DI3ILQclefG +cPFa7BncL1kB/4O9XSw2OSwR8h2Whw== +=t247 -----END PGP SIGNATURE----- diff --git a/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch b/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch new file mode 100644 index 0000000..f2cc16d --- /dev/null +++ b/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch @@ -0,0 +1,27 @@ +From 22af0a08b3fd7c9c29107095370f634d90f8afad Mon Sep 17 00:00:00 2001 +Message-Id: <22af0a08b3fd7c9c29107095370f634d90f8afad.1574845916.git.asias@scylladb.com> +From: Asias He <asias@scylladb.com> +Date: Wed, 27 Nov 2019 16:53:27 +0800 +Subject: [PATCH scylla v1] repair: Add a timer for repair reader +To: scylladb-dev@googlegroups.com + +--- + repair/row_level.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/repair/row_level.cc b/repair/row_level.cc +index ea0f7f2524..ec92c169b0 100644 +--- a/repair/row_level.cc ++++ b/repair/row_level.cc +@@ -339,7 +339,7 @@ using is_local_reader = bool_class<class is_local_reader_tag>; + public: + future<mutation_fragment_opt> + read_mutation_fragment() { +- return _reader(db::no_timeout); ++ return _reader(db::timeout_clock::now() + std::chrono::seconds(60 * 5)); + } + + lw_shared_ptr<const decorated_key_with_hash>& get_current_dk() { +-- +2.23.0 + diff --git a/dev-db/scylla/scylla-3.1.1-r1.ebuild b/dev-db/scylla/scylla-3.1.1-r1.ebuild new file mode 100644 index 0000000..7323dfc --- /dev/null +++ b/dev-db/scylla/scylla-3.1.1-r1.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_PV="${PV/_beta/}" +EGIT_CLONE_TYPE="mirror" +EGIT_COMMIT="scylla-${PV}" +EGIT_REPO_URI="https://github.com/scylladb/scylla.git" +inherit git-r3 + +PYTHON_COMPAT=( python3_{4,5,6} ) + +inherit autotools flag-o-matic linux-info python-r1 toolchain-funcs systemd user + +DESCRIPTION="NoSQL data store using the seastar framework, compatible with Apache Cassandra" +HOMEPAGE="http://scylladb.com/" + +KEYWORDS="~amd64" +LICENSE="AGPL-3" +SLOT="0" +IUSE="doc systemd" + +# NOTE: +# if you want to debug using backtraces, enable the 'splitdebug' FEATURE: +# https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces +# +# then check out: +# https://github.com/scylladb/scylla/wiki/How-to-resolve-backtrace + +RESTRICT="test" + +RDEPEND=" + >=dev-libs/thrift-0.11.0 + <dev-util/ragel-7.0 + <sys-apps/hwloc-2.0.0 + ~app-admin/scylla-jmx-${PV} + ~app-admin/scylla-tools-${PV} + >=virtual/jdk-1.8.0:* + app-arch/lz4 + app-arch/snappy + app-arch/zstd + dev-cpp/antlr-cpp:3.5 + dev-cpp/yaml-cpp + dev-java/antlr:3.5 + ~dev-libs/boost-1.65.0[icu] + dev-libs/crypto++ + dev-libs/jsoncpp + dev-libs/libaio + >=dev-libs/libfmt-3.2.1 + dev-libs/libxml2 + dev-libs/protobuf + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pystache[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + >=dev-python/pyyaml-5.1[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/urwid[${PYTHON_USEDEP}] + dev-util/systemtap + net-libs/gnutls + net-misc/lksctp-tools + sys-apps/ethtool + sys-fs/xfsprogs + sys-libs/libunwind + sys-libs/zlib + sys-process/numactl + x11-libs/libpciaccess + systemd? ( sys-apps/systemd ) +" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-3.5 + dev-util/ninja +" + +# Discussion about kernel configuration: +# https://groups.google.com/forum/#!topic/scylladb-dev/qJu2zrryv-s +CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE" +ERROR_NUMA_BALANCING="${PN} recommends support for Memory placement aware NUMA scheduler (NUMA_BALANCING)." +ERROR_SYN_COOKIES="${PN} recommends support for TCP syncookie (SYN_COOKIES)." +ERROR_TRANSPARENT_HUGEPAGE="${PN} recommends support for Transparent Hugepage (TRANSPARENT_HUGEPAGE)." + +# NOTE: maybe later depending on upstream energy, support DPDK +# For DPDK, removed HUGETLBFS PROC_PAGE_MONITOR UIO_PCI_GENERIC in favor of VFIO +# CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE ~VFIO" +# ERROR_VFIO="${PN} running with DPDK recommends support for Non-Privileged userspace driver framework (VFIO)." + +DOCS=( LICENSE.AGPL NOTICE.txt ORIGIN README.md README-DPDK.md ) +PATCHES=( + "${FILESDIR}/fix-fmt-3.5.0-compilation.patch" + "${FILESDIR}/3.1-thrift-support.patch" + "${FILESDIR}/v1-0001-repair-Add-a-timer-for-repair-reader.patch" +) + +pkg_setup() { + linux-info_pkg_setup + enewgroup scylla + enewuser scylla -1 -1 /var/lib/${PN} scylla +} + +src_prepare() { + default + + # set version + local git_commit=$(git log --pretty=format:'%h' -n 1) + echo "${PV}-${git_commit}" > version + + # fix jsoncpp detection + sed -e 's@json/json.h@jsoncpp/json/json.h@g' -i json.hh || die + + # QA: no -Werror (tho it does not propagate) + sed -e 's/\-Werror//g' -i configure.py || die + + # QA NOTE: respect -O3 as it is upstream recommended + # and because we would kill the RAM of the machine with lower optimization + # since some files can take up to 8GB of RAM to compile! + # sed -e 's/\-O3//g' -i configure.py || die + + # I don't agree with the old 4GB of RAM per job, it's more about 8GB now + sed -e 's/4000000000/8000000000/g' -i scripts/jobs || die + + # TODO: contribute me + # fix pyyaml vulnerability #659348 + # seastar/scripts/perftune.py + # dist/docker/redhat/scyllasetup.py + # dist/common/scripts/scylla_io_setup + # dist/common/scripts/scylla_fstrim + # dist/common/scripts/scylla_blocktune.py + # dist/common/scripts/scylla_util.py + # dist/common/scripts/scylla_config_get.py + find "${S}/dist" -type f -exec sed -e 's/yaml.load(/yaml.full_load(/g' -i {} \+ || die + sed -e 's/yaml.load(/yaml.safe_load(/g' -i seastar/scripts/perftune.py || die +} + +src_configure() { + python_setup + + # copied from dist/redhat/scylla.spec.mustache + # we want a package compiled with old kernel headers to + # support nowait aio if the user upgrades their kernel + if ! grep -qwr RWF_NOWAIT /usr/include/linux; then + append-cflags "-DRWF_NOWAIT=8" + fi + if ! grep -qwr aio_rw_flags /usr/include/linux; then + append-cflags "-Daio_rw_flags=aio_reserved1" + fi + + # native CPU CFLAGS are strongly enforced by upstreams, respect that + replace-cpu-flags "*" "native" + + append-cflags "-Wno-attributes -Wno-array-bounds" + + ${EPYTHON} configure.py --enable-gcc6-concepts --mode=release --with=scylla --disable-xen --c-compiler "$(tc-getCC)" --compiler "$(tc-getCXX)" --ldflags "${LDFLAGS}" --cflags "${CFLAGS}" --python ${EPYTHON} --with-antlr3 /usr/bin/antlr3.5 || die +} + +src_compile() { + # we use the provided 'scripts/jobs' to figure out how many parallel + # compilation jobs we can sustain + einfo "Compiling using $(scripts/jobs) jobs" + ninja -v build/release/scylla build/release/iotune -j$(scripts/jobs) || die +} + +src_install() { + # NOTE: + # I base myself on upstream's install.sh file + + default + + local MUSTACHE_DIST="\"debian\": true" + pystache dist/common/systemd/scylla-server.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-server.service + pystache dist/common/systemd/scylla-housekeeping-daily.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-housekeeping-daily.service + pystache dist/common/systemd/scylla-housekeeping-restart.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-housekeeping-restart.service + + insinto /etc/default + doins dist/common/sysconfig/scylla-server + + insinto /etc/security/limits.d + doins dist/common/limits.d/scylla.conf + + insinto /etc/scylla.d + doins dist/common/scylla.d/*.conf + + insinto /etc/sysctl.d + doins dist/common/sysctl.d/*.conf + + insinto /etc/scylla + for config_file in scylla.yaml cassandra-rackdc.properties; do + doins conf/${config_file} + done + + systemd_dounit build/*.service + systemd_dounit dist/common/systemd/*.service + systemd_dounit dist/common/systemd/*.timer + + exeinto /usr/lib/scylla + doexe dist/common/scripts/* + doexe seastar/scripts/* + doexe scylla-gdb.py + + dobin build/release/iotune + dobin build/release/scylla + + insinto /usr/lib/scylla + doins dist/common/scripts/scylla_blocktune.py + + exeinto /usr/lib/scylla + doexe dist/common/scripts/scylla-blocktune + doexe dist/common/scripts/scylla-housekeeping + + insinto /etc/scylla.d + doins conf/housekeeping.cfg + + newinitd "${FILESDIR}/scylla-server.initd" ${PN}-server + newconfd "${FILESDIR}/scylla-server.confd" ${PN}-server + + dodoc -r licenses + + for x in /var/lib/${PN} /var/lib/${PN}/{data,commitlog,hints,coredump} /var/lib/scylla-housekeeping /var/log/scylla; do + keepdir "${x}" + fowners scylla:scylla "${x}" + done + + insinto /usr/lib/scylla/swagger-ui + doins -r swagger-ui/dist + + insinto /usr/lib/scylla/api + doins -r api/api-doc + + insinto /usr/lib/scylla/scyllatop + doins -r tools/scyllatop/* + fperms +x /usr/lib/scylla/scyllatop/scyllatop.py + dosym /usr/lib/scylla/scyllatop/scyllatop.py /usr/sbin/scyllatop + + for util in $(ls dist/common/sbin/); do + dosym /usr/lib/scylla/${util} /usr/sbin/${util} + done + + insinto /etc/sudoers.d + newins "${FILESDIR}"/scylla.sudoers scylla + + insinto /etc/rsyslog.d + doins "${FILESDIR}/10-scylla.conf" +} + +pkg_postinst() { + elog "You should run 'emerge --config dev-db/scylla' to finalize your ScyllaDB installation." +} + +pkg_config() { + elog "Running 'scylla_setup'..." + scylla_setup +} |