Move o-hm0 dhcp config under /etc/dhcp

Apparmor will block dhclient from accessing the o-hm0 configuration file
under /etc/octavia. This patch moves our dhclient.conf under /etc/dhcp/octavia
to allow the dhclient to access the file when apparmor is running.

Change-Id: I3153f8bd9237470f406a9edeb4e2a0767fc747b8
Story: 1673269
Task: 5434
This commit is contained in:
Michael Johnson 2018-04-10 09:35:11 -07:00
parent 1f278e7ab3
commit ae1ab563e5
2 changed files with 5 additions and 3 deletions

View File

@ -305,8 +305,8 @@ function octavia_configure {
fi
# create dhclient.conf file for dhclient
mkdir -m755 -p $OCTAVIA_DHCLIENT_DIR
cp $OCTAVIA_DIR/etc/dhcp/dhclient.conf $OCTAVIA_DHCLIENT_CONF
sudo mkdir -m755 -p $OCTAVIA_DHCLIENT_DIR
sudo cp $OCTAVIA_DIR/etc/dhcp/dhclient.conf $OCTAVIA_DHCLIENT_CONF
if [[ "$OCTAVIA_USE_MOD_WSGI" == "True" ]]; then
if [[ "$WSGI_MODE" == "uwsgi" ]]; then

View File

@ -9,7 +9,9 @@ OCTAVIA_BIN_DIR=${OCTAVIA_BIN_DIR:-$(get_python_exec_prefix)}
OCTAVIA_CONF_DIR=${OCTAVIA_CONF_DIR:-"/etc/octavia"}
OCTAVIA_SSH_DIR=${OCTAVIA_SSH_DIR:-${OCTAVIA_CONF_DIR}/.ssh}
OCTAVIA_CERTS_DIR=${OCTAVIA_CERTS_DIR:-${OCTAVIA_CONF_DIR}/certs}
OCTAVIA_DHCLIENT_DIR=${OCTAVIA_DHCLIENT_DIR:-${OCTAVIA_CONF_DIR}/dhcp}
# This needs to be under /etc/dhcp for apparmor
# See https://storyboard.openstack.org/#!/story/1673269
OCTAVIA_DHCLIENT_DIR=${OCTAVIA_DHCLIENT_DIR:-"/etc/dhcp/octavia"}
OCTAVIA_DHCLIENT_CONF=${OCTAVIA_DHCLIENT_CONF:-${OCTAVIA_DHCLIENT_DIR}/dhclient.conf}
OCTAVIA_CONF=${OCTAVIA_CONF:-${OCTAVIA_CONF_DIR}/octavia.conf}
OCTAVIA_TEMPEST_DIR=${OCTAVIA_TEMPEST_DIR:-${OCTAVIA_DIR}/octavia/tests/tempest}