Commit Graph

368 Commits

Author SHA1 Message Date
Glauber Costa
79a5351651 scylla-housekeeping: timeout eventually
scylla-housekeeping always wants to run in the installation to check if
we are running the latest version. This happens regardless of whether or
not we said yes or no to the housekeeping scylla_setup question - as
that question only deals with whether or not we want to do this through
a timer.

It is fine to try to run scylla-housekeeping, as long as we time it out.
The current code doesn't.

The naive solution is to add a timeout parameter to urllib.request.open.
However, that timeout is not respected and in my tests I saw real
timeouts up to four times higher the timeout we set. For a reasonable 5s
timeout, this mean a 20s real timeout which can lead to a very bad user
experience. This seems to be a known problem with this module according
to a quick Google search.

This patch then takes a slightly more complex solution and uses
multiprocess to enforce a well-defined user-visible timeout.

Fixes #3980

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190506122335.5707-1-glauber@scylladb.com>
2019-05-06 17:37:59 +03:00
Glauber Costa
47d04e49e8 scylla_setup: respect user's decision not to call housekeeping
The setup script asks the user whether or not housekeeping should
be called, and in the first time the script is executed this decision
is respected.

However if the script is invoked again, that decision is not respected.

This is because the check has the form:

 if (housekeeping_cfg_file_exists) {
    version_check = ask_user();
 }
 if (version_check) { do_version_check() } else { dont_do_it() }

When it should have the form:

 if (housekeeping_cfg_file_exists) {
    version_check = ask_user();
    if (version_check) { do_version_check() } else { dont_do_it() }
 }

(Thanks python)

This is problematic in systems that are not connected to the internet, since
housekeeping will fail to run and crash the setup script.

Fixes #4462

Branches: master, branch-3.1
Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190502034211.18435-1-glauber@scylladb.com>
2019-05-02 18:46:41 +03:00
Glauber Costa
99c00547ad make scylla_util OS detection robust against empty lines
Newer versions of RHEL ship the os-release file with newlines in the
end, which our script was not prepared to handle. As such, scylla_setup
would fail.

This patch makes our OS detection robust against that.

Fixes #4473

Branches: master, branch-3.1
Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190502152224.31307-1-glauber@scylladb.com>
2019-05-02 18:33:35 +03:00
Takuya ASADA
c3dae6673f dist/common/scripts: use out() to run perftune.py
perftune.py executes hwloc-calc, the command is now provided as
relocatable binary, placed under /opt/scylladb/bin.
So we need to add the directory to PATH when calling
subprocess.check_output(), but our utility function already do that,
switch to it.

Fixes #4443

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190418124345.24973-1-syuu@scylladb.com>
2019-04-19 11:47:40 +03:00
Takuya ASADA
592fec32a0 dist/common/scripts: use /etc/os-release to detect distributions
Since we moved relocatable .rpm now Scylla able to run on Amazon Linux
2.
However, is_redhat_variant() on scylla_util.py does not works on Amazon
Linux 2, since it does not have /etc/redhat-release.
So we need to switch to /etc/os-release, use ID_LIKE to detect Redhat
variants/Debian variants.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20190417115634.9635-1-syuu@scylladb.com>
2019-04-18 19:07:14 +03:00
Glauber Costa
f3a24b6c22 dist: remove curl dependency to simplify dependency list further
Although curl is widely available, there is no reason to depend on it.
There are mainly two users, as indicated by grep:
1) scylla-housekeeping
2) scripts within the AMI
3) docker image

The AMI has its own RPM and it already depends on curl. While we could
get rid of the curl dependency there too, we can do that later. Docker
is its own thing and it only needs it at build time anyway.

For the main scylla repo, this patch changes scylla-housekeeping so as
not to depend on the curl binary and use urllib directly instead. We can
then remove curl from our dependency list.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190411125642.9754-1-glauber@scylladb.com>
2019-04-11 16:12:36 +03:00
Amos Kong
db9a721d02 scylla_kernel_check: update kb_fs_not_qualified_aio doc link
The doc has been moved to
https://docs.scylladb.com/troubleshooting/error_messages/kb_fs_not_qualified_aio/

Fixes #4398

Signed-off-by: Amos Kong <amos@scylladb.com>
Message-Id: <75fdc97d222667f4402cadc7a46e52d6f38a32a8.1554375560.git.amos@scylladb.com>
2019-04-07 09:26:56 +03:00
Avi Kivity
b1c4c371fa Merge "fix I/O calculation for i3.metal instances" from Glauber
"
Calculation of IO properties is slightly wrong for i3.metal, because we get
the number of disks wrong. The reason for that is our check for ephemeral nvme
disks, that pre-date the time in which root devices were exposed as nvme devices
(nitro and metal instances).
"

toolchain updated with python3-psutil

* 'ec2fixes' of github.com:glommer/scylla:
  scylla_util.py: do not include root disks in ephemeral list
  scylla-python3: include the psutil module
  fix typo in scylla_ec2_check
2019-04-05 15:46:59 +03:00
Glauber Costa
0e9a50ab57 scylla_util.py: do not include root disks in ephemeral list
Nitro instances (and metal ones) put their root device in nvme (as a
protocol. it is still EBS). Our algorithm so far has relied on parsing
the nvme devices to figure out which ones are ephemeral but it will
break for those instances.

Out of our supported instances so far, the i3.metal is the only one
in which this breaks.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
2019-04-03 07:57:00 -04:00
Glauber Costa
027eee5f13 fix typo in scylla_ec2_check
enahanced -> enhanced

Signed-off-by: Glauber Costa <glauber@scylladb.com>
2019-04-02 17:24:00 -04:00
Takuya ASADA
75a7859019 reloc: add relocatable CLI tools for scylla setup scripts
To minimize dependencies of Scylla, add relocatable image of CLI tools
required for scylla setup scripts.
2019-04-01 02:59:01 +09:00
Amos Kong
98cb7d145b scylla_setup: don't repeatedly select disks if it's assigned
Currently scylla_setup would be stuck to select disks in non-interaction mode.

Fixes #4370

Signed-off-by: Amos Kong <amos@scylladb.com>
Message-Id: <8fb445708a6ac0d2130f8a8d041b1d8d71f1cf14.1553745961.git.amos@scylladb.com>
2019-03-28 15:21:36 +02:00
Vlad Zolotarov
c798563cb0 scylla_util.py: ignore perftune.py's error messages when calling it in order to get mode's CPU mask
When we call perftune.py in order to get a particular mode's cpu set
(e.g. mode=sq_split) it may fail and print an error message to stderr because
there are too few CPUs for a particular configuration mode (e.g. when
there are only 2 CPUs and the mode is sq_split).

We already treat these situations correctly however we let the
corresponding perftune.py error message get out into the syslog.

This is definitely confusing, stressful and annoying.
Let's not let these messages out.

Fixes #4211

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
Message-Id: <20190325220018.22824-1-vladz@scylladb.com>
2019-03-26 11:08:31 +02:00
Dan Yasny
6dbb48a12a node_health_check: collect scylla.d contents with node_health_check
We are missing data for CPU conf files and potentially other
information when collecting node data.

Fixes #4094

Message-Id: <20190225204727.20805-5-dyasny@scylladb.com>
2019-02-28 10:23:19 +02:00
Dan Yasny
9055e7a49e node_health_check: Add redhat-release to health check if present
Collect /etc/redhat-release as well as os-release from relevant
hosts. The problem with os-release is that it doesn't contain the
minor version of the EL OS family. Since this is only present in
Red Hat distributions and derivatives, it will not be collected
in Debian derivatives.

Another approach is to use lsb_release -a but it will not provide
anything more useful than os-release on Debian and lsb needs to be
installed on EL derivatives first.

Fixes #4093

Message-Id: <20190225204727.20805-4-dyasny@scylladb.com>
2019-02-28 10:23:12 +02:00
Dan Yasny
2f26390f52 node_health_check: Use clear hostname instead of -i for filenames and report names
Hostname -i produces a garbled output on new systems with ipv6
enabled, better to use the clean hostname instead, for the file
names.

Message-Id: <20190225204727.20805-3-dyasny@scylladb.com>
2019-02-28 10:23:06 +02:00
Dan Yasny
f483c594ee node_health_check: Detect the address for the CQL (port 9042) listener and use it
The script relies on hostname -i for host address, which can be
wrong in some systems. This patch checks for where the defined
CQL_PORT is listening, and uses the correct IP address instead.

Message-Id: <20190225204727.20805-2-dyasny@scylladb.com>
2019-02-28 10:22:58 +02:00
Amnon Heiman
b8a838c66c node_exporter_install: Add a force install option
It is sometimes usefull for force reinstallation of the node_exporter,
for example during upgrade or if something is wrong with the current
installation.

This patch adds a --force command line option.

If the --force is given to the node_expoerter_install, it will reinstall
node_exporter to the latest version, regardless if it was already
installed.

The symbolic link in /usr/bin/node_exporter will be set to the installed
version, so if there are other installed version, they will remain.

Examples:
$ sudo ./dist/common/scripts/node_exporter_install
node_exporter already installed, you can use `--force` to force reinstallation

$ sudo ./dist/common/scripts/node_exporter_install --force
node_exporter already installed, reinstalling

Fixes #4201

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190225151120.21919-1-amnon@scylladb.com>
2019-02-25 20:16:58 +02:00
Amnon Heiman
750b76b1de scylla-housekeeping: Read JSON as UTF-8 string for older Python 3 compatibility
Python 3.6 is the first version to accept bytes to the json.loads(),
which causes the following error on older Python 3 versions:

  Traceback (most recent call last):
    File "/usr/lib/scylla/scylla-housekeeping", line 175, in <module>
      args.func(args)
    File "/usr/lib/scylla/scylla-housekeeping", line 121, in check_version
      raise e
    File "/usr/lib/scylla/scylla-housekeeping", line 116, in check_version
      versions = get_json_from_url(version_url + params)
    File "/usr/lib/scylla/scylla-housekeeping", line 55, in get_json_from_url
      return json.loads(data)
    File "/usr/lib64/python3.4/json/__init__.py", line 312, in loads
      s.__class__.__name__))
  TypeError: the JSON object must be str, not 'bytes'

To support those older Python versions, convert the bytes read to utf8
strings before calling the json.loads().

Fixes #4239
Branches: master, 3.0

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190218112312.24455-1-amnon@scylladb.com>
2019-02-18 14:52:32 +02:00
Nadav Har'El
1cf1af1502 scylla_setup: fix non-interactive behavior
In commit ec66dd6562, in non-interactive
runs of scylla_setup all options were unintentionally set to "false",
regardless of the options passed on the scylla_setup command line. This
can lead to all sorts of wrong behaviors, and in particular one test
setup assumed it was enabling the Scylla service (which was previously
the default) but after this commit, it no longer did.

This patch restores the previous behavior: Non-interactive invocations
of scylla_setup adhere to the defaults and the command-line options,
rather than blindly choosing "false".

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <20190211214105.32613-1-nyh@scylladb.com>
2019-02-12 10:50:00 +02:00
Glauber Costa
94ead559f7 move scylla-housekeeping to dist/common/scripts
All of our python scripts are there and they are all installed
automatically into /usr/lib/scylla. By keeping scylla-housekeeping
separately we are just complicating our build process.

This would be just a minor annoyance but this broke the new relocatable
process for python3 that I am trying to put together because I forgot to
add the new location as a source for the scripts.

Therefore, I propose we start being more diligent with this and keeping
all scripts together for the future.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190123191732.32126-2-glauber@scylladb.com>
2019-01-31 11:44:34 +02:00
Glauber Costa
ec66dd6562 scylla_setup: tell users about the possibility of a non-interactive session
From day1, scylla_setup can be run either iteractively or through
command line parameters. Still, one of the requests we are asked the
most from users is whether we can provide them with a version of
scylla_setup that they can call from their scripts.

This probably happens because once you call a script interactively,
it may not be totally obvious that a different mode is available.
Even when we do tell users about that possibility, the request number
two is then "which flags do I pass?"

The solution I am proposing is to just tell users the answers to those
qestions at the end of an interactive session. After this patch, we
print the following message to the console:

  ScyllaDB setup finished.
  scylla_setup accepts command line arguments as well! For easily provisioning in a similar environmen than this, type:

    scylla_setup --no-raid-setup --nic eth0 --no-kernel-check \
                 --no-verify-package --no-enable-service --no-ntp-setup \
                 --no-node-exporter --no-fstrim-setup

  Also, to avoid the time-consuming I/O tuning you can add --no-io-setup and copy the contents of /etc/scylla.d/io*
  Only do that if you are moving the files into machines with the exact same hardware

Notes on the implementation: it is unfortunate for these purposes that
all our options are negated. Most conditionals are branching on true
conditions, so although I could write this:

  args.no_option = not interactive_ask_service(...)
  if not args.no_option:
    ...

I opted in this patch to write:

  option = interactive_ask_service(...)
  args.no_option = not option
  if option:
    ...

There is an extra line and we have to update args separately, but it
makes it less hard to get confused in the conditional with the double
negation. Let me know if there are disagreements here.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190124153832.21140-1-glauber@scylladb.com>
2019-01-24 17:41:26 +02:00
Glauber Costa
54bc0ce70d scylla_setup: make sure it works (again) in interactive mode
Commit 019a2e3a27 marked some arguments as required, which improved
the usability of scylla_setup.

The problem is that when we call scylla_setup in interactive mode,
no argument should be required. After the aforementioned commit
scylla_setup will either complain that the required arguments were
not passed if zero arguments are present, or skip interactive mode
if one of the mandatory ones is present.

This patch fixes that by checking whether or not we were invoked with
no command line arguments and lifting the requirements for mandatory
arguments in that case.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190122003621.11156-1-glauber@scylladb.com>
2019-01-22 16:54:55 +02:00
Glauber Costa
ca997b5f60 scylla_setup: warn users on the severity of answering no to IOTUne
The system won't work properly if IOTune is not run. While it is fair
to skip this step because it takes long-- indeed, it is common to provision
io.conf manually to be able to skip this step, first time users don't know
this and can have the impression that this is just a totally optional step.

Except the node won't boot up without it.

As a user nicely put recently in our mailing list:

"...in this case, it would be even simpler to forbid answering "no"
 to this not-so-optional step :)"

We should not forbid saying no to IOTune, but we should warn the user
about the consequences of doing so.

Fixes #4120

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190121144506.17121-1-glauber@scylladb.com>
2019-01-21 16:55:50 +02:00
Nadav Har'El
9062750089 scylla_util.py: make view_hints_directory setting optional
It is optional to set "view_hints_directory", so we shouldn't insist that
it is defined in scylla.yaml on upgrade.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <20190114125225.10794-1-nyh@scylladb.com>
2019-01-14 14:59:20 +02:00
Nadav Har'El
da090a5458 materialized views: move hints to top-level directory
While we keep ordinary hints in a directory parallel to the data directory,
we decided to keep the materialized view hints in a subdirectory of the data
directory, named "view_pending_updates". But during boot, we expect all
subdirectories of data/ to be keyspace names, and when we notice this one,
we print a warning:

   WARN: database - Skipping undefined keyspace: view_pending_updates

This spurious warning annoyed users. But moreover, we could have bigger
problems if the user actually tries to create a keyspace with that name.

So in this patch, we move the view hints to a separate top-level directory,
which defaults to /var/lib/scylla/view_hints, but as usual can be configured.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <20190107142257.16342-1-nyh@scylladb.com>
2019-01-07 16:43:43 +02:00
Benny Halevy
ef53ddf3ae scylla_io_setup: correct units in low space warning
GiB -> GB

Refs #2676

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20181210092503.10344-1-bhalevy@scylladb.com>
2018-12-10 13:58:49 +02:00
Amnon Heiman
09c2b8b48a node_exporter_install: switch to node_exporter 0.17
The newer version of node_exporter comes with important bug fixes, that
is especially important for I3.metal is not supported with the older
version of node_exporter.

The dashboards can now support both the new and the old version of
node_exporter.

Fixes #3927

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20181210085251.23312-1-amnon@scylladb.com>
2018-12-10 10:54:50 +02:00
Benny Halevy
bcb486b8b9 scylla_io_setup: io_tune should not run when there is less than 10GB of disk space
Fixes #2676

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20181209174852.3620-1-bhalevy@scylladb.com>
2018-12-10 10:38:33 +02:00
Amos Kong
09a3b11c2f scylla_setup: only ask for nic in interactive mode
Current scylla_setup still asks for nic even nic is already assigned in cmdline.

Fixes #3908

Signed-off-by: Amos Kong <amos@scylladb.com>
Message-Id: <6b867e17a5583c495c771a37d5fa1e8366b1d61b.1542337635.git.amos@scylladb.com>
2018-12-09 15:29:31 +02:00
Avi Kivity
d4f353d3c8 Merge "normalized python3 compatibility, shebang and encoding" from Alexys
"
This series of patches ensures that all the Python code base is python3 compliant
and consistent by applying the following logic:

- python3 classifier on setup.py to explicitly state our python compatibility matrix
- add UTF-8 encoding header
- correct every shebang to the same /usr/bin/env python3
- shebang is only added on scripts meant to be executed on their own (removed otherwise)
- migrate some leftover scripts from python2 to python3 with minimal QA

This work is important to prepare for a more drastic change on Python code styling
using the black formatter and the setting up of automated QA checks on Python code base.
"

* 'python3_everywhere' of https://github.com/numberly/scylla:
  scylla-housekeeping: fix python3 compat and shebang
  dist/ami/files/scylla_install_ami: python3 shebang
  dist/docker/redhat/docker-entrypoint.py: add encoding comment
  fix_system_distributed_tables.py: fix python3 compat and shebang
  gen_segmented_compress_params.py: add encoding comment
  idl-compiler.py: python3 shebang
  scylla-gdb.py: python3 shebang
  configure.py: python3 shebang
  tools/scyllatop/: add / normalize python3 shebang
  scripts/: add / normalize python3 shebang
  dist/common/scripts: add / normalize python3 shebang
  test.py: add encoding comment
  setup.py: add python3 classifiers
2018-12-06 12:16:57 +02:00
Avi Kivity
2dba809844 Merge "scylla_io_setup: support multiple devices" from Benny
"
This patchset adds support to scylla_io_setup for
multiple data directories as well as commitlog,
hints, and saved_caches directories.

Refs #2415

Tests: manual testing with scylla-ccm generated scylla.yaml
"

* 'projects/multidev/v3' of https://github.com/bhalevy/scylla:
  scylla_io_setup: assume default directories under /var/lib/scylla
  scylla_io_setup: add support for commitlog, hints, and saved_caches directory
  scylla_io_setup: support multiple data directories
2018-11-29 16:44:33 +02:00
Benny Halevy
5ec191536e scylla_io_setup: assume default directories under /var/lib/scylla
If a specific directory is not configure in scylla.yaml, scylla assumes
a default location under /var/lib/scylla.

Hard code these locations in scylla_io_setup until we have a better way
to probe scylla about it.

Be permissive and ignore the default directories if they don't not exist
on disk and silently ignore them.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2018-11-29 15:07:29 +02:00
Benny Halevy
88b85b363a scylla_io_setup: add support for commitlog, hints, and saved_caches directory
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2018-11-29 10:09:17 +02:00
Benny Halevy
e4382caa4a scylla_io_setup: support multiple data directories
Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2018-11-29 10:09:17 +02:00
Alexys Jacob
02656fb00e dist/common/scripts: add / normalize python3 shebang 2018-11-28 23:55:26 +01:00
Dan Yasny
019a2e3a27 scylla_setup: Mark required args
Fixes #3945

Message-Id: <20181128220549.3083-1-dyasny@gmail.com>
2018-11-28 22:30:02 +00:00
Alexys Jacob
c24e0e5599 dist/common/scripts/scylla_util.py: coding style fixes
dist/common/scripts/scylla_util.py:388:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:414:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:418:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:453:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:468:5: E722 do not use bare 'except'
dist/common/scripts/scylla_util.py:472:1: E302 expected 2 blank lines, found 1

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Message-Id: <20181104120832.11273-1-ultrabug@gentoo.org>
2018-11-14 19:25:09 +02:00
Vlad Zolotarov
84d341a12d dist: change the sysconfig parameter name to reflect the new semantics
We tune NIC and disks together now. Change the sysconfig parameter to
reflect this new semantics.

However if we detect an old parameter name in the scylla-server we would
still update it thereby keeping the support for old installations.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
2018-10-31 15:28:13 -04:00
Vlad Zolotarov
7950062a82 scylla_util.py::sysconfig_parser: introduce has_option()
has_option() returns TRUE if a given configuration option is set.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
2018-10-31 15:27:00 -04:00
Vlad Zolotarov
9a5373254a dist: scylla_setup and scylla_sysconfig_setup: change paremeters names to reflect new semantics
Change the name of the corresponding parameter (--setup-nic) to reflect
the fact that we tune not just NIC now but rather NIC and disks together.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
2018-10-31 15:27:00 -04:00
Vlad Zolotarov
0e47d8bb1d dist: use perftune.py to tune disks and NIC
Tune disks using perftune.py together with NIC.
This is needed because disk(s) and NIC tuning has to be
performed using the mode (for non-NVMe disks).

We tune disks based on the current content of /etc/scylla/scylla.yaml.

Don't use scylla-blocktune for optimizing disks' performance
any more.

Unite the decision to optimize the NIC and disks tuning.
Optimize or not optimize them both together.

Disable disk tuning for DPDK and "virtio" modes for now.

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
2018-10-31 15:27:00 -04:00
Takuya ASADA
f3c3b9183c dist/debian: use relocatable package to produce .deb
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2018-10-24 11:29:47 +00:00
Alexys Jacob
eebbae066a dist/common/scripts/scylla_setup: fix gentoo linux installed package detection
return code is expected to be 0 when installed package was found

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Message-Id: <20181002123433.4702-1-ultrabug@gentoo.org>
2018-10-07 16:46:02 +03:00
Alexys Jacob
850d046551 dist/common/scripts/scylla_ntp_setup: fix gentoo linux systemd service name
fix typo as ntpd package systemd service is named ntpd, not sntpd

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Message-Id: <20181002123802.5576-1-ultrabug@gentoo.org>
2018-10-07 16:46:01 +03:00
Alexys Jacob
54151d2039 dist/common/scripts/scylla_cpuscaling_setup: fix file open mode for writing
gentoo linux part tries to open the configuration file without the
write flag, leading to an exception

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Message-Id: <20181002123957.6010-1-ultrabug@gentoo.org>
2018-10-07 16:46:00 +03:00
Alexys Jacob
6d6764133b dist/common/scripts: coding style fixes
dist/common/scripts/scylla_blocktune.py:24:10: E401 multiple imports on one line
dist/common/scripts/scylla_blocktune.py:27:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_blocktune.py:35:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_blocktune.py:48:1: E305 expected 2 blank lines after class or function definition, found 1
dist/common/scripts/scylla_blocktune.py:52:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_blocktune.py:59:5: E306 expected 1 blank line before a nested definition, found 0
dist/common/scripts/scylla_blocktune.py:74:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_blocktune.py:81:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_blocktune.py:87:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_config_get.py:26:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_config_get.py:43:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_config_get.py:53:1: E305 expected 2 blank lines after class or function definition, found 1
dist/common/scripts/scylla_util.py:18:22: E401 multiple imports on one line
dist/common/scripts/scylla_util.py:19:22: E401 multiple imports on one line
dist/common/scripts/scylla_util.py:24:1: F401 'string' imported but unused
dist/common/scripts/scylla_util.py:32:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:50:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:61:30: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:75:53: E703 statement ends with a semicolon
dist/common/scripts/scylla_util.py:79:32: E272 multiple spaces before keyword
dist/common/scripts/scylla_util.py:80:25: E703 statement ends with a semicolon
dist/common/scripts/scylla_util.py:85:32: E201 whitespace after '['
dist/common/scripts/scylla_util.py:85:51: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:130:34: E201 whitespace after '['
dist/common/scripts/scylla_util.py:130:65: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:170:1: E266 too many leading '#' for block comment
dist/common/scripts/scylla_util.py:172:11: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:174:10: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:178:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:181:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:184:17: E201 whitespace after '['
dist/common/scripts/scylla_util.py:184:50: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:186:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:193:16: E201 whitespace after '['
dist/common/scripts/scylla_util.py:193:76: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:195:18: E201 whitespace after '{'
dist/common/scripts/scylla_util.py:195:27: E203 whitespace before ':'
dist/common/scripts/scylla_util.py:195:41: E203 whitespace before ':'
dist/common/scripts/scylla_util.py:195:48: E202 whitespace before '}'
dist/common/scripts/scylla_util.py:203:25: E201 whitespace after '['
dist/common/scripts/scylla_util.py:203:54: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:204:76: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:208:27: E703 statement ends with a semicolon
dist/common/scripts/scylla_util.py:217:27: E201 whitespace after '['
dist/common/scripts/scylla_util.py:217:62: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:238:25: E201 whitespace after '['
dist/common/scripts/scylla_util.py:238:87: E202 whitespace before ']'
dist/common/scripts/scylla_util.py:257:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:258:11: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:259:11: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:268:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:277:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:280:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:283:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:286:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:297:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:302:5: E722 do not use bare except'
dist/common/scripts/scylla_util.py:305:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:325:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:329:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:335:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:338:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:341:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:343:81: E231 missing whitespace after ','
dist/common/scripts/scylla_util.py:352:1: E305 expected 2 blank lines after class or function definition, found 1
dist/common/scripts/scylla_util.py:352:21: E231 missing whitespace after ':'
dist/common/scripts/scylla_util.py:352:41: E231 missing whitespace after ':'
dist/common/scripts/scylla_util.py:352:65: E231 missing whitespace after ':'
dist/common/scripts/scylla_util.py:353:1: E302 expected 2 blank lines, found 0
dist/common/scripts/scylla_util.py:358:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:360:22: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:365:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:367:11: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:370:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:373:15: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:374:14: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:375:14: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:376:20: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:385:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:388:9: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:389:9: E225 missing whitespace around operator
dist/common/scripts/scylla_util.py:393:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:396:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:399:1: E302 expected 2 blank lines, found 1
dist/common/scripts/scylla_util.py:432:1: E302 expected 2 blank lines, found 1

Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Message-Id: <20180918213707.6069-1-ultrabug@gentoo.org>
2018-09-30 11:00:37 +03:00
Avi Kivity
8f5e80e61a Revert "setup: add the lazytime XFS version"
This reverts commit f828fe0d59. It causes
scylla_raid_setup to fail on CentOS 7.

Fixes #3784.
2018-09-26 11:10:07 +01:00
Glauber Costa
f828fe0d59 setup: add the lazytime XFS version
Starting with kernel 4.17 XFS will support the lazytime mount option.
That will be beneficial for Scylla as updating times synchronously is
one of our current sources of stalls.

Fortunately, older kernels are able to parse the option and just ignore
it. We verified that to be the case in a 4.15 kernel on ubuntu.
Therefore, just add the option unconditionally.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20180920170017.13215-1-glauber@scylladb.com>
2018-09-20 20:12:44 +03:00
Takuya ASADA
bd8a5664b8 dist/common/scripts/scylla_raid_setup: create scylla-server.service.d when it doesn't exist
When /etc/systemd/system/scylla-server.service.d/capabilities.conf is
not installed, we don't have /etc/systemd/system/scylla-server.service.d/,
need to create it.

Fixes #3738

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <20180904015841.18433-1-syuu@scylladb.com>
2018-09-04 10:12:32 +03:00