Takuya ASADA
4df982fe07
dist/common/scripts/scylla_sysconfig_setup: fix typo
...
Signed-off-by: Takuya ASADA <syuu@scylladb.com >
Message-Id: <20180705133313.16934-1-syuu@scylladb.com >
2018-07-05 16:38:14 +03:00
Alexys Jacob
8c03c1e2ce
Support Gentoo Linux on node_health_check script.
...
Gentoo Linux was not supported by the node_health_check script
which resulted in the following error message displayed:
"This s a Non-Supported OS, Please Review the Support Matrix"
This patch adds support for Gentoo Linux while adding a TODO note
to add support for authenticated clusters which the script does
not support yet.
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org >
Message-Id: <20180703124458.3788-1-ultrabug@gentoo.org >
2018-07-03 20:18:13 +03:00
Takuya ASADA
d0f39ea31d
dist/common/scripts/scylla_raid_setup: verify specified disks are unused
...
Currently only scylla_setup interactive mode verifies selected disks are
unused, on non-interactive mode we get mdadm/mkfs.xfs program error and
python backtrace when disks are busy.
So we should verify disks are unused also on scylla_raid_setup, print
out simpler error message.
2018-07-03 14:50:34 +09:00
Takuya ASADA
3289642223
dist/common/scripts/scylla_raid_setup: add --force-raid to construct raid even only one disk is specified
...
User may want to start RAID volume with only one disk, add an option to
force constructing RAID even only one disk specified.
2018-07-03 14:50:34 +09:00
Takuya ASADA
e0c16c4585
dist/common/scripts/scylla_setup: don't accept disk path if it's not block device
...
Need to ignore input when specified path is not block device.
2018-07-03 14:50:34 +09:00
Takuya ASADA
24ca2d85c6
dist/common/scripts/scylla_raid_setup: verify specified disk paths are block device
...
Verify disk paths are block device, exit with error if not.
2018-07-03 14:50:34 +09:00
Takuya ASADA
99b5cf1f92
dist/common/scripts/scylla_sysconfig_setup: verify NIC existance
...
Verify NIC existance before writing sysconfig file to prevent causing
error while running scylla.
See #2442
2018-07-03 14:50:34 +09:00
Takuya ASADA
972ce88601
dist/common/scripts/scylla_setup: allow input multiple disk paths on RAID disk prompt
...
Allow "/dev/sda1,/dev/sdb1" style input on RAID disk prompt.
2018-06-29 01:37:19 +09:00
Takuya ASADA
a83c66b402
dist/common/scripts/scylla_raid_setup: skip constructing RAID0 when only one disk specified
...
When only one disk specified, create XFS directly on the disk instead of
creating RAID0 volume on the disk.
2018-06-29 01:37:19 +09:00
Takuya ASADA
99fb754221
dist/common/scripts/scylla_raid_setup: fix module import
...
sys module was missing, import it.
Fixes #3548
2018-06-29 01:37:19 +09:00
Takuya ASADA
f2132c61bd
dist/common/scripts/scylla_setup: check disk is used in MDRAID
...
Check disk is used in MDRAID by /proc/mdstat.
2018-06-29 01:37:19 +09:00
Takuya ASADA
daccc10a06
dist/common/scripts/scylla_setup: move unmasking scylla-fstrim.timer on scylla_fstrim_setup
...
Currently, enabling scylla-fstrim.timer is part of 'enable-service', it
will be enabled even --no-fstrim-setup specified (or input 'No' on interactive setup prompt).
To apply --no-fstrim-setup we need to enabling scylla-fstrim.timer in
scylla_fstrim_setup instead of enable-service part of scylla_setup.
Fixes #3248
2018-06-29 01:37:19 +09:00
Takuya ASADA
fa6db21fea
dist/common/scripts/scylla_setup: use print() instead of logging.error()
...
Align with other script scripts, use print().
2018-06-29 01:37:19 +09:00
Takuya ASADA
2401115e14
dist/common/scripts/scylla_setup: implement do_verify_package() for Gentoo Linux
...
Implement Gentoo Linux support on scylla_setup.
2018-06-29 01:37:19 +09:00
Takuya ASADA
9d537cb449
dist/common/scripts/scylla_coredump_setup: run os.remove() when deleting directory is symlink
...
Since shutil.rmtree() causes exception when running on symlink, we need
to check the path is symlink, run os.remove() when it symlink.
Fixes #3544
2018-06-29 01:37:19 +09:00
Takuya ASADA
5b4da4d4bd
dist/common/scripts/scylla_setup: don't include the disk on unused list when it contains partitions
...
On current implementation, we are checking the partition is mounted, but
a disk contains the partition marked as unused.
To avoid the problem, we should skip a disk which contains partitions.
Fixes #3545
2018-06-29 01:37:19 +09:00
Takuya ASADA
83bc72b0ab
dist/common/scripts/scylla_setup: skip running rest of the check when the disk detected as used
...
Don't need to run check when we already detected the disk as used.
2018-06-29 01:37:19 +09:00
Takuya ASADA
1650d37dae
dist/common/scripts/scylla_setup: add a disk to selected list correctly
...
When a disk path typed on the RAID setup prompt, the script mistakenly
splits the input for each character,
like ['/', 'd', 'e', 'v', '/', 's', 'd', 'b'].
To fix the issue we need to use selected.append() instead of
selected +=.
See #3545
2018-06-29 01:37:19 +09:00
Takuya ASADA
4b5826ff5a
dist/common/scripts/scylla_setup: fix wrong indent
...
list_block_devices() should return 'devices' on both re.match() is
matched and unmatched.
2018-06-29 01:37:19 +09:00
Takuya ASADA
f828c5c4f3
dist/common/scripts: sync instance type list for detect NIC type to latest one
...
Current instance type list is outdated, sync with latest table from:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking
Fixes #3536
2018-06-29 01:37:19 +09:00
Takuya ASADA
6cffb164d6
dist/common/scripts: verify systemd unit existance using 'systemctl cat'
...
Verify unit existance by running 'systemctl cat {}' silently, raise
exception if the unit doesn't exist.
2018-06-29 01:37:19 +09:00
Takuya ASADA
ca52407fd6
dist/common/scripts: convert scylla_kernel_check to python3
...
Convert bash script to python3.
2018-06-22 12:31:12 +09:00
Takuya ASADA
5efbb714ff
dist/common/scripts: convert scylla_ec2_check to python3
...
Convert bash script to python3.
2018-06-22 12:30:59 +09:00
Takuya ASADA
d0b9464dc7
dist/common/scripts: convert scylla_sysconfig_setup to python3
...
Convert bash script to python3.
2018-06-22 12:30:49 +09:00
Takuya ASADA
d3a3d0f8de
dist/common/scripts: convert scylla_setup to python3
...
Convert bash script to python3.
2018-06-22 12:30:37 +09:00
Takuya ASADA
8030e89725
dist/common/scripts: convert scylla_selinux_setup to python3
...
Convert bash script to python3.
2018-06-22 12:30:29 +09:00
Takuya ASADA
8cfc4f1c3d
dist/common/scripts: convert scylla_raid_setup to python3
...
Convert bash script to python3.
2018-06-22 12:30:19 +09:00
Takuya ASADA
63a287b7d4
dist/common/scripts: convert scylla_ntp_setup to python3
...
Convert bash script to python3.
2018-06-22 12:30:10 +09:00
Takuya ASADA
01eea76a4e
dist/common/scripts: convert scylla_fstrim_setup to python3
...
Convert bash script to python3.
2018-06-22 12:29:56 +09:00
Takuya ASADA
5e07567c60
dist/common/scripts: convert scylla_dev_mode_setup to python3
...
Convert bash script to python3.
2018-06-22 12:29:44 +09:00
Takuya ASADA
ccc6dbf6c7
dist/common/scripts: convert scylla_cpuset_setup to python3
...
Convert bash script to python3.
2018-06-22 12:29:25 +09:00
Takuya ASADA
7fd81510a4
dist/common/scripts: convert scylla_cpuscaling_setup to python3
...
Convert bash script to python3.
2018-06-22 12:29:04 +09:00
Takuya ASADA
e858674a79
dist/common/scripts: convert scylla_coredump_setup to python3
...
Convert bash script to python3.
2018-06-22 12:28:50 +09:00
Takuya ASADA
b3ee02dd1e
dist/common/scripts: convert scylla_bootparam_setup to python3
...
Convert bash script to python3.
2018-06-22 12:27:56 +09:00
Takuya ASADA
2a4ba883c8
dist/common/scripts: extend scylla_util.py to convert setup scripts to python3
...
To porting setup scripts to python3, following utility functions/classes
introduced:
- run(): execute command line, returns return code
- out(): execute command line, returns stdout as string
- is_debian_variant() / is_redhat_variant() / is_gentoo_variant()
/ is_ec2() / is_systemd(): detect specific environment
- hex2list(): implement hex2list.py code as a function
- makedirs(): same as os.makedirs() but do nothing when dir is exists
- dist_name() / dist_ver(): alias of platform.dist()
- class systemd_unit: an utility to control systemd unit using systemctl
- class sysconfig_parser: reader/writer of /etc/sysconfig files
- class concolor: ANSI color escape sequences list
2018-06-22 12:21:37 +09:00
Takuya ASADA
b7c980ac56
dist/common/scripts: convert scylla_io_setup and scylla_util.py to python3
...
To share scylla_util.py with python3 converted setup scripts, these
scripts need to be python3 too.
2018-06-22 12:11:27 +09:00
Avi Kivity
f912eefbe2
Merge "Fix numerous issues in AMI related scriptology" from Vlad
...
"
A few fixes in scripts that were found when debugging #3508 .
This series fixed this issue.
"
Fixes #3508
* 'ami_scripts_fixes-v1' of https://github.com/vladzcloudius/scylla :
scylla_io_setup: properly define the disk_properties YAML hierarchy
scylla_io_setup: fix a typo: s/write_bandwdith/write_bandwidth/
scylla_io_setup: hardcode the "mountpoint" YAML node to "/var/lib/scylla" for AMIs
scylla_io_setup: print the io_properties.yaml file name and not its handle info
scylla_lib.sh: tolerate perftune.py errors
2018-06-19 19:31:23 +03:00
Takuya ASADA
3f8719d67e
dist/common/scripts/scylla_coredump_setup: fix typo
...
Correct function name is "is_debian_variant", not "is_debian_variants"
Fixed #3507
Signed-off-by: Takuya ASADA <syuu@scylladb.com >
Message-Id: <20180612155353.28229-1-syuu@scylladb.com >
2018-06-15 12:11:52 +01:00
Takuya ASADA
9971576ecb
dist: drop collectd support from package
...
Since scyllatop no longer needs collectd, now we are able to drop collectd.
resolves #3490
Signed-off-by: Takuya ASADA <syuu@scylladb.com >
Message-Id: <1528961612-8528-1-git-send-email-syuu@scylladb.com >
2018-06-14 10:40:23 +03:00
Vlad Zolotarov
0004c29aba
scylla_io_setup: properly define the disk_properties YAML hierarchy
...
disk_properties map should be an entry in the 'disk' list hierarchy.
Currently this list is going to containe a single element.
Signed-off-by: Vlad Zolotarov <vladz@scylladb.com >
2018-06-12 19:14:22 -04:00
Vlad Zolotarov
038b2f3be2
scylla_io_setup: fix a typo: s/write_bandwdith/write_bandwidth/
...
Signed-off-by: Vlad Zolotarov <vladz@scylladb.com >
2018-06-12 18:54:34 -04:00
Vlad Zolotarov
26277e5973
scylla_io_setup: hardcode the "mountpoint" YAML node to "/var/lib/scylla" for AMIs
...
Signed-off-by: Vlad Zolotarov <vladz@scylladb.com >
2018-06-12 15:51:10 -04:00
Vlad Zolotarov
77463ddc3b
scylla_io_setup: print the io_properties.yaml file name and not its handle info
...
In order to get a file name from the given file() handle one should use
a file_handle.name property.
Signed-off-by: Vlad Zolotarov <vladz@scylladb.com >
2018-06-12 15:25:55 -04:00
Vlad Zolotarov
aa3d9c38b5
scylla_lib.sh: tolerate perftune.py errors
...
When we check the currently configured tuning mode perftune.py is allowed
to return an error. get_tune_mode() has to be able to tolerate them.
Signed-off-by: Vlad Zolotarov <vladz@scylladb.com >
2018-06-12 14:21:26 -04:00
Takuya ASADA
db9074707a
dist/debian: switch to systemd-coredump on Debian 9
...
Debian 9 has newer systemd that supports systemd-coredump, so enable it.
2018-06-06 15:04:31 +09:00
Takuya ASADA
30386ed215
dist/debian: rename 99-scylla.conf to 99-scylla-coredump.conf
...
Since 99-scylla.conf is only used for setting coredump handler, rename
it to 99-scylla-coredump.conf.
2018-06-06 14:59:32 +09:00
Takuya ASADA
60844ae67b
dist/common/scripts/scylla_coredump_setup: don't run sysctl on Ubuntu 18.04
...
Since 99-scylla.conf is not included on Ubuntu 18.04, skip running it.
Fixes #3494
Signed-off-by: Takuya ASADA <syuu@scylladb.com >
Message-Id: <20180605093619.9197-1-syuu@scylladb.com >
2018-06-05 12:47:46 +03:00
Amos Kong
364c2551c8
scylla_setup: fix conditional statement of silent mode
...
Commit 300af65555 introdued a problem in
conditional statement, script will always abort in silent mode, it doesn't
care about the return value.
Fixes #3485
Signed-off-by: Amos Kong <amos@scylladb.com >
Message-Id: <1c12ab04651352964a176368f8ee28f19ae43c68.1528077114.git.amos@scylladb.com >
2018-06-04 10:14:06 +03:00
Laura Novich
e053da6f51
scylla_setup: adjust language
...
Edited the text for the scylla setup, improving readability for the prompts
with regards to grammar and usage.
Signed-off by: Laura Novich <laura@scylladb.com >
Message-Id: <CAGcEH3Xa6TFy=_rdz_=NP0b23vEDZmfRQzAdxV-f04C1p+AzTw@mail.gmail.com >
2018-05-29 09:56:41 +03:00
Takuya ASADA
300af65555
dist/common/scripts/scylla_setup: abort running script when one of setup failed in silent mode
...
Current script silently continues even one of setup fails, need to
abort.
Fixes #3433
Signed-off-by: Takuya ASADA <syuu@scylladb.com >
Message-Id: <20180522180355.1648-1-syuu@scylladb.com >
2018-05-23 11:05:33 +03:00