M #-: Add missing files for FC. Better IM shepherd

This commit is contained in:
Ruben S. Montero committed 2020-03-07 18:36:20 +01:00
1 parent 010465771b
commit 549a533e95
3 files changed
+65 -2

No files matched your search

+7
View File
@@ -303,6 +303,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \
$VAR_LOCATION/remotes/pm/dummy \
$VAR_LOCATION/remotes/pm/packet \
$VAR_LOCATION/remotes/vmm \
$VAR_LOCATION/remotes/vmm/lib \
$VAR_LOCATION/remotes/vmm/kvm \
$VAR_LOCATION/remotes/vmm/vcenter \
$VAR_LOCATION/remotes/vmm/ec2 \
@@ -510,6 +511,7 @@ INSTALL_FILES=(
PM_EXEC_PACKET_SCRIPTS:$VAR_LOCATION/remotes/pm/packet
VMM_EXEC_LIB_VCENTER_FILES:$LIB_LOCATION/ruby/vcenter_driver
VMM_EXEC_LIB_NSX_FILES:$LIB_LOCATION/ruby/nsx_driver
VMM_EXEC_LIB:$VAR_LOCATION/remotes/vmm/lib
VMM_EXEC_KVM_SCRIPTS:$VAR_LOCATION/remotes/vmm/kvm
VMM_EXEC_LXD_SCRIPTS:$VAR_LOCATION/remotes/vmm/lxd
VMM_EXEC_LXD_LIB:$VAR_LOCATION/remotes/vmm/lxd
@@ -861,6 +863,11 @@ PM_EXEC_PACKET_SCRIPTS="src/pm_mad/remotes/packet/cancel \
src/pm_mad/remotes/packet/reset \
src/pm_mad/remotes/packet/shutdown"
#-------------------------------------------------------------------------------
# Common library files for VMM drivers
#-------------------------------------------------------------------------------
VMM_EXEC_LIB="src/vmm_mad/remotes/lib/command.rb"
#-------------------------------------------------------------------------------
# VMM Lib vcenter files, used by the vCenter Driver to be installed in
# $REMOTES_LOCATION/vmm/lib/vcenter
@@ -1 +0,0 @@
../../../common.d/collectd-client-shepherd.sh
@@ -0,0 +1,29 @@
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
(
[ -f /tmp/one-collectd-client.pid ] || exit 0
running_pid=$(cat /tmp/one-collectd-client.pid)
pids=$(ps axuwww | grep "/collectd-client.rb kvm" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$")
if [ -n "$pids" ]; then
kill -6 $pids
fi
) > /dev/null
@@ -1 +0,0 @@
../../../common.d/collectd-client-shepherd.sh
@@ -0,0 +1,29 @@
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
(
[ -f /tmp/one-collectd-client.pid ] || exit 0
running_pid=$(cat /tmp/one-collectd-client.pid)
pids=$(ps axuwww | grep "/collectd-client.rb lxd" | grep -v grep | awk '{ print $2 }' | grep -v "^${running_pid}$")
if [ -n "$pids" ]; then
kill -6 $pids
fi
) > /dev/null