summaryrefslogtreecommitdiffstats
path: root/src/init-ceph.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sysvinit: create /var/run/ceph before pidElena Chernikova2021-09-271-5/+4
| | | | | | | | /var/run is mounted as tmpfs and will be cleared after reboot. On sysvinit ceph init service creates this directory for pid with root ownership. Fixes: https://tracker.ceph.com/issues/19242 Signed-off-by: Elena Chernikova <elena.chernikoff@gmai.com>
* vstart,init-ceph: include build bin/ in $PATHSage Weil2021-03-051-0/+2
| | | | | | This allows mgr/cephadm to run radosgw-admin. Signed-off-by: Sage Weil <sage@newdream.net>
* init-ceph: fix python and library paths for vstartSage Weil2021-01-221-3/+3
| | | | | | | The current version does not result in a functional mgr after restarting from a vstart cluster. Signed-off-by: Sage Weil <sage@newdream.net>
* src,qa: install python bindings into lib/cython_modules/lib.3Kefu Chai2019-12-191-1/+1
| | | | | | instead of checking for the WITH_PYTHON* options, just hardwire to lib.3 Signed-off-by: Kefu Chai <kchai@redhat.com>
* allow for multiple "build" dirs to existYuval Lifshitz2019-09-061-1/+3
| | | | Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
* init-ceph: wait longer before resending $signalKefu Chai2019-04-021-1/+1
| | | | | | | | | | | if ceph-osd takes longer than 1 seconds to unmount the objectstore, it won't get a chance to fully persist all of its stuff to disk before init-ceph kills it again. in my case, `MemStore::_save()` fails to write $path/collections before it gets killed, if it has more than 512 PGs. Signed-off-by: Kefu Chai <kchai@redhat.com>
* init-ceph: remove ceph-diskAlfredo Deza2018-06-131-9/+0
| | | | Signed-off-by: Alfredo Deza <adeza@redhat.com>
* init-ceph: s/lib.2/lib.$MGR_PYTHON_VERSION_MAJOR/Kefu Chai2018-02-111-1/+1
| | | | | | | we should not hardwire cython_modules's path to lib.2, it should be cython_modules/lib.3 if ceph-mgr requires python3. Signed-off-by: Kefu Chai <kchai@redhat.com>
* init-ceph: drop crush location updateSage Weil2018-01-091-21/+0
| | | | | | OSD.cc does this on its own; no need for this script to be involved. Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph: should have a space before "]"Kefu Chai2017-04-261-1/+1
| | | | | | | | otherwise we will have ./bin/init-ceph: 269: [: missing ] Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge pull request #14560 from wjwithagen/wip-wjw-freebsd-init-cephSage Weil2017-04-251-5/+6
|\ | | | | | | | | src/init-ceph.in: allow one((re)?start|stop) as commands Reviewed-by: Jos Collin <jcollin@redhat.com>
| * src/init-ceph.in: allow one((re)?start|stop) as commandsWillem Jan Withagen2017-04-181-5/+6
| | | | | | | | | | | | | | | | | | - One FreeBSD these are the service command to start a service even if the service is not activated in /etc/rc.conf Which will allow ceph-disk and ceph-deploy to start even without setting /etc/rc.conf Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
* | init-ceph: add ceph libraries path to environmentMohamad Gebai2017-04-201-0/+4
|/ | | | | | | These libraries are set in vstart.sh, but not in init-ceph. When init-ceph is not invoked through vstart.sh, library paths are missing. Signed-off-by: Mohamad Gebai <mgebai@suse.com>
* init-ceph: fix ceph user argsSage Weil2017-02-171-1/+1
| | | | | | Broken by 299b7d06ac18c5cd30b8b65c7d25df9fc00287db Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph.in: Make init-ceph work under FreeBSD for init-systemWillem Jan Withagen2017-02-111-2/+12
| | | | | | | | - FreeBSD find does not have printf option - use the packaged getopt in /usr/local - Only apply user-facts when user ceph is available Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
* init-ceph: print trailing n in "status" outputKefu Chai2017-02-101-1/+2
| | | | | | | | | | | | | | | | | the version command is handled by HelpHook, which does not print newline at the end of the returned JSON. so the output of "status" subcommand looks like: === osd.1 === osd.1: running {"version":"Development"}=== osd.2 === osd.2: not running. with this change, a newline is added to the end of version. also use the "daemon" subcommand to talk to the asok, let the "ceph" cli to figure out the asok path. Signed-off-by: Kefu Chai <kchai@redhat.com>
* ceph: when osd_location_hook does not exist, we should exit error.songbaisen2017-01-171-0/+4
| | | | | | | If the user define "osd crush location hook" in ceph.conf, but the osd_location_hook tool does not exist,we should exit error. Signed-off-by:song baisen <song.baisen@zte.com.cn>
* src/init-ceph.in:Remove ceph-create-keys for sysvOwen Synge2016-11-041-16/+0
| | | | | | ceph-create-keys should not be started on boot of mons with sysv init. Signed-off-by: Owen Synge <osynge@suse.com>
* init-ceph: do not use systemd-run in sysvinitVladislav Odintsov2016-07-051-13/+1
| | | | | | | | | | | | | | | | | | | | | `systemd-run` logic in initscripts was introduced because of ticket http://tracker.ceph.com/issues/7627. If we have systemd-based operating system, we should use systemd unit files from systemd directory to start/stop ceph daemons. Otherwise, `daemon()` from `/etc/init.d/functions` on systemd distro starts service in `system.slice` and everything works well. `systemd-run` can not be run on non-systemd distros, so it's not needed on SysV systems. also, ceph-disk is now able to run the "systemctl" to enable and start the ceph-osd, and ceph-deploy is also now playing well with systemd when it comes to ceph-mon and ceph-mds Fixes: http://tracker.ceph.com/issues/16440 Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
* init-ceph - use sbindir, rather than hard coding sbinDaniel Gryniewicz2016-07-011-1/+1
| | | | Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
* init-ceph: make it behave when run from a cmake build dirSage Weil2016-06-241-7/+17
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph.in: remove duplicated wordsLi Peng2016-05-031-1/+1
| | | | Signed-off-by: Li Peng <lip@dtdream.com>
* fix ceph init scriptAlexandre Derumier2016-04-241-1/+1
| | | | | | commit 65963739cd6815b8008282c8f64cd64365662e60 have introduce a bug test variables need to be quoted, or -n always return true, even if variables don't exist
* test: Fix ceph-objectstore-tool test to run manually from src non-cmakeDavid Zafman2016-04-191-2/+1
| | | | | | Fix init-ceph to handle it when CEPH_* values set Signed-off-by: David Zafman <dzafman@redhat.com>
* cmake: ceph_objectstore_tool.py test passingAli Maredia2016-04-151-0/+10
| | | | | | | | | | | Replaced relative paths in shell scripts in test/ceph_objectstore_tool.py and init-ceph.in to work with CEPH_FOO environment variables set in cmake. Also added CEPH_BUILD_DIR environment variable set to CMAKE_BINARY_DIR. It is used in init-ceph and ceph_objectstore_tool.py. Signed-off-by: Ali Maredia <amaredia@redhat.com>
* init-ceph.in: allow case-insensitive true in `osd crush update on start'Eric Cook2016-03-051-2/+2
| | | | | | | I noticed this when openstack/puppet-ceph sliently converted my 'true' to 'True' in ceph.conf. Signed-off-by: Eric Cook llua@gmx.com
* Merge remote-tracking branch 'gh/jewel'Sage Weil2016-03-021-4/+4
|\
| * packaging: move ceph_common.sh and ceph-osd-prestart.sh to /usr/lib/cephNathan Cutler2016-02-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, it makes sense for both ceph_common.sh and ceph-osd-prestart.sh to reside in the same directory: make it so. Second, /usr/lib exists on both RHEL/Fedora and SLE/openSUSE, whereas the later lacks /usr/libexec. To make this less painful, package ceph_common.sh and ceph-osd-prestart.sh in /usr/lib/ceph. Third, allow e.g. FreeBSD to do its own thing by using the $(libexecdir) Autoconf variable (but set it to /usr/lib in the spec file). http://tracker.ceph.com/issues/14687 Fixes: #14687 Signed-off-by: Nathan Cutler <ncutler@suse.com>
* | Merge pull request #7286 from ktdreyer/wip-10587-init-ceph-diskSage Weil2016-02-241-1/+3
|\ \ | |/ |/| | | | | init-ceph.in: skip ceph-disk if it is not present Reviewed-by: Kefu Chai <kchai@redhat.com>
| * init-ceph.in: skip ceph-disk if it is not presentKen Dreyer2016-01-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the ceph-mon vs ceph-osd split packaging, users are expected to have the ceph-mon package installed and not ceph-osd (and vice versa). However, the init script (/etc/init.d/ceph) has a call to `ceph-disk`, which may not be present on the machine. Given that our packaging is not yet split upstream, this bug does not manifest itself currently, because both ceph-mon and ceph-disk are currently in the same "ceph" package. Once we split the packaging, though, this will become an issue. http://tracker.ceph.com/issues/10587 Refs: #10587 Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
* | init-ceph: pass TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES throughSage Weil2016-01-211-2/+4
|/ | | | | | ..when set in the sysconfig/default file. Signed-off-by: Sage Weil <sage@redhat.com>
* Merge pull request #6866 from xiaoxichen/umount_before_mountLoic Dachary2015-12-131-2/+2
|\ | | | | | | | | | | init-ceph: do umount when the path exists. Reviewed-by: Loic Dachary <ldachary@redhat.com>
| * init-ceph: do umount when the path exists.Xiaoxi Chen2015-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the specified mount point is in use, umount it instead of skipping mounting the fs. In previous code , if we forgot that we already mount something unrelated to *this ceph osd * to the particular mount point, we will skip the mount and finally get an error complaining superblock not matching OSD ID. umount & remount is better because 1. If the wrong FS not in use, we can get the right FS we want and make ceph boot smoothly. 2. If the wrong FS is in use, we will get EBUSY on umount, which seems explain the situation more clearly than superblock mismatch. Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
* | Merge pull request #6732 from aalba6675/patch-custom-cluster-nameSage Weil2015-12-111-3/+7
|\ \ | |/ |/| | | | | sysvinit: allow custom cluster names Reviewed-by: Sage Weil <sage@redhat.com>
| * init-ceph.in: Allow custom cluster names during startup.Anthony Alba2015-12-021-3/+7
| | | | | | | | Signed-off-by: Richard Chan <richard@treeboxsolutions.com>
* | init-ceph: fix systemd-run cant't start ceph daemon sometimeswangchaunhong2015-12-011-1/+2
|/ | | | | Fixes: #13474 Signed-off-by: Chuanhong Wang <wang.chuanhong@zte.com.cn>
* src/init-ceph.in: remove unused variablesNathan Cutler2015-11-111-2/+0
| | | | Signed-off-by: Nathan Cutler <ncutler@suse.com>
* src/init-ceph.in: improve usage messageNathan Cutler2015-11-111-4/+20
| | | | Signed-off-by: Nathan Cutler <ncutler@suse.com>
* src/init-ceph.in: process command-line options using getoptNathan Cutler2015-11-111-1/+15
| | | | | | http://tracker.ceph.com/issues/3015 Fixes: #3015 Signed-off-by: Nathan Cutler <ncutler@suse.com>
* make /var/run/ceph 770 ceph:cephSage Weil2015-09-111-1/+1
| | | | | | | This allows members of the ceph group to make librados clients (like the ceph cli and qemu) create sockets in the default /var/run/ceph/* location. Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph: check if /lib/lsb/init-functions existsYan, Zheng2015-08-311-1/+4
| | | | | | On OSX/FreeBSD, /lib/lsb/init-functions does not exist Signed-off-by: Yan, Zheng <zyan@redhat.com>
* init-ceph: don't use procfs to check if daemon is runningYan, Zheng2015-08-311-4/+4
| | | | | | use ps(1) instead, which is portable Signed-off-by: Yan, Zheng <zyan@redhat.com>
* init-ceph: replace 'echo -n' with printfYan, Zheng2015-08-311-5/+5
| | | | | | 'echo -n' is no portable. On OSX, output of 'echo -n' can be '-n' Signed-off-by: Yan, Zheng <zyan@redhat.com>
* debian: /var/run/ceph should be owned by ceph:cephSage Weil2015-08-271-1/+4
| | | | | | | | Fix upstart and sysvinit scripts to create /var/run/ceph properly. Chown existing dir on upgrade. Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph.in: Set ceph user and group when running the daemonsBoris Ranto2015-08-271-2/+2
| | | | Signed-off-by: Boris Ranto <branto@redhat.com>
* init-ceph.in: set executable bitJohn Spray2015-08-101-0/+0
| | | | | | | | | Scripts expect the generated init-ceph script to be +x, and CMake does that if the file you feed into it is +x. This matches what we already do with ceph.in. Signed-off-by: John Spray <john.spray@redhat.com>
* init-ceph, ceph-osd-prestart: set osd weight with more precisionSage Weil2015-06-021-1/+1
| | | | | | | Our fixed point weights can go down to .0001 -- allow that. Fixes: #11500 Signed-off-by: Sage Weil <sage@redhat.com>
* init-ceph.in: Create osd data dir before fs_type check.huangjun2015-05-161-0/+1
| | | | | | | One host in cluster crashed and rebuilded, but failed to start osds because the data dir not exist. Signed-off-by: huangjun <hjwsm1989@gmail.com>
* init-ceph.in: add $PWD to PATH if running as ./init-cephJoao Eduardo Luis2015-02-041-0/+5
| | | | | | | ceph-mon needs crushtool in PATH and dev environments may not have crushtool in the system's PATH. Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
* init-ceph: stop returns before daemons are deadLoic Dachary2015-01-071-4/+2
| | | | | | | | | | | The existence of the pidfile must be checked outside of the loop to send a signal to the daemon. Otherwise the daemon will remove the pidfile and stop can return before the process is dead because it only checks /proc/$pid if the pidfile exists. http://tracker.ceph.com/issues/10389 Fixes: #10389 Signed-off-by: Loic Dachary <ldachary@redhat.com>