openha/.git
3 years agoUpdate the README file master
Christophe Varoqui [Thu, 14 Jun 2018 20:06:55 +0000 (22:06 +0200)]
Update the README file

* update doc urls
* remove the reference to the git.opensvc.com gitweb

3 years agoGet status from file fix
Benjamin Binier [Thu, 14 Jun 2018 20:00:25 +0000 (22:00 +0200)]
Get status from file fix

Terminate the status string buffer before conversion to int via atoi().

4 years agoAdd custom release field for rpm package building
Arnaud Veron [Tue, 18 Jul 2017 14:38:00 +0000 (16:38 +0200)]
Add custom release field for rpm package building

* Defining %custom_dist tag makes rpm release number being appended with this tag
    $ grep custom_dist $HOME/.rpmmacros
    %custom_dist                 acme.el7

4 years agoEnsure temp file is created in same filesystem than source file
Arnaud Veron [Mon, 10 Jul 2017 13:24:38 +0000 (15:24 +0200)]
Ensure temp file is created in same filesystem than source file

Avoid rename() falling into EXDEV error

4 years agoAdd changelog script
Arnaud Veron [Mon, 10 Jul 2017 09:15:50 +0000 (11:15 +0200)]
Add changelog script

4 years agoFix tunable HEARTBEAT_TALK_DELAY_ON_START being overridden
Arnaud Veron [Sun, 12 Feb 2017 06:59:49 +0000 (07:59 +0100)]
Fix tunable HEARTBEAT_TALK_DELAY_ON_START being overridden

4 years agoFix typo error
Arnaud Veron [Thu, 26 Jan 2017 20:56:50 +0000 (21:56 +0100)]
Fix typo error

4 years agoUpdate systemd unit file to FSH compliant install directories
Arnaud Veron [Thu, 19 Jan 2017 09:51:16 +0000 (10:51 +0100)]
Update systemd unit file to FSH compliant install directories

5 years agoAlign "openha service" usage msg with "openha hb" usage msg
Christophe Varoqui [Thu, 18 Aug 2016 13:50:07 +0000 (15:50 +0200)]
Align "openha service" usage msg with "openha hb" usage msg

5 years agoAdd service states to the manpage
Christophe Varoqui [Thu, 18 Aug 2016 13:33:06 +0000 (15:33 +0200)]
Add service states to the manpage

5 years agoAdd openha manpage
Christophe Varoqui [Thu, 18 Aug 2016 12:31:06 +0000 (14:31 +0200)]
Add openha manpage

5 years agoAdd /var/lib/openha to the specfile %files
Christophe Varoqui [Thu, 18 Aug 2016 07:48:11 +0000 (09:48 +0200)]
Add /var/lib/openha to the specfile %files

So that this directory and child directories exist.

5 years agoDon't error on launcher start when the state file does not exist
Christophe Varoqui [Thu, 18 Aug 2016 07:36:35 +0000 (09:36 +0200)]
Don't error on launcher start when the state file does not exist

In this case the launcher script reported a message like:

cat: /var/lib/openha/services/<svcname>/STATE.<node>: No such file or directory

Detect this situation and initialize the STATE variable to ""

5 years agoStop tracking configure and src/Makefile.in
Christophe Varoqui [Thu, 18 Aug 2016 07:12:35 +0000 (09:12 +0200)]
Stop tracking configure and src/Makefile.in

Those are autogenerated respectively by autoconf and automake

5 years agoFix variable name in postinstall
Christophe Varoqui [Thu, 18 Aug 2016 07:06:45 +0000 (09:06 +0200)]
Fix variable name in postinstall

s/LOD_D/LOG_D/

This could caused a postinstall error on mkdir call without
operand.

5 years agoTrack /var/log/openha in the specfile %files
Christophe Varoqui [Thu, 18 Aug 2016 07:03:51 +0000 (09:03 +0200)]
Track /var/log/openha in the specfile %files

For the postinstall to be able to store its log file

5 years agoFixes to the launcher script
Christophe Varoqui [Wed, 17 Aug 2016 13:21:54 +0000 (15:21 +0200)]
Fixes to the launcher script

* Define missing EZ_LOG
* Replace one last occurence of the EZ variable

5 years agoFix sysvinit launcher install in postinstall
Christophe Varoqui [Wed, 17 Aug 2016 13:06:44 +0000 (15:06 +0200)]
Fix sysvinit launcher install in postinstall

5 years agoUse FSH compliant install directories
Christophe Varoqui [Wed, 17 Aug 2016 08:52:32 +0000 (10:52 +0200)]
Use FSH compliant install directories

* openha binaries are now installed in /usr/lib/openha/bin
* add a openha shell script wrapper for all openha binaries
* remove env.sh
* rename ezha.init to openha.init
* move /usr/local/cluster/conf to /etc/openha
* move /usr/local/cluster/doc to /usr/share/doc/openha
* move /usr/local/cluster/services to /var/lib/openha/services
* move /usr/local/cluster/log/proc to /var/lib/openha/proc
* remove /usr/local/cluster/log

5 years agoIgnore heart[cd]_unicast in .gitignore 0.5.0
Christophe Varoqui [Wed, 17 Aug 2016 08:49:35 +0000 (10:49 +0200)]
Ignore heart[cd]_unicast in .gitignore

5 years agoExecute preremove scripts only when product is uninstalled
Arnaud Veron [Sat, 30 Apr 2016 16:06:59 +0000 (18:06 +0200)]
Execute preremove scripts only when product is uninstalled

no need to run preremove when upgrading/downgrading

5 years agoAdd tunable HEARTBEAT_TALK_DELAY_ON_START
Arnaud Veron [Mon, 25 Apr 2016 15:54:04 +0000 (17:54 +0200)]
Add tunable HEARTBEAT_TALK_DELAY_ON_START

* Allow users to specify a delay between heartbeat startup and nmond startup
* Increase this value (in seconds) up to the time needed for your heartbeats to converge

5 years agoAdd dependency on systemd network-online and time-sync targets
Arnaud Veron [Mon, 25 Apr 2016 15:34:03 +0000 (17:34 +0200)]
Add dependency on systemd network-online and time-sync targets

* ensure correct OpenHA logs timestamps

5 years agofix service -h seg fault (issue #1)
Cyril Galibern [Wed, 26 Aug 2015 10:25:45 +0000 (12:25 +0200)]
fix service -h seg fault (issue #1)

regression is 75d4c7cc9549a405f0476bcb4d70cc5840f94d31

@Christophe Varoqui: does "-s" in argv[2] has a real test case ?

5 years agoExplicit skip of non disk/dio heartbeat types during sanity checks
Arnaud Veron [Mon, 28 Dec 2015 18:32:19 +0000 (19:32 +0100)]
Explicit skip of non disk/dio heartbeat types during sanity checks

5 years agoEnsure offset reinitialisation each time we loop a new disk
Arnaud Veron [Mon, 28 Dec 2015 12:05:22 +0000 (13:05 +0100)]
Ensure offset reinitialisation each time we loop a new disk

5 years agoImprove debug logging output while doing sanity checks
Arnaud Veron [Sun, 27 Dec 2015 10:25:28 +0000 (11:25 +0100)]
Improve debug logging output while doing sanity checks

5 years agoRestrict SO_BINDTODEVICE setsockopt to Linux
Arnaud Veron [Sat, 12 Dec 2015 07:45:54 +0000 (08:45 +0100)]
Restrict SO_BINDTODEVICE setsockopt to Linux

5 years agoFix segfault triggered by querying unknown service name
Arnaud Veron [Wed, 2 Dec 2015 07:36:05 +0000 (07:36 +0000)]
Fix segfault triggered by querying unknown service name

6 years agoDo bind the specified interface in heartc_unicast
Christophe Varoqui [Mon, 5 Oct 2015 07:23:40 +0000 (09:23 +0200)]
Do bind the specified interface in heartc_unicast

This patch make the heartbeat listener actually bind the interface
specified in the monitor configuration file.

The following command can be used to verify:

$ ss -lpn | grep 1700
udp  UNCONN  0  0  *%wlan0:1700  *:*

6 years agoImplement a unicast heartbeat
Christophe Varoqui [Sun, 4 Oct 2015 21:04:03 +0000 (23:04 +0200)]
Implement a unicast heartbeat

Amazon, for one, doesn't do multicast on their networks. Some
clients also may encounter difficulties with enterprise network
policies. All good reason to add this new heartbeat driver.

The syntax in the monitor configuration is mostly the same as
a net (multicast) heartbeat line:

node1 unicast eth1 192.168.0.2 1700 60
node2 unicast eth1 192.168.0.1 1700 60

Note on each node line the ip address parameter points the remote ip.
In the example,
node1 ip is 192.168.0.1
node2 ip is 192.168.0.2

The interface is ignored at the moment, as shown by netstat:

$ sudo netstat -petulan | grep -w 1700
udp 0 0 0.0.0.0:1700 0.0.0.0:* 0 1174711 26981/heartc_unicast

6 years agoAdd distribution tag when building rpm packages
Arnaud Veron [Fri, 4 Sep 2015 09:15:56 +0000 (11:15 +0200)]
Add distribution tag when building rpm packages

6 years agoRemove too verbose and redundant log when calling change_service_start()
Christophe Varoqui [Mon, 31 Aug 2015 12:38:49 +0000 (14:38 +0200)]
Remove too verbose and redundant log when calling change_service_start()

More precise logs are emitted from the function itself, and more
importantly, no log should be emitted from the caller when the function
decides to return silently.

6 years agoDon't log that nmond can not start a service in START_READY state
Christophe Varoqui [Tue, 25 Aug 2015 13:11:31 +0000 (15:11 +0200)]
Don't log that nmond can not start a service in START_READY state

Openha would log in a loop when the service has been put in a
maintenance state through freeze-start:

Aug 25 10:20:01 node1 nmond[6828]: [ID 702911 local5.notice] Changing state of service svc1
Aug 25 10:20:01 node1 nmond[6828]: [ID 702911 local5.notice] Cannot start svc1: service not in correct state (partner node is FROZEN_STOP, we are START_READY)
Aug 25 10:20:03 node1 nmond[6828]: [ID 702911 local5.notice] Changing state of service svc1
Aug 25 10:20:03 node1 nmond[6828]: [ID 702911 local5.notice] Cannot start svc1: service not in correct state (partner node is FROZEN_STOP, we are START_READY)
Aug 25 10:20:05 node1 nmond[6828]: [ID 702911 local5.notice] Changing state of service svc1

This information is useless. This patch detects this case and
bypass the logging.

6 years agoRemove LD_LIBRARY_PATH from the launcher file
Christophe Varoqui [Tue, 25 Aug 2015 12:47:17 +0000 (14:47 +0200)]
Remove LD_LIBRARY_PATH from the launcher file

If needed, this setting can be moved to the rc script configuration
file (ex: /etc/sysconfig/openha)

6 years agoAdd debian package creation script
Arnaud Veron [Thu, 16 Jul 2015 15:30:51 +0000 (17:30 +0200)]
Add debian package creation script

prerequisites
-----------------
git / aclocal / autoconf / automake / make / gcc

build steps
---------------
git clone http://git.opensvc.com/openha/.git
cd openha/build
./make_deb

6 years agoIncrease MAX_SERVICES_SIZE to 63 0.4.4
Arnaud Veron [Thu, 9 Jul 2015 16:59:46 +0000 (18:59 +0200)]
Increase MAX_SERVICES_SIZE to 63

service name is no more restricted to 15 chars, now 63
bump version to 0.4.4

6 years agoUse waitpid() instead of wait() after execv()
Arnaud Veron [Tue, 7 Jul 2015 21:19:52 +0000 (23:19 +0200)]
Use waitpid() instead of wait() after execv()

Still observing the /bin/true checkup script returning 1 in some
cases.

6 years agoWorkaround Solaris behaviour on wait()
Christophe Varoqui [Mon, 29 Jun 2015 22:09:50 +0000 (00:09 +0200)]
Workaround Solaris behaviour on wait()

We observed cases where /bin/true as a service checkup script
is reporting 1 as a return code.

The wait() behaviour on solaris upon parent's signaling might
cause early wait() unblocking.

Loop until wait() unblocks without errno hinting an interruption.

6 years agoAdd missing {}
Christophe Varoqui [Sun, 14 Jun 2015 22:32:55 +0000 (00:32 +0200)]
Add missing {}

6 years agocluster.c tidying
Christophe Varoqui [Sun, 14 Jun 2015 22:03:14 +0000 (00:03 +0200)]
cluster.c tidying

1/ check to fread() return code
2/ return UNKNOWN state in get_status() error paths
3/ more logging in get_status() error paths
4/ remove commented-out service state file locking
5/ stop trying to open service state files ro before reopening r+
6/ add a fflush() to create_file(), as done in write_status()

6 years agoNo need to find a -n capable echo in the launcher script
Christophe Varoqui [Sun, 14 Jun 2015 22:01:17 +0000 (00:01 +0200)]
No need to find a -n capable echo in the launcher script

echo -n was used to write a state in the service state file,
which perfectly supports a terminal line feed. This is
actually what the internal write_status() function does.

6 years agoSetup the rc3.d symlink only on Linux
Christophe Varoqui [Sun, 14 Jun 2015 21:10:39 +0000 (23:10 +0200)]
Setup the rc3.d symlink only on Linux

Solaris and most unix don't jump to the target level but iterate
each intermediate level, thus starting openha twice. This messes
with the service states.

Keep only the rc2.d symlink for unices.

6 years agoAmend the openha launcher script for Solaris 10 svcinit interpreter
Bruno Marchetti [Sat, 13 Jun 2015 18:32:49 +0000 (20:32 +0200)]
Amend the openha launcher script for Solaris 10 svcinit interpreter

Remove ksh-isms

6 years agoFix off-by-one svcname length validation in "service -a"
Christophe Varoqui [Wed, 10 Jun 2015 10:31:39 +0000 (12:31 +0200)]
Fix off-by-one svcname length validation in "service -a"

6 years agoTest init_var() return value in nmond too
Christophe Varoqui [Tue, 9 Jun 2015 14:38:08 +0000 (16:38 +0200)]
Test init_var() return value in nmond too

to avoid segfaulting when EZ is not set

6 years agoVerify the service name length on "service -a <svcname> ..."
Christophe Varoqui [Tue, 9 Jun 2015 14:20:40 +0000 (16:20 +0200)]
Verify the service name length on "service -a <svcname> ..."

To avoid adding a svcname too long, which corrupts heartbeat
states for all cluster services and triggers undue failover
attempts.

Also fix a segmentation fault due to unchecked init_var()
return code.

6 years agoFix state fixing from init script
Christophe Varoqui [Sun, 7 Jun 2015 18:25:07 +0000 (20:25 +0200)]
Fix state fixing from init script

"echo -n" is not supported by the build-in Solaris sh. Use
/usr/ucb/echo if present.

Thanks to Bruno Marchetti for the troubleshoot and proposed fix.

6 years agoMerge branch 'master' of git+ssh://www.opensvc.com/home/opensvc/openha
Christophe Varoqui [Fri, 29 May 2015 19:04:30 +0000 (21:04 +0200)]
Merge branch 'master' of git+ssh://opensvc.com/home/opensvc/openha

6 years agoFix start decision algo
Christophe Varoqui [Fri, 29 May 2015 16:00:35 +0000 (18:00 +0200)]
Fix start decision algo

The secondary might try to start (and abort just after) when in
STOPPING state while the primary is in the UNKNOWN|STOPPED|FREEZE_STOP
state.

6 years agoAdd systemd network.target dependency
Arnaud Veron [Thu, 21 May 2015 08:44:34 +0000 (10:44 +0200)]
Add systemd network.target dependency

6 years agoForce gzip to compress rpm source and binaries
Arnaud Veron [Thu, 21 May 2015 08:38:29 +0000 (10:38 +0200)]
Force gzip to compress rpm source and binaries

to maintain backward compatibility with older distributions

6 years agoHonor the logfacility configuration in the openha initscript
Christophe Varoqui [Tue, 7 Apr 2015 21:04:02 +0000 (23:04 +0200)]
Honor the logfacility configuration in the openha initscript

The init script uses logger to log the freeze on start decisions.
Teach it to read and use the log facility defined in
$EZ/conf/logfacility, as nmond, heart* and service commands.

6 years agoFix log facility config on solaris
Christophe Varoqui [Mon, 6 Apr 2015 22:34:19 +0000 (00:34 +0200)]
Fix log facility config on solaris

Solaris syslog.h does not define facilitynames.
Stop defining SYSLOG_NAMES to inherit facilitynames on Linux and
embed our own facilitynames. Also remove entries not supported
on Solaris.

6 years agoMerge branch 'master' of git+ssh://www.opensvc.com/home/opensvc/openha
Arnaud Veron [Mon, 6 Apr 2015 21:52:49 +0000 (23:52 +0200)]
Merge branch 'master' of git+ssh://opensvc.com/home/opensvc/openha

6 years agoAllow to set a custom log facility for nmond, heart* and service
Arnaud Veron [Mon, 6 Apr 2015 21:48:17 +0000 (23:48 +0200)]
Allow to set a custom log facility for nmond, heart* and service

The log facility is the first word of the $EZ/conf/logfacility
file.

This log facility is the looked up in the syslog.h facilitynames.

If not found or if the file does not exist, default to LOG_DAEMON
which was the previously hardcoded facility.

6 years agoRemove redundant sin_port settings
Christophe Varoqui [Mon, 6 Apr 2015 09:42:38 +0000 (11:42 +0200)]
Remove redundant sin_port settings

6 years agoAdd logging message in startup script
Arnaud Veron [Mon, 23 Mar 2015 13:26:36 +0000 (14:26 +0100)]
Add logging message in startup script

6 years agoImprove logging output on service state changes
Arnaud Veron [Mon, 23 Mar 2015 12:39:00 +0000 (13:39 +0100)]
Improve logging output on service state changes

6 years agoStop logging into nmond.log
Christophe Varoqui [Sat, 21 Mar 2015 22:24:06 +0000 (23:24 +0100)]
Stop logging into nmond.log

All logs already stream to the syslog daemon chanel. The nmond.log
is thus annoying in many ways:
- it fills up /usr/local/cluster/log
- the log file has no rotation
- the information is not timestamped
- users may not realize the information is also in /opt/opensvc/log
and daemon.log

6 years agoForce binding to interface on Linux
Arnaud Veron [Sat, 21 Mar 2015 14:50:51 +0000 (15:50 +0100)]
Force binding to interface on Linux

On Linux we have to explicitely bind the interface through a
socket-level setsockopt() for the mcast packets not to be
emitted on all interfaces.

6 years agoFix decision algorithm in grace period
Arnaud Veron [Fri, 6 Mar 2015 16:38:16 +0000 (17:38 +0100)]
Fix decision algorithm in grace period

* When nmond decide to start a service, it first wait for
a period named the grace period before actually trigger the start
* During that time we check for state change on other node,
so as to cancel service start if other node is also trying to
start the service
* Before this patch only the secondary node was able to cancel
its willing to start the service
* This patch now brings primary node the capability of aborting
service start if secondary node is already starting the service

6 years agoFix typo error
Arnaud Veron [Fri, 6 Mar 2015 14:07:59 +0000 (15:07 +0100)]
Fix typo error

6 years agoAdd new debug trigger
Arnaud Veron [Sun, 15 Feb 2015 18:43:10 +0000 (19:43 +0100)]
Add new debug trigger

If EZ_DEBUG is present in environment, enable debug mode

6 years agoAdd FREEZE_SERVICE_SECONDARY_INSTANCE_ON_START rc parameter
Christophe Varoqui [Sun, 8 Feb 2015 10:10:48 +0000 (11:10 +0100)]
Add FREEZE_SERVICE_SECONDARY_INSTANCE_ON_START rc parameter

Upon reboot of all cluster nodes, the services will all
start on the first node starting openha. If this behaviour
is not acceptable in your context, this option
can be set to "yes" to force the start of only the
services the node is primary of. The service instances
the node is secondary of are transitioned to the
FROZEN_STOP state, and thus the unfreeze command will
be necessary to restore HA after all nodes are booted.

6 years agoFix build folders creation before using them
Arnaud Veron [Wed, 3 Dec 2014 14:17:29 +0000 (15:17 +0100)]
Fix build folders creation before using them

6 years agoAdd buildroot option to rpmbuild call
Arnaud Veron [Wed, 3 Dec 2014 14:02:02 +0000 (15:02 +0100)]
Add buildroot option to rpmbuild call

7 years agoRemove set -x
Arnaud Veron [Wed, 24 Sep 2014 12:24:17 +0000 (14:24 +0200)]
Remove set -x

7 years agoSunOS package creation improvement
Arnaud Veron [Wed, 24 Sep 2014 12:12:07 +0000 (14:12 +0200)]
SunOS package creation improvement

no more rely on current installation in /usr/local/cluster
live compilation from extracted git archive
version information is now extracted from git tags
now aligned on opensvc release numbering scheme

prerequisites
-----------------
git / aclocal / autoconf / automake / make / gcc

build steps
---------------
git clone http://git.opensvc.com/openha/.git
cd openha/build
./make_sunos_pkg

7 years agoPostinstall improvement
Arnaud Veron [Wed, 24 Sep 2014 09:27:09 +0000 (11:27 +0200)]
Postinstall improvement

rely on type to identify actual binary presence
log postinstall execution to $EZ/log

7 years agoFix preremove script
Arnaud Veron [Wed, 24 Sep 2014 07:54:18 +0000 (09:54 +0200)]
Fix preremove script

use type to check for actual binary presence

7 years agoFix path to rpm file
Arnaud Veron [Tue, 23 Sep 2014 07:18:56 +0000 (09:18 +0200)]
Fix path to rpm file

7 years agoadd tmp folder to git ignore file
Arnaud Veron [Tue, 23 Sep 2014 07:12:30 +0000 (09:12 +0200)]
add tmp folder to git ignore file

7 years agoFix release_rpm call
Arnaud Veron [Tue, 23 Sep 2014 07:11:39 +0000 (09:11 +0200)]
Fix release_rpm call

7 years agoFix preremove script. Decrease verbosity.
Arnaud Veron [Tue, 23 Sep 2014 07:09:22 +0000 (09:09 +0200)]
Fix preremove script. Decrease verbosity.

7 years agoFix lpthread call
Arnaud Veron [Mon, 22 Sep 2014 15:11:55 +0000 (17:11 +0200)]
Fix lpthread call

7 years agosanitize make_rpm script
Arnaud Veron [Mon, 22 Sep 2014 15:10:25 +0000 (17:10 +0200)]
sanitize make_rpm script

7 years agoRemove specfile dependency
Arnaud Veron [Mon, 22 Sep 2014 15:04:36 +0000 (17:04 +0200)]
Remove specfile dependency

7 years agoAdd linux build scripts
Arnaud Veron [Mon, 22 Sep 2014 14:59:41 +0000 (16:59 +0200)]
Add linux build scripts

deport spec file generation in make_rpm script

7 years agoPreremove script : remove linux launchers
Arnaud Veron [Mon, 22 Sep 2014 14:57:31 +0000 (16:57 +0200)]
Preremove script : remove linux launchers

7 years agoPostinstall & Build improvements
Arnaud Veron [Sun, 21 Sep 2014 08:16:30 +0000 (10:16 +0200)]
Postinstall & Build improvements

remove gtk+ and glib from rpm specfile (unresolved on centos7). build dependencies will be raised during actual build.
add autotools tasks before build
add postinstall and preremove scripts to rpm files (not included to specfile to maintain compat with SunOS packaging system)
add call to postinstall/preremove scripts

7 years agoFix build process
Arnaud Veron [Sun, 21 Sep 2014 07:17:22 +0000 (09:17 +0200)]
Fix build process

add pthread lib to service binary
rename sunos script

7 years agoAdd file to meet autotools requirements
root [Sun, 21 Sep 2014 06:12:12 +0000 (08:12 +0200)]
Add file to meet autotools requirements

7 years agoTypo error
Arnaud Veron [Thu, 18 Sep 2014 02:04:07 +0000 (04:04 +0200)]
Typo error

7 years agoPostinstall improvements 0.4.3
Arnaud Veron [Thu, 18 Sep 2014 01:58:54 +0000 (03:58 +0200)]
Postinstall improvements

add linux systemd support
add chkconfig/update-rc.d (insserv based) support
fallback on legacy sysvr5 method for all other environments
change lsb tags to start at end of boot

7 years agoLSB tags change to start ezha in runlevel 2
Arnaud Veron [Tue, 16 Sep 2014 06:51:18 +0000 (08:51 +0200)]
LSB tags change to start ezha in runlevel 2

7 years agobump version
Arnaud Veron [Wed, 18 Jun 2014 13:41:16 +0000 (15:41 +0200)]
bump version
text files update
rpm specfile modified to create directory structure at install time

7 years agoAdd product folders creation during postinstall
Arnaud Veron [Wed, 18 Jun 2014 09:29:20 +0000 (11:29 +0200)]
Add product folders creation during postinstall

7 years agoUpdate specfile
Arnaud Veron [Tue, 17 Jun 2014 18:59:22 +0000 (20:59 +0200)]
Update specfile

- bump version
- run aclocal, autoheader, autoconf, automake

Build a rpm with:

$ git archive --prefix=openha-0.4.0.osvc1/ HEAD >/root/rpmbuild/SOURCES/openha-0.4.0.osvc1.tar.gz
$ rpmbuild -ba openha.spec

7 years agoFix heartd.c joining multicast group with INADDR_ANY instead of dedicated interface...
Arnaud Veron [Tue, 3 Jun 2014 13:45:46 +0000 (15:45 +0200)]
Fix heartd.c joining multicast group with INADDR_ANY instead of dedicated interface address

7 years agoImplement "service -A <action>"
Christophe Varoqui [Thu, 8 May 2014 12:00:47 +0000 (14:00 +0200)]
Implement "service -A <action>"

Not specifying the service will trigger the action on all services.
Each service action is handled by a private thread, so that
actions run in parallel.

Use "service -A stop" in ezha init script, in the "stop" code
path.

7 years agoFix segfault when passing an unknow service action
Christophe Varoqui [Thu, 8 May 2014 10:30:12 +0000 (12:30 +0200)]
Fix segfault when passing an unknow service action

Move the test for undefined service earlier.

Also use halog() in the service action code path instead of
printf(), and unindent the case(action_id).

7 years agofwrite(&buff, size, 1) must return 1, not size in heartc_raw
Christophe Varoqui [Tue, 6 May 2014 15:30:45 +0000 (17:30 +0200)]
fwrite(&buff, size, 1) must return 1, not size in heartc_raw

7 years agoTest nmond presence from service cmd only for -s
Christophe Varoqui [Tue, 6 May 2014 14:01:57 +0000 (16:01 +0200)]
Test nmond presence from service cmd only for -s

"service -A" must continue to work after nmond is killed for
"/etc/init.d/ezha stop" to work.

7 years agoRearm sigterm in heartc and heartd main loop
Christophe Varoqui [Tue, 6 May 2014 13:25:17 +0000 (15:25 +0200)]
Rearm sigterm in heartc and heartd main loop

Without this, we leak shm.

7 years agoFix set_if_mcast() error messages
Christophe Varoqui [Mon, 5 May 2014 21:51:37 +0000 (23:51 +0200)]
Fix set_if_mcast() error messages

Use halog(), and report more informative messages

7 years agoMakefile.am should set glib in LDADD
Christophe Varoqui [Mon, 5 May 2014 21:49:23 +0000 (23:49 +0200)]
Makefile.am should set glib in LDADD

Unless "configure" generates Makefile targets with -lglib-2.0
before .o ... which ends up with unresolved symbols.

7 years agoMake "service -s" refuse to display unreliable info
Christophe Varoqui [Wed, 30 Apr 2014 09:41:40 +0000 (11:41 +0200)]
Make "service -s" refuse to display unreliable info

Test nmond presence and refuse to display info if not present.

7 years agoWork around g_hash_table_get_keys() unavailabilty in some glib versions
Christophe Varoqui [Wed, 30 Apr 2014 07:54:49 +0000 (09:54 +0200)]
Work around g_hash_table_get_keys() unavailabilty in some glib versions

7 years agoMerge branch 'master' of git+ssh://deb1.opensvc.com/root/openha
Arnaud Veron [Tue, 29 Apr 2014 19:11:31 +0000 (21:11 +0200)]
Merge branch 'master' of git+ssh://deb1.opensvc.com/root/openha

Conflicts:
src/heartd_raw.c