Created
August 6, 2017 09:06
-
-
Save yosshy/3d6a196bb945db41b4779fbb85517dbf to your computer and use it in GitHub Desktop.
Patch for OVN metadata proxy in RDO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diff -u a/networking_ovn/agent/metadata/agent.py b/networking_ovn/agent/metadata/agent.py | |
--- a/networking_ovn/agent/metadata/agent.py 2017-07-14 19:58:10.000000000 +0900 | |
+++ b/networking_ovn/agent/metadata/agent.py 2017-08-06 18:41:39.129119566 +0900 | |
@@ -248,8 +248,7 @@ | |
# addresses, then tear the namespace down if needed. This might happen | |
# when there are no subnets yet created so metadata port doesn't have | |
# an IP address. | |
- if not (port and port.mac and | |
- port.external_ids.get(ovn_const.OVN_CIDRS_EXT_ID_KEY, None)): | |
+ if not (port and port.mac): | |
LOG.debug("There is no metadata port for datapath %s or it has no " | |
"MAC or IP addresses configured, tearing the namespace " | |
"down if needed", datapath) | |
@@ -268,8 +267,7 @@ | |
return | |
mac = match.group() | |
- ip_addresses = set( | |
- port.external_ids[ovn_const.OVN_CIDRS_EXT_ID_KEY].split(' ')) | |
+ ip_addresses = set(port.mac[0].split(' ')[1:]) | |
ip_addresses.add(METADATA_DEFAULT_CIDR) | |
metadata_port = MetadataPortInfo(mac, ip_addresses) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment