mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
dist/docker: Add '--io-setup ENABLE' command line option
This adds a '--io-setup N' command line option, which users can pass to specify whether they want to run the "scylla_io_setup" script or not. This is useful if users want to specify I/O settings themselves in environments such as Kubernetes, where running "iotune" is problematic. Fixes #6587
This commit is contained in:
1
dist/docker/redhat/commandlineparser.py
vendored
1
dist/docker/redhat/commandlineparser.py
vendored
@@ -12,6 +12,7 @@ def parse():
|
||||
parser.add_argument('--reserve-memory', default=None, dest='reserveMemory', help="e.g. --reserve-memory 1G to reserve 1 GB of RAM")
|
||||
parser.add_argument('--overprovisioned', default=None, choices=['0', '1'],
|
||||
help="run in overprovisioned environment. By default it will run in overprovisioned mode unless --cpuset is specified")
|
||||
parser.add_argument('--io-setup', default='1', choices=['0', '1'], dest='io_setup', help='Run I/O setup (i.e. iotune) at container startup. Defaults to 1.')
|
||||
parser.add_argument('--listen-address', default=None, dest='listenAddress')
|
||||
parser.add_argument('--rpc-address', default=None, dest='rpcAddress')
|
||||
parser.add_argument('--broadcast-address', default=None, dest='broadcastAddress')
|
||||
|
||||
4
dist/docker/redhat/scyllasetup.py
vendored
4
dist/docker/redhat/scyllasetup.py
vendored
@@ -29,6 +29,7 @@ class ScyllaSetup:
|
||||
self._clusterName = arguments.clusterName
|
||||
self._endpointSnitch = arguments.endpointSnitch
|
||||
self._replaceAddressFirstBoot = arguments.replaceAddressFirstBoot
|
||||
self._io_setup = arguments.io_setup
|
||||
|
||||
def _run(self, *args, **kwargs):
|
||||
logging.info('running: {}'.format(args))
|
||||
@@ -61,7 +62,8 @@ class ScyllaSetup:
|
||||
if not os.path.exists(data_dir):
|
||||
os.makedirs(data_dir)
|
||||
|
||||
self._run(['/opt/scylladb/scripts/scylla_io_setup'])
|
||||
if self._io_setup == "1":
|
||||
self._run(['/opt/scylladb/scripts/scylla_io_setup'])
|
||||
|
||||
def cqlshrc(self):
|
||||
home = os.environ['HOME']
|
||||
|
||||
@@ -243,6 +243,20 @@ For example, to enable optimizations for running in an statically partitioned en
|
||||
$ docker run --name some-scylla -d scylladb/scylla --overprovisioned 0
|
||||
```
|
||||
|
||||
### `--io-setup ENABLE`
|
||||
|
||||
The `--io-setup` command line option specifies if the `scylla_io_setup` script is run when the container is started for the first time.
|
||||
This is useful if users want to specify I/O settings themselves in environments such as Kubernetes, where running `iotune` is problematic.
|
||||
The default of `--io-setup` is `1`, which means I/O setup is run.
|
||||
|
||||
For example, to skip running I/O setup:
|
||||
|
||||
```console
|
||||
$ docker run --name some-scylla -d scylladb/scylla --io-setup 0
|
||||
```
|
||||
|
||||
**Since: 4.3**
|
||||
|
||||
### `--cpuset CPUSET`
|
||||
|
||||
The `--cpuset` command line option restricts Scylla to run on only on CPUs specified by `CPUSET`.
|
||||
|
||||
Reference in New Issue
Block a user