mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Healthcheck
This commit is contained in:
parent
ff40c3d5ae
commit
f6139a75ad
@ -46,6 +46,9 @@ configureDHCP() {
|
|||||||
echo "ERROR: Cannot retrieve IP from DHCP using MAC ${VM_NET_MAC}" && exit 16
|
echo "ERROR: Cannot retrieve IP from DHCP using MAC ${VM_NET_MAC}" && exit 16
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Store IP for Docker healthcheck
|
||||||
|
echo "${DHCP_IP}" > "/var/dsm.ip"
|
||||||
|
|
||||||
ip a flush "${VM_NET_TAP}"
|
ip a flush "${VM_NET_TAP}"
|
||||||
|
|
||||||
TAP_PATH="/dev/tap$(</sys/class/net/${VM_NET_TAP}/ifindex)"
|
TAP_PATH="/dev/tap$(</sys/class/net/${VM_NET_TAP}/ifindex)"
|
||||||
@ -83,6 +86,9 @@ configureNAT () {
|
|||||||
VM_NET_IP='20.20.20.21'
|
VM_NET_IP='20.20.20.21'
|
||||||
VM_NET_TAP="_VmNatTap"
|
VM_NET_TAP="_VmNatTap"
|
||||||
|
|
||||||
|
# Store IP for Docker healthcheck
|
||||||
|
echo "${VM_NET_IP}" > "/var/dsm.ip"
|
||||||
|
|
||||||
#Create bridge with static IP for the VM guest
|
#Create bridge with static IP for the VM guest
|
||||||
brctl addbr dockerbridge
|
brctl addbr dockerbridge
|
||||||
ip addr add ${VM_NET_IP%.*}.1/24 broadcast ${VM_NET_IP%.*}.255 dev dockerbridge
|
ip addr add ${VM_NET_IP%.*}.1/24 broadcast ${VM_NET_IP%.*}.255 dev dockerbridge
|
||||||
@ -179,9 +185,6 @@ else
|
|||||||
# Configuration for DHCP IP
|
# Configuration for DHCP IP
|
||||||
configureDHCP
|
configureDHCP
|
||||||
|
|
||||||
# Store IP for Docker healthcheck
|
|
||||||
echo "${DHCP_IP}" > "/var/dsm.ip"
|
|
||||||
|
|
||||||
# Display the received IP on port 5000
|
# Display the received IP on port 5000
|
||||||
/run/server.sh 5000 "The location of DSM is http://${DHCP_IP}:5000" > /dev/null &
|
/run/server.sh 5000 "The location of DSM is http://${DHCP_IP}:5000" > /dev/null &
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user