Commit Graph

55 Commits

Author SHA1 Message Date
yuusuke
1d05569fa9 upstart: Add softdog module loading example
Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-12-05 09:46:17 +01:00
Ferenc Wágner
8a940f9a18 init: Add doc URIs to the systemd service files
These are used by systemctl help.

Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-28 09:58:09 +01:00
yuusuke
818b2682c5 systemd: Delete unnecessary soft_margin
Signed-off-by: yuusuke <yusk.iida@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-11-21 18:04:53 +01:00
Ferenc Wágner
aab840256d init: corosync and cman aren't system facilities
Signed-off-by: Ferenc Wágner <wferi@niif.hu>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2016-09-02 11:16:00 +02:00
Jan Friesse
a3dba5dea8 Qdevices: Include required files in tarball
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-30 17:18:15 +02:00
Jan Friesse
32123f6bb2 Qdevice: Handle /var/run on tmpfs
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
b415634f95 Qdevice: Add sysconfig example
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
7d3979fdba Qnetd: Execute qnetd as non root user
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:43 +02:00
Jan Friesse
8f079affa9 Make sure all qdevice files are packaged
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:42 +02:00
Jan Friesse
c37d0cc143 qdevice: Add qdevice service scripts
Also fix qnetd systemd service.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00
Jan Friesse
1561dce437 qnetd: Add init script
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:39 +02:00
Jan Friesse
b627844f3d init: Don't wait for ipc if corosync doesn't start
Init script now checks return code of executing corosync command. If it
fails, ipc_wait section is skipped, resulting in much faster failure of
init script.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2014-10-08 13:29:57 +02:00
Kazunori INOUE
f6d6a9b0a0 systemd: Config example for corosync wd service
Signed-off-by: Kazunori INOUE <kazunori.inoue3@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2014-07-01 16:26:28 +02:00
Lidong Zhong
7a6cc6b5a2 init: change return value when starting corosync
When corosync is started by systemd, it would be considered
as failed because it returns a non-zero value, even though it
starts sucessfully.

Signed-off-by: Lidong Zhong <lzhong@suse.com>
Signed-off-by: Xia Li<xli@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2014-06-09 13:29:15 +02:00
Kazunori INOUE
d23ee6a3e0 upstart: Make job conf file configurable
Signed-off-by: Kazunori INOUE <kazunori.inoue3@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2014-05-09 11:25:58 +02:00
Jan Friesse
1f7e78ab9c init: Make init script configurable
Init script loads /etc/sysconfig/corosync (or /etc/defaults/corosync) by
default, but it didn't existed by default and also no options was
defined.

Patch adds COROSYNC_INIT_TIMEOUT (how many seconds to wait for ipc
initialization) with default value 1 minute (instead of previous 10
seconds, what may be too small value for some productions) and
COROSYNC_OPTIONS (by default empty) containing options directly
passed to corosync executable.

Specfile template is also modified to install example of init file
configuration.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2014-04-11 11:02:18 +02:00
Jan Friesse
6cd1f67f1f systemd unit: Make sure network is really up
Change network.target to network-online.target to make sure network is
really up and running when starting corosync.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
2014-01-13 14:40:28 +01:00
Kazunori INOUE
3551dc920b Use restart policy in the corosync-notifyd unit
Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2013-07-08 11:01:41 +02:00
Kazunori INOUE
e425cd5805 systemd: fix typo in unit file
Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2013-07-01 10:34:22 +02:00
Kazunori INOUE
ca389c3c59 Add Upstart job configuration file
Signed-off-by: Kazunori INOUE <inouekazu@intellilink.co.jp>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2013-04-10 16:52:10 +02:00
Fabio M. Di Nitto
aa3fae50a6 Update .gitignore files
Untracked files:
   (use "git add <file>..." to include in what will be committed)

       compile
       init/corosync
       init/corosync-notifyd
       test/ploadstart

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-11-22 11:13:30 +01:00
Fabio M. Di Nitto
c8a620fd24 build: make path to bash configurable at build time
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-08-28 15:14:49 +02:00
Fabio M. Di Nitto
3a64fc4382 build: fix usage of sed and drop build-aux/genman
"sed -i" is a GNU specific extention.

Replace with more portable version and drop completely genman
in favour of a make rule.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-08-28 15:14:49 +02:00
Fabio M. Di Nitto
d7e205d197 init: major cleanup
- rename generic.in and notifyd.in to corosync.in and corosync-notifyd.in
  (makes build simpler)
- fix sysvinit corosync.in sleep time to include a check for when IPC
  are ready and drop cman bits (there is no cman with corosync 2.0)
- corosync-notifyd.service should always start after corosync.service
- corosync.service should always start after network
- corosync.service uses init script wrapper
- install/ship sysvinit as wrappers for systemd in /usr/share/corosync
  when necessary
- change the build system to deal with all of the above

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-05-21 14:55:49 +02:00
Fabio M. Di Nitto
769a69e41f build: improve systemd service file handling
this solves the issue of having to special case before and after usrmove

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2012-04-10 08:59:40 +02:00
Jan Friesse
8e58459176 Wait for corosync-notifyd exit in init script
Without wait for real exit of corosync-notifyd it can happen, that new
corosync-notifyd is killed. To prevent such condition, stop now wait for
process to die, before exit of stop function.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2012-02-02 09:30:49 +01:00
Angus Salkeld
6fa114ac8d Add systemd unit files for corosync and corosync-notifyd
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-08-09 08:21:02 +10:00
Angus Salkeld
2a568d6e79 Add dbus and snmp notifier
This is to send dbus events on major cluster events:
 - membership changes
 - application connect/dissconnet from corosync
 - quorum changes

dbus events can then be converted into snmp traps by foghorn or
corosync-notifyd can be run to directly send snmp traps.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Russell Bryant <russell@russellbryant.net>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-02-04 09:47:35 -07:00
Jan Friesse
fbbb3f01cb Handle "nocluster" kernel parameter in init script
Init script checks kernel parameters and refuses to start corosync if
nocluster parameter exist on boot time. The init script will
continue to work as expected from console/tty after boot.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
2011-01-31 14:27:36 +01:00
Angus Salkeld
f0104b6d31 Add .gitignore files.
Otherwise "git status" is a pain.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@edhat.com>
2010-10-21 07:43:46 -07:00
Steven Dake
71c2702424 change shutdown priority to 80 in generic.in.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3039 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-03 17:04:42 +00:00
Steven Dake
e1bbafcaeb Patch from Keisuke Mori to add proper dependeny on syslog to corosync init
script.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3038 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-09-03 15:42:22 +00:00
Jan Friesse
d6cd3b6b34 Check that Corosync was not runned by cman
Patch fixes init script so it's tested, if corosync was runned
by cman or not. If so, it refuses to stop Corosync.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3011 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-02 12:38:19 +00:00
Jan Friesse
93fb44ed0f Allow running only one instance of Corosync
Patch makes Corosync more compliant with common practices
for writing daemon. It creates pid file (usually 
/var/run/corosync.pid) and flocks it. So only one instance
of Corosync can be executed now.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@3010 fd59a12c-fef9-0310-b244-a6a79926bd2f
2010-08-02 12:36:20 +00:00
Andrew Beekhof
e725dd3edd Correctly determine current state in init script
If two stop actions are ever performed simultaneously, then neither will terminate.
With the default implementaiton of __pids_pidof, the status() function from 
/etc/init.d/functions incorrectly thinks the other stop action is a real 
corosync process.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2639 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-12-15 11:52:48 +00:00
Fabio M. Di Nitto
60f6e2f299 Fix stop regression
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2557 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-30 21:28:30 +00:00
Fabio M. Di Nitto
dac5df7dd8 Clean up init scripts and make a single generic one
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2554 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-11-30 18:56:28 +00:00
Andrew Beekhof
e11dcf1df3 Prevent daemon from suppressing corefile generation
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2541 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-28 19:09:59 +00:00
Andrew Beekhof
4fba207d42 Add SIGTERM support and have the init script wait for corosync to actually terminate. Bud rh#525552
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2520 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-10-13 06:16:14 +00:00
Fabio M. Di Nitto
47a2a42f72 Fix make dist target
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2292 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-06-25 11:06:24 +00:00
Jim Meyering
d86737ac9c remove empty lines at end-of-file
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2118 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:04:06 +00:00
Jim Meyering
904a10ed38 remove all trailing blanks
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2117 fd59a12c-fef9-0310-b244-a6a79926bd2f
2009-04-22 08:03:55 +00:00
Steven Dake
4042395616 Repair typo which caused init script not to start corosync daemon.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1649 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 07:10:01 +00:00
Steven Dake
ec4a06ec3c Make rpmlint pass without warnings.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1648 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-15 07:09:16 +00:00
Steven Dake
817b07cd79 Update svn commit scripts so they work properly and have proper permissions.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1640 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 17:50:44 +00:00
Steven Dake
dd3991c0bb Proper rename of openais usage to corosync throughout tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1637 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:54:46 +00:00
Steven Dake
e1f531380a Revert patch 1633 which breaks build.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:44:26 +00:00
Steven Dake
c4a1c7eb96 Change all occurances of openais to corosync.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1633 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-14 16:04:01 +00:00
Steven Dake
617dbdf2f0 Split openais and corosync tree into two seperate repositories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1622 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-08-05 13:23:46 +00:00
Steven Dake
46babc95ad Initial move of corosync and openais trees into seperate directories.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1582 fd59a12c-fef9-0310-b244-a6a79926bd2f
2008-07-21 07:59:08 +00:00