Commit Graph

166 Commits

Author SHA1 Message Date
Avi Kivity
6fdc8f28a9 Update tools/jmx submodule
* tools/jmx 45e4f28...25bcd76 (1):
  > install.sh: stop using symlinks for systemd units on nonroot mode

Fixes #7288.
2020-09-29 13:32:45 +03:00
Pekka Enberg
068b1e3470 Update tools/python3 submodule
* tools/python3 b4e52ee...cfa27b3 (1):
  > build: support passing product-version-release as a parameter
2020-09-28 10:53:11 +03:00
Avi Kivity
d45df0c705 Update tools/java submodule
* tools/java 583fc658df...4313155ab6 (1):
  > enable gettraceprobability
2020-09-24 12:19:29 +03:00
Pekka Enberg
bc13e596fe Update tools/java submodule
* tools/java d0cfef38d2...583fc658df (1):
  > build: support passing product-version-release as a parameter
2020-09-23 12:58:34 +03:00
Pekka Enberg
b0447f3245 Update tools/jmx submodule
* tools/jmx 6795a22...45e4f28 (1):
  > build: support passing product-version-release as a parameter
2020-09-23 12:58:30 +03:00
Pekka Enberg
ea8e545e4e Update tools/java submodule
* tools/java 2e2c056c07...d0cfef38d2 (1):
  > sstableloader: Support range boundary tombstones
2020-09-22 10:18:01 +02:00
Pekka Enberg
db272ba799 Update tools/java submodule
* tools/java 6c1c484140...2e2c056c07 (1):
  > sstableloader: Add verbose message if sstable/file cannot be opened
2020-09-17 17:19:41 +03:00
Pekka Enberg
9650b8d4b5 Update tools/java submodule
* tools/java b0114f64bc...6c1c484140 (1):
  > sstableloader: fix generating CQL statements
2020-09-17 12:25:08 +03:00
Avi Kivity
81844fb476 Update tools/java submodule
* tools/java 2d49ded77b...b0114f64bc (1):
  > Merge "dist: do not install build dependencies on build script" from Takuya

Fixes #7219.
2020-09-16 12:52:07 +03:00
Avi Kivity
888fde59f8 Update tools/jmx submodule
* tools/jmx d3096f3...6795a22 (1):
  > Merge "dist: do not install build dependencies on build script" from Takuya

Ref #7219.
2020-09-16 10:30:33 +03:00
Avi Kivity
764866ed02 Update tools/jmx submodule
* tools/jmx 8d92e54...d3096f3 (1):
  > dist: debian: fix detection of debuild
2020-09-13 16:26:53 +03:00
Avi Kivity
d55a8148ed tools: toolchain: update for gnutls-3.6.15
GNUTLS-SA-2020-09-04 / GNUTLS-SA-2020-09-04.

Fixes #7212.
2020-09-10 12:52:00 +03:00
Takuya ASADA
59a6e08cb9 Add support passing python3 dependencies from main repo to scylla-python3 script
We don't want to update scylla-python3 submodule for every python3 dependency
update, bring python3 package list to python3-dependencies.txt, pass it on
package building time.

See #6702
See scylladb/scylla-python3#6

[avi: add

* tools/python3 19a9cd3...b4e52ee (1):
  > Allow specify package dependency list by --packages

 to maintain bisectability]
2020-09-08 23:39:34 +03:00
Pekka Enberg
1ed9a336a5 Update tools/jmx submodule
* tools/jmx 12ab6aa...8d92e54 (1):
  > Merge 'JMX footprint work' from Calle
Fixes scylladb/scylla-jmx#133
Fixes scylladb/scylla-jmx#134
2020-09-07 13:56:47 +03:00
Pekka Enberg
478e831d4f Update tools/jmx submodule
* tools/jmx d5d1efd...12ab6aa (1):
  > Merge "Fix JMX startup after offline installation" from Amos

Fixes: scylladb/scylla#7098
Fixes: scylladb/scylla-jmx#129
2020-09-07 09:42:26 +03:00
Avi Kivity
37352a73b8 Update tools/python3 submodule
* tools/python3 f89ade5...19a9cd3 (1):
  > dist: redhat: reduce log spam from unpacking sources when building rpm
2020-09-01 12:36:24 +03:00
Pekka Enberg
0f1b54fa6e Update tools/java submodule
* tools/java d6c0ad1e2e...2d49ded77b (1):
  > sstableloader: remove wrong check that breaks range tombstones
2020-08-27 09:05:34 +03:00
Pekka Enberg
f7c5c48df6 Update tools/jmx submodule
* tools/jmx be8f1ac...d5d1efd (1):
  > dist/debian: Remove conflict tag for Java 11
2020-08-25 15:46:51 +03:00
Avi Kivity
5ec2eae247 build: add python3-redis to dependencies
Needed for redis tests.
2020-08-24 20:03:50 +03:00
Avi Kivity
b0ae9d0c7d Update tools/python3 submodule
* tools/python3 196be5a...f89ade5 (1):
  > reloc: cleanup deb builddir
2020-08-18 13:10:01 +03:00
Takuya ASADA
352a136ae2 scylla-python3: move scylla-python3 to separated repository
Except scylla-python3, each scylla package has its own git repository, same package script filename, same build directory structure.
To put python3 thing on scylla repo, we created 'python3' directory on multiple locations, made '-python3' suffixed files, dig deeper build directory not to conflict scylla-server package build.
We should move all scylla-python3 related files to new repository, scylla-python3.

To keep compatibility with current Jenkins script, provide packages on
build/ directory for now.

Fixes #6751
2020-08-18 09:34:08 +03:00
Pekka Enberg
d6354cb507 dbuild: Use host $USER and $HOME in Podman container
The "user.home" system property in JVM does not use the "HOME"
environment variable. This breaks Ant and Maven builds with Podman,
which attempts to look up the local Maven repository in "/root/.m2" when
building tools, for example:

  build.xml:757: /root/.m2/repository does not exist.

To fix the issue, let's bind-mount an /etc/passwd file, which contains
host username for UID 0, which ensures that Podman container $USER and $HOME
are the same as on the host.

Message-Id: <20200817085720.1756807-1-penberg@scylladb.com>
2020-08-17 13:46:28 +03:00
Avi Kivity
f4dbe3e65e Update tools/jmx submodule
* tools/jmx c5ed831...be8f1ac (1):
  > dist/common/systemd: set WorkingDirectory to get heap dump correctly
2020-08-17 09:54:59 +03:00
Piotr Jastrzebski
c001374636 codebase wide: replace count with contains
C++20 introduced `contains` member functions for maps and sets for
checking whether an element is present in the collection. Previously
`count` function was often used in various ways.

`contains` does not only express the intend of the code better but also
does it in more unified way.

This commit replaces all the occurences of the `count` with the
`contains`.

Tests: unit(dev)

Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com>
Message-Id: <b4ef3b4bc24f49abe04a2aba0ddd946009c9fcb2.1597314640.git.piotr@scylladb.com>
2020-08-15 20:26:02 +03:00
Avi Kivity
79851d6216 Update tools/java submodule
* tools/java f2c7cf8d8d...d6c0ad1e2e (3):
  > sstableloader: Preserve droppedColumns in column rename handling
  > Revert "reloc: Build relocatable package without Maven"
  > reloc: Build relocatable package without Maven
2020-08-12 16:58:45 +03:00
Avi Kivity
188c832e3d Merge 'scylla_swap_setup improvement' from Takuya
"
As I described at https://github.com/scylladb/scylla/issues/6973#issuecomment-669705374,
we need to avoid disk full on scylla_swap_setup, also we should provide manual configuration of swap size.

This PR provides following things:
 - use psutil to get memtotal and disk free, since it provides better APIs
 - calculate swap size in bytes to avoid causing error on low-memory environment
 - prevent to use more than 50% of disk space when auto-configured swap size, abort setup when almost no disk space available (less than 2GB)
 - add --swap-size option to specify swap size both on scylla_swap_setup and scylla_setup
 - add interactive swap size prompt on scylla_setup

Fixes #6947
Related #6973
Related scylladb/scylla-machine-image#48
"

* syuu1228-scylla_swap_setup_improves:
  scylla_setup: add swap size interactive prompt on swap setup
  scylla_swap_setup: add --swap-size option to specify swap size
  scylla_swap_setup: limit swapfile size to half of diskspace
  scylla_swap_setup: calculate in bytes instead of GB
  scylla_swap_setup: use psutil to get memtotal and disk free
2020-08-10 18:17:38 +03:00
Takuya ASADA
b21bed701b scylla_swap_setup: use psutil to get memtotal and disk free
To get better API of memory & disk statistics, switch to psutil.
With the library we don't need to parse /proc/meminfo.

[avi: regenerate tools/toolchain/image for new python3-psutils package]
2020-08-10 13:50:09 +03:00
Avi Kivity
1072acb215 Update tools/java and tools/jmx submodules
* tools/java aa7898d771...f2c7cf8d8d (2):
  > dist: debian: support non-x86
  > NodeProbe: get all histogram values in a single call

* tools/jmx 626fd75...c5ed831 (1):
  > dist: debian: support non-x86
2020-08-06 19:17:14 +03:00
Avi Kivity
66c2b4c8bf tools: toolchain: regenerate for gcc 10.2
Fixes #6813.

As a side effect, this also brings in xxhash 0.7.4.
2020-07-31 08:32:16 +03:00
Avi Kivity
22fe38732d Update tools/jmx and tools/java submodules
* tools/java a9480f3a87...aa7898d771 (4):
  > dist: debian: do not require root during package build
  > cassandra-stress: Add serial consistency options
  > dist: debian: fix detection of debuild
  > bin tools: Use non-default `cassandra.config`

* tools/jmx c0d9d0f...626fd75 (1):
  > dist: debian: do not require root during package build

Fixes #6655.
2020-07-29 12:55:18 +03:00
Avi Kivity
5ead33d486 Update tools/jmx and tools/java submodules
* tools/java 113c7d993b...a9480f3a87 (3):
  > reloc/build_deb.sh: Fix extra whitespace in"mv" command path
  > README.md: Document repository purpose for Scylla
  > reloc: Add "--builddir" option to build_{rpm,deb}.sh

* tools/jmx aa94fe5...c0d9d0f (2):
  > add build/ to gitignore
  > reloc: Add "--builddir" option to build_{rpm,deb}.sh
2020-07-21 15:33:54 +03:00
Avi Kivity
e4deaaced3 Update tools/java submodule
* tools/java 3eca0e3511...113c7d993b (1):
  > dist: redhat: reduce log spam from unpacking sources when building rpm
2020-07-18 12:07:57 +03:00
Avi Kivity
afd9b29627 Update tools/jmx and tools/java submodules
* tools/java 50dbf77123...3eca0e3511 (1):
  > config: Avoid checking options and filtering scylla.yaml

* tools/jmx 5820992...aa94fe5 (3):
  > dist: redhat: reduce log spam from unpacking sources when building rpm
  > Merge 'gitignore: fix typo and add scylla-apiclient/target/' from Benny
  > apiclient: Bump Jackson version to 2.10.4
2020-07-15 19:42:47 +03:00
Avi Kivity
d74582fbc5 move jmx/tools submodules to tools directory
Move all package repositories to tools directory.
2020-07-13 17:14:14 +03:00
Avi Kivity
5d99d667ec Merge "Build system improvements for packaging" from Pekka
"
This patch series attempts to decouple package build and release
infrastructure, which is internal to Scylla (the company). The goal of
this series is to make it easy for humans and machines to build the full
Scylla distribution package artifacts, and make it easy to quickly
verify them.

The improvements to build system are done in the following steps.

1. Make scylla.git a super-module, which has git submodules for
   scylla-jmx and scylla-tools.  A clone of scylla.git is now all that
   is needed to access all source code of all the different components
   that make up a Scylla distribution, which is a preparational step to
   adding "dist" ninja build target. A scripts/sync-submodules.sh helper
   script is included, which allows easy updating of the submodules to the
   latest head of the respective git repositories.

2. Make builds reproducible by moving the remaining relocatable package
   specific build options from reloc/build_reloc.sh to the build system.
   After this step, you can build the exact same binaries from the git
   repository by using the dbuild version from scylla.git.

3. Add a "dist" target to ninja build, which builds all .rpm and .deb
   packages with one command. To build a release, run:

   $ ./tools/toolchain/dbuild ./configure.py --mode release

   $ ./tools/toolchain/dbuild ninja-build dist

   and you will now have .rpm and .deb packages to all the components of
   a Scylla distribution.

4. Add a "dist-check" target to ninja build for verification of .rpm and
   .deb packages in one command. To verify all the built packages, run:

   $  ninja-build dist-check

   Please note that you must run this step on the host, because the
   target uses Docker under the hood to verify packages by installing
   them on different Linux distributions.

   Currently only CentOS 7 verification is supported.

All these improvements are done so that backward compatibility is
retained. That is, any existing release infrastructure or other build
scripts are completely unaffacted.

Future improvements to consider:

- Package repository generation: add a "ninja repo" command to generate
  a .rpm and .deb repositories, which can be uploaded to a web site.
  This makes it possible to build a downloadable Scylla distribution
  from scylla.git. The target requires some configuration, which user
  has to provide. For example, download URL locations and package
  signing keys.

- Amazon Machine Image (AMI) support: add a "ninja ami" command to
  simplify the steps needed to generate a Scylla distribution AMI.

- Docker image support: add a "ninja docker" command to simplify the
  steps needed to generate a Scylla distribution Docker image.

- Simplify and unify package build: simplify and unify the various shell
  scripts needed to build packages in different git repositories. This
  step will break backward compatiblity and can be done only after
  relevant build scripts and release infrastructure is updated.
"

* 'penberg/packaging/v5' of github.com:penberg/scylla:
  docs: Update packaging documentation
  build: Add "dist-check" target
  scripts/testing: Add "dist-check" for package verification
  build: Add "dist" target
  reloc: Add '--builddir' option to build_deb.sh
  build: Add "-ffile-prefix-map" to cxxflags
  docs: Document sync-submodules.sh script in maintainer.md
  sync-submodules.sh: Add script for syncing submodules
  Add scylla-tools submodule
  Add scylla-jmx submodule
2020-06-18 12:59:52 +03:00
Yaron Kaikov
e9d5852b0c dbuild: Add an option to run dbuild using podman
Following https://github.com/scylladb/scylla/pull/5333, we want to be
able to run dbuild using podman or docker by setting enviorment variable
named: DBUILD_TOOL

DBUILD_TOOL will use docker by default unless we explicitly set the tool podmand

Fixes: https://github.com/scylladb/scylla/pull/6644
2020-06-18 12:13:39 +03:00
Pekka Enberg
584c7130a1 scripts/testing: Add "dist-check" for package verification
This adds a "dist-check.sh" script in tools/testing, which performs
distribution package verification by installing packages under Docker.
2020-06-18 10:16:46 +03:00
Pekka Enberg
02b733c22b Revert "dbuild: Add an option to run with 'docker' or 'podman'"
This reverts commit ac7237f991. The logic
is wrong and always picks "podman" if it's installed on the system even
if user asks for "docker" with the DBUILD_TOOL environment variable.
This wreaks havoc on machines that have both docker and podman packages
installed, but podman is not configured correctly.
2020-06-18 09:22:33 +03:00
Yaron Kaikov
ac7237f991 dbuild: Add an option to run with 'docker' or 'podman'
This adds support for configuring whether to run dbuild with 'docker' or
'podman' via a new environment variable, DBUILD_TOOL. While at it, check
if 'podman' exists, and prefer that by default as the tool for dbuild.
2020-06-16 15:18:46 +03:00
Avi Kivity
0dc78d38f1 build: remove zstd submodule
Now that Fedora provides the zstd static library, we can remove the
submodule.

The frozen toolchain is regenerated to include the new package.
2020-06-11 17:12:49 +03:00
Takuya ASADA
4eae7f66eb dist/offline_installer/debian: support cross build
Unlike redhat version, debian version already supported cross build since
it uses debootstrap, but the shellscript rejecting to continue build on
non-debian distribution, so drop these lines to build on Fedora.

[avi: regenerate toolchain]
2020-06-08 19:54:09 +03:00
Israel Fruchter
eabcb31503 scylla_util.py: replace platform.dist() with distro package
since dbuild was updated to fedora-32, hence to python3.8
`platform.dist()` is deprecated, and need to be replaced

Fixes: #6501

[avi: folded patch with install-dependencies.sh change]
[avi: regenerated toolchain]
2020-05-31 13:42:34 +03:00
Avi Kivity
1c2f538eb3 tools: toolchain: dbuild: allow customization of docker arguments
Introduce ~/.config/scylladb/dbuild configuration file, and
SCYLLADB_DBUILD environment variables, that inject options into
the docker run command. This allows adding bind mounts for ccache
and distcc directories, as well as any local scripts and PATH
or other environment configuration to suit the user's needs.

Message-Id: <20200521133529.25880-1-avi@scylladb.com>
2020-05-22 13:52:21 +03:00
Avi Kivity
a61b3f2d78 tools: toolchain: rebase on Fedora 32
- base image changed from Fedora 31 to Fedora 32
 - disambiguate base image to use docker.io registry
 - pystache and python-casasndra-driver are no longer availble,
   so use pip3 to install them. Add pip3 to packages.
 - since pip3 installs commands to /usr/local/bin, update checks
   in build_deb to check for those too

Fedora 32 packages gcc 10, which has support for coroutines.
Message-Id: <20200521063138.1426400-1-avi@scylladb.com>
2020-05-21 18:27:50 +03:00
Avi Kivity
e774ee06ed Update seastar submodule
* seastar e708d1df3a...92365e7b87 (11):
  > tests: distributed_test: convert to SEASTAR_TEST_CASE
  > Merge "Avoid undefined behavior on future self move assignments" from Rafael
  > Merge "C++20 support" from Avi
  > optimized_optional: don't use experimental C++ features
  > tests: scheduling_group_test: verify that later() doesn't modify the current group
  > tests: demos: coroutine_demo: add missing include for open_file_dma()
  > rpc: minor documentation improvements
  > rpc: Assert that sinks are closed
  > Merge "Fix most tests under valgrind" from Rafael
  > distributed_test: Fix it on slow machines
  > rpc_test: Make sure we always flush and close the sink

loading_shard_values.hh: added missing include for gcc6-concepts.hh,
exposed by the submodule update.

Frozen toolchain updated for the new valgrind dependency.
2020-05-12 14:04:16 +03:00
Botond Dénes
4e83cc4413 tools/scylla_types: add validation action
Allow validating values according to their declared type.
2020-05-07 16:35:23 +03:00
Botond Dénes
4662ad111c tools/scylla_types: add compound_type support
Allow examining partition and clustering keys, by adding support for
full and prefix compound types. The members of the compound type are
specified by passing several types with --type on the command line.
2020-05-07 16:35:21 +03:00
Botond Dénes
70331bad6f tools/scylla_types: single source of truth for actions
Currently the available actions are documented in several different
places:
* code implementing them
* description
* documentation for --action
* error message that validates value for --action

This is guaranteed to result in incorrect, possibly self-contradicting
documentation. Resolve by generating all documentation from the handler
registry, which now also contains the description of the action.
Also have a separate flag for each action, instead of --action=$ACTION.
2020-05-07 16:20:18 +03:00
Botond Dénes
7176660e12 tools: mv scylla_types scylla-types
Using hypen seems to be the standard among executables.
2020-05-07 15:14:59 +03:00
Botond Dénes
6de51db84a tools: introduce scylla_types
We often have to examine raw values, obtained from various sources, like
sstables, logs and coredumps. For some types it is quite simple to
convert raw hex values to human readable ones manually (integers), for
others it is very hard or simply not practical. This command-line tool
aims to ease working with raw values, by providing facilities to print
them in human readable form and compare them. We can extend it with more
functions as needed.

Examples:
$ scylla_types -a print -t Int32Type b34b62d4
-1286905132

$ scylla_types -a compare -t 'ReversedType(TimeUUIDType)' b34b62d46a8d11ea0000005000237906 d00819896f6b11ea00000000001c571b
b34b62d4-6a8d-11ea-0000-005000237906 > d0081989-6f6b-11ea-0000-0000001c571b

Signed-off-by: Botond Dénes <bdenes@scylladb.com>
Message-Id: <20200505124914.104827-1-bdenes@scylladb.com>
2020-05-06 12:56:20 +03:00