Petr Horáček has uploaded a new change for review.
Change subject: Revert "virt net: Change graphics type from network to address"
......................................................................
Revert "virt net: Change graphics type from network to address"
Now we save even OVS networks in libvirt database. This change is
not needed anymore.
TODO: get rid of migration hooking
This reverts commit 114e4805196f200f894d70c75cc4a001430f7bc4.
Change-Id: I1683997318df0188bc180328af15282ed2099ed0
---
M vdsm/virt/vmdevices/graphics.py
1 file changed, 5 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/65098/1
diff --git a/vdsm/virt/vmdevices/graphics.py b/vdsm/virt/vmdevices/graphics.py
index 62a1868..0b441e2 100644
--- a/vdsm/virt/vmdevices/graphics.py
+++ b/vdsm/virt/vmdevices/graphics.py
@@ -18,9 +18,10 @@
# Refer to the README and COPYING files for full details of the license
#
+import logging
+
import libvirt
-from vdsm import supervdsm
from vdsm.network import api as net_api
from vdsm import utils
from vdsm.config import config
@@ -140,17 +141,7 @@
graphics.appendChildWithArgs('channel', name=chan,
mode='secure')
- # For the listen type IP to be used, the display network must be OVS.
- # We assume that the cluster in which the host operates is OVS enabled
- # and all other hosts in the cluster have the migration hook installed.
- # The migration hook is responsible to convert ip to net and vice versa
- display_network = self.specParams.get('displayNetwork')
- display_ip = self.specParams.get('displayIp', '0')
- if (display_network and display_ip != '0' and
- supervdsm.getProxy().ovs_bridge(display_network)):
- graphics.appendChildWithArgs(
- 'listen', type='address', address=display_ip)
- elif display_network:
+ if self.specParams.get('displayNetwork'):
graphics.appendChildWithArgs(
'listen', type='network',
network=net_api.netname_o2l(
@@ -220,16 +211,11 @@
def _getNetworkIp(network):
try:
nets = net_api.libvirt_networks()
- # On a legacy based network, the device is the iface specified in the
- # network report (supporting real bridgeless networks).
- # In case the report or the iface key is missing,
- # the device is defaulted to the network name (i.e. northbound port).
- device = (nets[network]['iface'] or network
- if network in nets else network)
+ device = nets[network]['iface'] or network
ip, _, _, _ = net_api.ip_addrs_info(device)
except (libvirt.libvirtError, KeyError, IndexError):
ip = config.get('addresses', 'guests_gateway_ip')
- finally:
if ip == '':
ip = '0'
+ logging.info('network %s: using %s', network, ip)
return ip
--
To view, visit
https://gerrit.ovirt.org/65098
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1683997318df0188bc180328af15282ed2099ed0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>