Merge "Nova: add live_migration_interface option"

This commit is contained in:
Zuul 2018-07-18 12:32:50 +00:00 committed by Gerrit Code Review
commit 45b7dabe23
4 changed files with 22 additions and 1 deletions

View File

@ -23,3 +23,17 @@ mkdir -p /var/lib/nova/instances
# Set Ownership of nova dirs to the nova user
chown ${NOVA_USER_UID} /var/lib/nova /var/lib/nova/instances
migration_interface="{{- .Values.conf.libvirt.live_migration_interface -}}"
if [[ -n $migration_interface ]]; then
# determine ip dynamically based on interface provided
migration_address=$(ip r | grep $migration_interface | grep -v default | awk '{print $9}')
fi
touch /tmp/pod-shared/nova-libvirt.conf
if [[ -n $migration_address ]]; then
cat <<EOF>/tmp/pod-shared/nova-libvirt.conf
[libvirt]
live_migration_inbound_addr = $migration_address
EOF
fi

View File

@ -20,4 +20,5 @@ set -ex
exec nova-compute \
--config-file /etc/nova/nova.conf \
--config-file /tmp/pod-shared/nova-console.conf
--config-file /tmp/pod-shared/nova-console.conf \
--config-file /tmp/pod-shared/nova-libvirt.conf

View File

@ -67,6 +67,8 @@ spec:
readOnly: true
- name: varlibnova
mountPath: /var/lib/nova
- name: pod-shared
mountPath: /tmp/pod-shared
{{- if .Values.conf.ceph.enabled }}
{{- if empty .Values.conf.ceph.cinder.keyring }}
- name: ceph-admin-keyring-placement

View File

@ -1040,6 +1040,10 @@ conf:
DEFAULT:
scheduler_host_manager: ironic_host_manager
compute_driver: ironic.IronicDriver
libvirt:
# Get the IP address to be used as the target for live migration traffic using interface name.
# If this option is set to None, the hostname of the migration target compute node will be used.
live_migration_interface:
nova:
DEFAULT:
log_config_append: /etc/nova/logging.conf