Commit 1cc831ea authored by Guido Trotter's avatar Guido Trotter
Browse files

KVM: only export instance tags if present

Currently non-tagged instances fail starting with a TypeError.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
Reviewed-by: default avatarBalazs Lecz <>
parent ace6cbe8
......@@ -287,7 +287,8 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
script.write("export BRIDGE=%s\n" % nic.nicparams[constants.NIC_LINK])
script.write("export INTERFACE=$1\n")
script.write("export TAGS=\"%s\"\n" % " ".join(instance.tags))
if instance.tags:
script.write("export TAGS=\"%s\"\n" % " ".join(instance.tags))
# TODO: make this configurable at ./configure time
script.write("if [ -x '%s' ]; then\n" % self._KVM_NETWORK_SCRIPT)
script.write(" # Execute the user-specific vif file\n")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment