Skip to content

Commit

Permalink
Merge pull request #3 from vivekkumac/transformerChanges
Browse files Browse the repository at this point in the history
CP-18112 Transformer: updating xha to latest.
  • Loading branch information
euanh authored Sep 20, 2016
2 parents 87b85b7 + 0770969 commit a824877
Show file tree
Hide file tree
Showing 25 changed files with 51 additions and 40 deletions.
2 changes: 1 addition & 1 deletion default-debug.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INCDIR=$(SOURCEDIR)/include
INCLUDES=-I$(INCDIR)
LIBS=-lxml2 -lrt
HALIBS=$(OBJDIR)/libxha.a
INSDIR=/opt/xensource/xha
INSDIR=/usr/libexec/xapi/cluster-stack/xhad
LOGCONFDIR=/etc/logrotate.d

.PHONY: build clean debug release
Expand Down
2 changes: 1 addition & 1 deletion default-release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INCDIR=$(SOURCEDIR)/include
INCLUDES=-I$(INCDIR)
LIBS=-lxml2 -lrt
HALIBS=$(OBJDIR)/libxha.a
INSDIR=/opt/xensource/xha
INSDIR=/usr/libexec/xapi/cluster-stack/xhad
LOGCONFDIR=/etc/logrotate.d

.PHONY: build clean debug release
Expand Down
42 changes: 24 additions & 18 deletions mk/xha.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ URL: http://www.citrix.com
Source0: xha-@[email protected]
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: libxml2-devel
BuildRequires: xen-devel

Requires: portreserve

%description
This package contains the HA heartbeating daemon used for XenServer's HA feature

Expand All @@ -28,24 +33,25 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
/etc/logrotate.d/xha
/opt/xensource/xha/calldaemon
/opt/xensource/xha/cleanupwatchdog
/opt/xensource/xha/dumpstatefile
/opt/xensource/xha/ha_clear_excluded
/opt/xensource/xha/ha_disarm_fencing
/opt/xensource/xha/ha_errnorc
/opt/xensource/xha/ha_null
/opt/xensource/xha/ha_propose_master
/opt/xensource/xha/ha_query_liveset
/opt/xensource/xha/ha_rc
/opt/xensource/xha/ha_set_excluded
/opt/xensource/xha/ha_set_host_weight
/opt/xensource/xha/ha_set_pool_state
/opt/xensource/xha/ha_start_daemon
/opt/xensource/xha/ha_stop_daemon
/opt/xensource/xha/weightctl
/opt/xensource/xha/writestatefile
/opt/xensource/xha/xhad
/etc/portreserve/xhad
/usr/libexec/xapi/cluster-stack/xhad/calldaemon
/usr/libexec/xapi/cluster-stack/xhad/cleanupwatchdog
/usr/libexec/xapi/cluster-stack/xhad/dumpstatefile
/usr/libexec/xapi/cluster-stack/xhad/ha_clear_excluded
/usr/libexec/xapi/cluster-stack/xhad/ha_disarm_fencing
/usr/libexec/xapi/cluster-stack/xhad/ha_errnorc
/usr/libexec/xapi/cluster-stack/xhad/ha_null
/usr/libexec/xapi/cluster-stack/xhad/ha_propose_master
/usr/libexec/xapi/cluster-stack/xhad/ha_query_liveset
/usr/libexec/xapi/cluster-stack/xhad/ha_rc
/usr/libexec/xapi/cluster-stack/xhad/ha_set_excluded
/usr/libexec/xapi/cluster-stack/xhad/ha_set_host_weight
/usr/libexec/xapi/cluster-stack/xhad/ha_set_pool_state
/usr/libexec/xapi/cluster-stack/xhad/ha_start_daemon
/usr/libexec/xapi/cluster-stack/xhad/ha_stop_daemon
/usr/libexec/xapi/cluster-stack/xhad/weightctl
/usr/libexec/xapi/cluster-stack/xhad/writestatefile
/usr/libexec/xapi/cluster-stack/xhad/xhad

%changelog

3 changes: 3 additions & 0 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ install: $(TARGET)
@cp ha_* $(DESTDIR)$(INSDIR)
@mkdir -p $(DESTDIR)$(LOGCONFDIR)
@cp logrotate.xha.conf $(DESTDIR)$(LOGCONFDIR)/xha
@chmod 0644 $(DESTDIR)$(LOGCONFDIR)/xha
@mkdir -p $(DESTDIR)/etc/portreserve
@cp etc_portreserve_xhad $(DESTDIR)/etc/portreserve/xhad

clean:
rm -f $(TARGET) $(TARGET_GENERR) $(OBJS_GENERR)
1 change: 1 addition & 0 deletions scripts/etc_portreserve_xhad
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ha-cluster
2 changes: 1 addition & 1 deletion scripts/ha_clear_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_clear_excluded [-C <config-file-name>]
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_disarm_fencing
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_disarm_fencing
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_propose_master
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_propose_master
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_query_liveset
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_query_liveset
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_rc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# XenSource HA scripts

configfile=/etc/xensource/xhad.conf
scriptdir=/opt/xensource/xha
scriptdir=/usr/libexec/xapi/cluster-stack/xhad
daemon_wd=$scriptdir

#
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_set_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_set_excluded [-C <config-file-name>]
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_set_host_weight
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_set_host_weight <class> <weight>
Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_set_pool_state
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_set_pool_state init | active | invalid [-C <config-file-name>]
Expand Down
3 changes: 2 additions & 1 deletion scripts/ha_start_daemon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_start_daemon [-C <config-file-name>] [initial-fist-points]
Expand Down Expand Up @@ -48,6 +48,7 @@ fi

# start xha daemon

portrelease xhad 2&>1 > /dev/null || true
xhad $cf $* < /dev/null > /dev/null 2>&1 &
daemon_pid=$!

Expand Down
2 changes: 1 addition & 1 deletion scripts/ha_stop_daemon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.

. /opt/xensource/xha/ha_rc
. /usr/libexec/xapi/cluster-stack/xhad/ha_rc

#
# ha_stop_daemon
Expand Down
2 changes: 1 addition & 1 deletion stubs/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DESTDIR=
SCRIPTDIR=/opt/xensource/xha
SCRIPTDIR=/usr/libexec/xapi/cluster-stack/xhad
FRC=

TARGET= $(SCRIPTDIR)/cfread \
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_clear_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
# ha_clear_excluded
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

exit 0
2 changes: 1 addition & 1 deletion stubs/ha_disarm_fencing
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_disarm_fencing
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

get_xhad_status
sf=$_sf
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_propose_master
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_propose_master
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

get_xhad_status
sf=$_sf
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_query_liveset
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_stop_daemon
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

get_xhad_status
sf=$_sf
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_set_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
# ha_set_excluded
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

exit 0
2 changes: 1 addition & 1 deletion stubs/ha_set_pool_state
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_set_pool_state init | active | invalid [-C <config-file-name>]
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

# Get new state
newstate=`param $*` || exit $?
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_start_daemon
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_start_daemon [-C <config-file-name>]
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

# get config-file name
cf=`getcf $*` || exit $?
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_stop_daemon
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ha_stop_daemon
#

. /opt/xensource/xha/ha_stubrc
. /usr/libexec/xapi/cluster-stack/xhad/ha_stubrc

get_xhad_status
sf=$_sf
Expand Down
2 changes: 1 addition & 1 deletion stubs/ha_stubrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# XenSource HA stub scripts

default_cf=/etc/xensource/xhad.conf
scriptdir=/opt/xensource/xha
scriptdir=/usr/libexec/xapi/cluster-stack/xhad
tmpfile=/tmp/xhastub.$$

#
Expand Down

0 comments on commit a824877

Please sign in to comment.