
this PR adds a network_isolation config option for trove, with network_isolation enabled, trove guest agent will plug the user-defined port to database container by docker host_nic network driver which is implemented in this PR. docker host_nic network driver is a simple driver to plug host nic to a container. this driver supports ipv4,ipv6 and dual-stack. for more details please see the story. story: 2010733 task: 47957 Change-Id: I35d6f8b81a2c5e847cbed3f5bc6095dc1d387165
15 lines
309 B
Bash
Executable File
15 lines
309 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
|
systemctl enable $(svc-map guest-agent docker-hostnic.socket)
|
|
fi
|
|
|
|
if [[ ${SYNC_LOG_TO_CONTROLLER} == "True" ]]; then
|
|
systemctl enable guest-log-collection.timer
|
|
fi |