Commit Graph

64 Commits

Author SHA1 Message Date
Takuya ASADA
48d72c01d1 dist: don't run iotune on developer mode 2016-02-29 20:13:46 +09:00
Takuya ASADA
e8a107de43 dist: install example io.conf by default
Prevent error on 'EnvironmentFile=/etc/scylla.d/*.conf'.
Parameters are commented out, and the file will replace when scylla starts, by scylla-io-setup.service.
2016-02-29 20:12:54 +09:00
Takuya ASADA
84447fd7b0 dist: permission error fixed on scylla_io_setup
Can't be scylla user since we are writing to /etc

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1456330209-5828-1-git-send-email-syuu@scylladb.com>
2016-02-29 11:35:38 +02:00
Takuya ASADA
b79a1a77da Revert "dist: update SCYLLA_IO with params for AMI"
This reverts commit 5494135ddd.

Conflicts:
	dist/common/scripts/scylla_sysconfig_setup
2016-02-24 03:45:11 +09:00
Takuya ASADA
643beefc8c Revert "Revert "dist: remove AMI entry from sysconfig, since there is no script refering it""
This reverts commit 21e6720988.
2016-02-24 03:33:50 +09:00
Takuya ASADA
66c5feb9e9 Revert "dist: align ami option with others (-a --> --ami)"
This reverts commit 312f1c9d98.
2016-02-24 03:33:41 +09:00
Takuya ASADA
a9926f1cea dist: introduce scylla-io-setup.service to setup io parameters on first startup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-24 03:33:03 +09:00
Shlomi Livne
312f1c9d98 dist: align ami option with others (-a --> --ami)
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
Message-Id: <c159aac7f0478aba34d4398a2eb8ea71285ede21.1456052976.git.shlomi@scylladb.com>
2016-02-21 15:06:20 +02:00
Shlomi Livne
21e6720988 Revert "dist: remove AMI entry from sysconfig, since there is no script refering it"
This reverts commit 54f9e59006.

AMI is needed to setting up io params

Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
Message-Id: <4154a000f019059f740319cfa2fbf875568770b7.1456052976.git.shlomi@scylladb.com>
2016-02-21 15:06:20 +02:00
Takuya ASADA
2d429e602a dist: interactive scylla_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
a860e4baae dist: remove AMI initialization code from scylla_setup, move to scylla-ami
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
d7a03676e3 dist: don't ignore posix_net_conf.sh error
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
684447d3ab dist: long options for scylla_sysconfig_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
7861871c1b dist: long options for scylla_raid_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
889c4706fc dist: long options for scylla_ntp_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
2804e394a6 dist: long options for scylla_coredump_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:08 +09:00
Takuya ASADA
c12d95afe0 dist: add options to skip running setups on scylla_setup, support long options
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:34:05 +09:00
Takuya ASADA
dc9012d5a4 dist: move selinux setup code to scylla_selinux_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:33:01 +09:00
Takuya ASADA
54f9e59006 dist: remove AMI entry from sysconfig, since there is no script refering it
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:33:01 +09:00
Takuya ASADA
9b8f45d5b7 dist: don't use -a option for scylla_bootparam_setup since it was removed
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:33:01 +09:00
Takuya ASADA
5b742ff447 dist: generalize scylla_ntp_setup, drop '-a' option (means AMI) from it
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-02-17 07:28:38 +09:00
Shlomi Livne
5494135ddd dist: update SCYLLA_IO with params for AMI
Add setting of --num-io-queues, --max-io-requests for AMI

Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
Message-Id: <b94a63154a91c8568e194d7221b9ffc7d7813ebc.1455188901.git.shlomi@scylladb.com>
2016-02-11 17:01:02 +02:00
Shlomi Livne
d8cdf76e70 dist: change setting of scylla home from "-d" to "-r"
Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
Message-Id: <53dcd9d1daa0194de3f889b67788d9c21d1e474d.1455188901.git.shlomi@scylladb.com>
2016-02-11 17:00:37 +02:00
Takuya ASADA
16e6db42e1 dist: abandon to start scylla-server when it's disabled from AMI userdata
Support AMi's --stop-services, prevent startup scylla-server (and scylla-jmx, since it's dependent on scylla-server)

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1454492729-11876-1-git-send-email-syuu@scylladb.com>
2016-02-11 12:21:08 +02:00
Takuya ASADA
111dc19942 dist: construct scylla.yaml on first startup of AMI instance, not AMI image creation time
Install scylla-ami-setup.service, stop calling scylla_sysconfig_setup on AMI.
scylla-ami-setup.service will call it instead.
Only works with scylla-ami fix.
Fixes #857

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-30 15:48:45 -05:00
Takuya ASADA
71a26e1412 dist: don't need AMI_KEEP_VERSION anymore, since we fixed the issue that 'yum update' mistakenly replaces scylla development version with release version
It actually doesn't called unconditionally now, (since $LOCAL_PKG is always empty) so we can safely remove this.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-30 15:47:05 -05:00
Takuya ASADA
f9d32346ef dist: scylla_sysconfig_setup uses current sysconfig values as default value
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-30 15:46:21 -05:00
Takuya ASADA
4d5baef3e3 dist: keep original SCYLLA_ARGS when updating sysconfig
Since we dropped scylla_run, now default SCYLLA_ARGS parameter is not empty.
So we need to support it.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-30 15:44:03 -05:00
Takuya ASADA
f33656ef03 dist: eliminate startup script
Fixes #373

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453910311-24928-1-git-send-email-syuu@scylladb.com>
2016-01-27 18:45:35 +02:00
Takuya ASADA
89f0fc89b4 dist: set ulimit in upstart job
Upstart job able to specify ulimit like systemd, so drop ubuntu's scylla_run and merge with redhat one.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-27 23:29:52 +09:00
Takuya ASADA
9b66d00115 dist: fix scylla_bootparam_setup for Ubuntu
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453836012-6436-1-git-send-email-syuu@scylladb.com>
2016-01-26 21:24:20 +02:00
Takuya ASADA
12748cf1b9 dist: support CentOS AMI on scylla_ntp_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453801319-26072-1-git-send-email-syuu@scylladb.com>
2016-01-26 12:55:08 +02:00
Takuya ASADA
aef1e67a9b dist: remove mdadm,xfsprogs from dependencies, install it when constructing RAID by scylla_raid_setup
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453422886-26297-2-git-send-email-syuu@scylladb.com>
2016-01-24 12:10:41 +02:00
Takuya ASADA
b9cb91e934 dist: stop ntpd before running ntpdate
New CentOS Base Image runs ntpd by default, so shutdown it before running ntpdate.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453241256-23338-3-git-send-email-syuu@scylladb.com>
2016-01-20 09:40:35 +02:00
Takuya ASADA
98e61a93ef dist: disable SELinux only when it enabled
New CentOS7 Base Image disabled SELinux by default, and running 'setenforce 0' on the image causes error, we won't able to build AMI.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453241256-23338-2-git-send-email-syuu@scylladb.com>
2016-01-20 09:40:01 +02:00
Takuya ASADA
d5d5857b62 dist: extend coredump size limit
16GB is not enough for some larger machines, so extend it.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1453115792-21989-2-git-send-email-syuu@scylladb.com>
2016-01-18 13:38:43 +02:00
Takuya ASADA
a1d1d0bd06 Revert "dist: prevent 'local rpm' AMI image update to older version of scylla package by yum update"
This reverts commit b28b8147a0.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1452592877-29721-2-git-send-email-syuu@scylladb.com>
2016-01-12 12:26:09 +02:00
Takuya ASADA
b28b8147a0 dist: prevent 'local rpm' AMI image update to older version of scylla package by yum update
Since yum command think development version is older than release version, we need it.
2016-01-11 14:22:13 +00:00
Takuya ASADA
8886fe7393 dist: use systemd-coredump on Fedora/CentOS, create symlink /var/lib/scylla/coredump -> /var/lib/systemd/coredump when we mounted RAID
Use systemd-coredump for coredump if distribution is CentOS/RHEL/Fedora, and make symlink from RAID to /var/lib/systemd/coredump if RAID is mounted.
2016-01-11 14:20:50 +00:00
Takuya ASADA
927957d3b9 dist: since AMI uses XFS rootfs, we don't need to warn extra disks not attached to the AMI instance
Even extra disks are not supplied, it's stil valid since we have XFS rootfs now.
2016-01-11 14:19:35 +00:00
Takuya ASADA
47be3fd866 dist: split scylla_install script to two parts, scylla_install_pkg is for installing .rpm/.deb packages, scylla_setup is for setup environment after package installed
This enables to setup RAID/NTP/NIC after .rpm/.deb package installed.
2016-01-11 14:19:29 +00:00
Takuya ASADA
b3c85aea89 dist: switch AMI base image from Fedora to CentOS
Move AMI to CentOS, use XFS for rootfs
2016-01-11 14:18:30 +00:00
Lucas Meneghel Rodrigues
8ef9a60c09 dist/common/scripts/scylla_prepare: Change message to error
Recently, Scylla was changed to mandate the use of XFS
for its data directories, unless the flag --developer-mode true
is provided. So during the AMI setup stage, if the user
did not provide extra disks for the setup scripts to prepare,
the scylla service will refuse to start. Therefore, the
message in scylla_prepare has to be changed to an actual
error message, and the file name, to be changed to
something that reflects the event that happened.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@scylladb.com>
2016-01-05 09:23:57 +02:00
Shlomi Livne
aebeb95342 Fix error: no integer expression expected in AMI creation
The script imports the /etc/sysconfig/scylla-server for configuration
settings (NR_PAGES). The /etc/sysconfig/scylla-server iincludes an AMI
param which is of string value and called as a last step in
scylla_install (after scylla_bootparam_setup has been initated).

The AMI variable is setup in scylla_install and is used in multiple
scripts. To resolve the conflict moving the import of
/etc/sysconfig/scylla-server after the AMI variable has been compared.

Fixes: #744

Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2016-01-04 15:23:01 +02:00
Takuya ASADA
6e8dd00535 dist: apply limits settings correctly on Ubuntu
Fixes #738

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2016-01-02 12:20:18 +02:00
Shlomi Livne
6316fedc0a Make sure the directory we are writting coredumps to exists
After upgrading an AMI and trying to stop and start a machine the
/var/lib/scylla/coredump is not created. Create the directory if it does
not exist prior to generating core

Signed-off-by: Shlomi Livne <shlomi@scylladb.com>
2015-12-31 13:21:39 +02:00
Lucas Meneghel Rodrigues
43d39d8b03 scylla_coredump_setup: Don't call yum on scylla server spec file
The script scylla_coredump_setup was introduced in
9b4d0592, and added to the scylla rpm spec file, as a
post script. However, calling yum when there's one
yum instance installng scylla server will cause a deadlock,
since yum waits for the yum lock to be released, and the
original yum process waits for the script to end.

So let's remove this from the script. Debian shouldn't be
affected, since it was never added to the debian build
rules (to the best of my knowlege, after analyzing 9b4d0592),
hence I did not remove it. It should cause the same problem
with apt-get in case it was used.

CC: Takuya ASADA <syuu@scylladb.com>
[ penberg: Rebase and drop statement about 'abrt' package not in Fedora. ]
Signed-off-by: Lucas Meneghel Rodrigues <lmr@scylladb.com>
2015-12-30 09:38:36 +02:00
Takuya ASADA
0abcf5b3f3 dist: use readable time format on coredump file, instead of unix time
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2015-12-28 09:55:05 +02:00
Takuya ASADA
940c34b896 dist: don't abort scylla_coredump_setup when 'yum remove abrt' failed
It always fail when abrt is not installed.
This also fixes build_ami.sh failing because of this error.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2015-12-28 09:40:57 +02:00
Takuya ASADA
7f4a1567c6 dist: support non-ami boot parameter setup, add parameters for preallocate hugepages on boot-time
Fixes #172

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
2015-12-27 17:56:49 +02:00