-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathplugin.sh
More file actions
35 lines (31 loc) · 1014 Bytes
/
Copy pathplugin.sh
File metadata and controls
35 lines (31 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local xtrace=$(set +o | grep xtrace)
if [ "$VERBOSE" == 'True' ]; then
# enabling verbosity on whole plugin - default behavior
set -o xtrace
fi
NOVA_PLUGINDIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
source $NOVA_PLUGINDIR/lib/mdev_samples
if [[ $1 == "stack" ]]; then
case $2 in
install)
if [[ "$NOVA_COMPILE_MDEV_SAMPLES" == True ]]; then
# NOTE (jgilaber): install mdevctl before calling the
# compile_mdev_samples function as if calling it after in some CI
# runs devstack fails due to lock contentions for dpkg
install_package mdevctl
async_runfunc compile_mdev_samples
fi
;;
post-config)
if [[ "$NOVA_COMPILE_MDEV_SAMPLES" == True ]]; then
async_wait compile_mdev_samples
sudo virsh nodedev-list
restart_service libvirtd
sudo virsh nodedev-list
fi
;;
esac
elif [[ $1 == "clean" ]]; then
rm -Rf $NOVA_KERNEL_TEMP
fi
$xtrace