Commit Graph

381 Commits

Author SHA1 Message Date
Takuya ASADA
31ddb2145a dist/common/scripts: support nonroot mode on setup scripts
Since nonroot mode requires to run everything on non-privileged user,
most of setup scripts does not able to use nonroot mode.
We only provide following functions on nonroot mode:
 - EC2 check
 - IO setup
 - Node exporter installer
 - Dev mode setup
Rest of functions will be skipped on scylla_setup.
To implement nonroot mode on setup scripts, scylla_util provides
utility functions to abstract difference of directory structure between normal
installation and nonroot mode.
2019-09-03 20:06:35 +09:00
Avi Kivity
07010af44c scylla_prepare: verify processor satisfies instruction set requirements
Scylla requires the CLMUL and SSE 4.2 instruction sets and will fail without them.
There is a check in main(), but that happens after the code is running and it may
already be too late. Add a check in scylla_prepare which runs before the main
executable.
2019-08-29 15:34:29 +03:00
Pekka Enberg
118a141f5d scylla_blocktune.py: Kill btrfs related FIXME
The scylla_blocktune.py has a FIXME for btrfs from 2016, which is no
longer relevant for Scylla deployments, as Red Hat dropped support for
the file system in 2017.

Message-Id: <20190823114013.31112-1-penberg@scylladb.com>
2019-08-24 20:40:08 +03:00
Vlad Zolotarov
15eaf2fd8e dist: scylla_util.py: get_mode_cpuset(): don't let false alarm error messages
Don't let perftune.py print false alarm error message when we calculate
a compute CPU set for tuning modes.

This may happen when we calculate a CPU set for non-MQ tuning modes on
small systems on which these modes are forbidden because they would
result in a zero CPU set, e.g. sq_split on a system with a single
physical core.

We are going to utilize a newly introduced --get-cpu-mask-quiet execution
mode introduced to the seastar/script/perftune.py by the
"perftune.py: introduce --get-cpu-mask-quiet" series which would return
a zero CPU set if that's what it turns out to be instead of exiting with
an error what --get-cpu-mask would do in such a case.

The rest of scylla_util.py logic is going to handle a zero CPU set
returned by get_mode_cpuset() correctly.

Fixes #4211
Fixes #4443

Signed-off-by: Vlad Zolotarov <vladz@scylladb.com>
Message-Id: <20190731212901.9510-1-vladz@scylladb.com>
2019-08-01 11:14:39 +03:00
Amos Kong
f0cd589a75 dist: suppress the yaml load warning
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe. Please read https://msg.pyyaml.org/load
for full details.

Fix it by use new safe interface - yaml.safe_load()

Signed-off-by: Amos Kong <amos@scylladb.com>
Cc: Vlad Zolotarov <vladz@scylladb.com>
Message-Id: <9b68601845117274573474ede0341cc81f80efa6.1561156205.git.amos@scylladb.com>
2019-06-25 19:05:29 +03:00
Takuya ASADA
7320c966bc dist/common/scripts/scylla_setup: don't proceed with empty NIC name
Currently NIC selection prompt on scylla_setup just proceed setup when
user just pressed Enter key on the prompt.
The prompt should ask NIC name again until user input correct NIC name.

Fixes #4517
Message-Id: <20190617124925.11559-1-syuu@scylladb.com>
2019-06-17 15:52:29 +03:00
Takuya ASADA
f582a759ee dist: merge /usr/lib/scylla to /opt/scylladb
We used to use /opt/scylladb just for Scylla build toolchain and
dependency libraries, not for Scylla main package.
But since we merged relocatable package, Scylla main binary and
dependency libraries are all located under /opt/scylladb, only
setup scripts remained on /usr/lib/scylla.
It strange to keep using both /usr/lib/<app name> and /opt/<app name>,
we should merge them into single place.

Message-Id: <20190614011038.17827-1-syuu@scylladb.com>
2019-06-14 21:03:36 +03:00
Takuya ASADA
60d8a99f05 dist/common/scripts/scylla_setup: verify system umask is acceptable for scylla-server
To avoid 'Bad permmisons' error when user changed default umask, we need
to verify system umask is acceptable for scylla-server.

Fixes #4157

Message-Id: <20190612130343.6043-1-syuu@scylladb.com>
2019-06-12 20:29:06 +03:00
Glauber Costa
71c4375a66 scylla_io_setup: adjust values for i3en instances
Apparently we are having some issues running iotune in the i3en instances,
as the values not always make sense. We believe it is something that XFS
is doing, and running fio directly on the device (no filesystem) provides
more meaningful results (more according to AWS published expected values).

For now, let's use fio instead. In this patch I have ran fio for our 4
dimensions in each of the three types of disks (large, xlarge, 3xlarge).

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190524111454.27956-1-glauber@scylladb.com>
2019-05-24 19:37:58 +03:00
Glauber Costa
3b64727244 scylla_setup: be nicer about unrecognized OS
Right now if the user tries to execute this in an unrecognized OS, the
following will be thrown:

  Traceback (most recent call last):
   File "/usr/lib/scylla/libexec/scylla_setup", line 214, in <module>
     do_verify_package('scylla-enterprise-jmx')
   File "/usr/lib/scylla/libexec/scylla_setup", line 73, in do_verify_package
     if res != 0:
  UnboundLocalError: local variable 'res' referenced before assignment

It would be a lot nicer to exit gracefully and print a messge saying what
is going on. This was caught when running on OEL, which the previous patch
fixed. Still, there are other unknown OS out there the users may try to run
on.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
2019-05-13 14:31:49 -04:00
Glauber Costa
6c15ae5b36 scylla_util: recognize OEL as part of the RHEL family
Oracle Linux is a RHEL-like distribution and we support it just fine, but our
new incarnation of scylla_setup is failing to recognize it.

os-release for OEL is a bit different. It doesn't have an ID_LIKE string, and
only shows an ID string, which is set to 'ol'. So let's recognize this.

Fixes: #4493
Branches: 3.1
Signed-off-by: Glauber Costa <glauber@scylladb.com>
2019-05-13 14:31:38 -04:00
Glauber Costa
a23531ebd5 Support AWS i3en instances
AWS just released their new instances, the i3en instances.  The instance
is verified already to work well with scylla, the only adjustments that
we need is advertise that we support it, and pre-fill the disk
information according to the performance numbers obtained by running the
instance.

Fixes #4486
Branches: 3.1

Signed-off-by: Glauber Costa <glauber@scylladb.com>
Message-Id: <20190508170831.6003-1-glauber@scylladb.com>
2019-05-08 20:09:44 +03:00
JP-Reddy
56420dc650 scylla_io_setup: TypeError in iotune_args array from scylla_io_setup script
Whenever the iotune_args array uses "--smp", it needs cpudata.smp()
which returns an integer instead of a string. So when iotune_args is
passed to subprocess.check_call(), it actually throws "TypeError:
expected str, bytes or os.PathLike object, not int" but
"%s did not pass validation tests, it may not be on XFS..." is shown as
the exception.

Even though the user inputs correct arguments, it might still throw an
error and confuse the user that he/she has not passed the right
arguments.

One simple fix is to use str(cpudata.smp()) instead of cpudata.smp().

Signed-off-by: JP-Reddy <guthijp.reddy@gmail.com>
Message-Id: <20190406070118.48477-1-guthijp.reddy@gmail.com>
2019-05-07 20:13:54 +03:00
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