Bug 1234867 - support ovs via vdsm hook
Summary: support ovs via vdsm hook
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Petr Horáček
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-23 12:13 UTC by Petr Horáček
Modified: 2021-11-15 13:30 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-06-15 08:29:42 UTC
oVirt Team: Network
Embargoed:


Attachments (Terms of Use)
journal log of failed openvswitch start (5.30 KB, text/plain)
2015-12-18 15:09 UTC, Petr Horáček
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-44022 0 None None None 2021-11-15 13:30:53 UTC
oVirt gerrit 40882 0 None NEW network: allow custom bondOption Never
oVirt gerrit 41840 0 None MERGED tests: network: when using bonding, attach at least 2 slaves Never
oVirt gerrit 43148 0 ovirt-3.5 ABANDONED net: bonding: validate options based on pre-dumped ones Never
oVirt gerrit 43149 0 ovirt-3.5 ABANDONED network: allow custom bondOption Never
oVirt gerrit 43274 0 ovirt-3.5 ABANDONED hooks: introduce before/after_get_stats hook points Never
oVirt gerrit 49687 0 ovirt-3.6 MERGED net: sysctl: enable ipv6 Never
oVirt gerrit 49688 0 ovirt-3.6 MERGED hooks: after_network_setup_fail Never
oVirt gerrit 49689 0 ovirt-3.6 MERGED hooks: Open vSwitch configurator Never
oVirt gerrit 49690 0 ovirt-3.6 MERGED net: multicast snooping is not supported by ovs until 2.4.0 Never
oVirt gerrit 49691 0 ovirt-3.6 MERGED hooks: ovs: move libvirt configuration into a separate module Never
oVirt gerrit 49692 0 ovirt-3.6 MERGED hooks: ovs: remove unused parameter Never
oVirt gerrit 49693 0 ovirt-3.6 MERGED hooks: ovs: better rollback Never
oVirt gerrit 49694 0 ovirt-3.6 MERGED hooks: ovs: pass ip configuration as a namedtuple Never
oVirt gerrit 49695 0 ovirt-3.6 MERGED net: ovs: remove initial nic ip, dont touch unchanged networks Never
oVirt gerrit 49696 0 ovirt-3.6 MERGED hooks: ovs: add script name to log Never
oVirt gerrit 49697 0 ovirt-3.6 MERGED hooks: ovs: use six.iteritems and six.itervalues Never
oVirt gerrit 49698 0 ovirt-3.6 MERGED hooks: ovs: fix getVdsCaps and getVdsStats Never
oVirt gerrit 49977 0 ovirt-3.6 MERGED hooks: ovs: run ovs _configure only if there are changes to do Never
oVirt gerrit 50981 0 ovirt-3.6 MERGED network: caps vlan vlanid property has to be int 2015-12-28 12:04:39 UTC
oVirt gerrit 50982 0 ovirt-3.6 MERGED hooks: ovs: show vlan in caps ports 2015-12-28 12:06:05 UTC
oVirt gerrit 52346 0 ovirt-3.6 MERGED hooks: ovs: fix bonded network change problem 2016-02-08 12:08:54 UTC
oVirt gerrit 52347 0 master MERGED hooks: ovs: support hot-plugged vnics 2016-02-18 13:50:11 UTC
oVirt gerrit 52348 0 ovirt-3.6 MERGED hooks: ovs: support hot-plugged vnics 2016-02-18 13:50:44 UTC
oVirt gerrit 52851 0 ovirt-3.6 MERGED hooks: ovs: don't log every stats change 2016-02-01 12:41:03 UTC
oVirt gerrit 52920 0 master MERGED hooks: ovs: don't log every stats change 2016-02-01 12:33:47 UTC
oVirt gerrit 55071 0 ovirt-3.6 MERGED ovs: hook: fake bridgeless networks 2016-03-23 20:00:55 UTC
oVirt gerrit 55827 0 master MERGED hook: ovs: assert custom bond opts with ':' 2016-04-08 06:52:45 UTC
oVirt gerrit 55828 0 ovirt-3.6 MERGED hook: ovs: assert custom bond opts with ':' 2016-04-08 06:55:08 UTC
oVirt gerrit 55841 0 master MERGED net: move parse_bond_options to netinfo.bonding 2016-04-13 09:11:07 UTC
oVirt gerrit 55860 0 master MERGED utils: move rget to utils 2016-04-12 12:16:28 UTC
oVirt gerrit 55865 0 master NEW net: canonicalize switch type from custom options 2016-04-12 12:48:45 UTC
oVirt gerrit 55890 0 ovirt-3.6 MERGED hooks: ovs: convert 'bridge' attr to boolean 2016-04-11 11:12:46 UTC
oVirt gerrit 55892 0 master MERGED hook: ovs: report network iface expeted by engine 2016-04-12 20:19:01 UTC
oVirt gerrit 55893 0 master MERGED hook: ovs: report ip info on expected top device 2016-04-14 12:13:52 UTC
oVirt gerrit 55894 0 ovirt-3.6 MERGED hook: ovs: report network iface expeted by engine 2016-04-12 20:20:12 UTC
oVirt gerrit 55895 0 ovirt-3.6 MERGED hook: ovs: report ip info on expected top device 2016-04-12 12:03:39 UTC
oVirt gerrit 55897 0 ovirt-3.6 MERGED hooks: ovs: set OVS devices UP 2016-04-11 13:58:47 UTC
oVirt gerrit 55954 0 master MERGED net: test: fix custom bond option separator 2016-04-12 14:24:51 UTC
oVirt gerrit 55955 0 ovirt-3.6 MERGED net: test: fix custom bond option separator 2016-04-12 14:25:17 UTC
oVirt gerrit 57884 0 ovirt-3.6 ABANDONED hooks: remove hard openvswitch dependency 2016-05-30 17:02:22 UTC

Description Petr Horáček 2015-06-23 12:13:32 UTC

Comment 1 Petr Horáček 2015-12-18 15:09:59 UTC
Created attachment 1107194 [details]
journal log of failed openvswitch start

On Fedora 22, when I try to create an OVS bridge, it fails and does not create the bridge in system:

    [root@phoracekvm02 ~]# ovs-vsctl add-br br1
    ovs-vsctl: Error detected while setting up 'br1'.  See ovs-vswitchd log for details.

When I set selinux to permissive mode and then restart openvswitch service, it works as it should.

See attached journal log.

Comment 2 Meni Yakove 2016-01-24 14:15:49 UTC
On every network create there is an error in the log:
jsonrpc.Executor/1::INFO::2016-01-24 10:42:21,923::netinfo::495::root::(_getNetInfo) Obtaining info for net net_78.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 474, in _getNetInfo
    data.update({'ports': ports(iface),
  File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 187, in ports
    return os.listdir('/sys/class/net/' + bridge + '/brif')
OSError: [Errno 2] No such file or directory: '/sys/class/net/net_78/brif'




VDSM log is spammed with 'ovs_after_get_stats' and every hour the VDSM log is rotating.

Comment 3 Michael Burman 2016-03-28 13:43:06 UTC
Hi Petr,

Please note that i found some things that should be fixed and taken care as well:

1) Remove the execute(a-x) permissions for  /usr/libexec/vdsm/hooks/after_get_stats/ovs_utils.py 
It should have no execute permissions at all. 

2) When attaching a network that has the customProperty ovs=true to a NIC via Setup Networks it should bring the interface UP, like with regular networks. 
Currently, if the interface was DOWN and we attaching network with 'ovs' property to him, it remains DOWN, but we should take care of it and it should go UP.

Comment 4 Michael Burman 2016-03-28 15:33:05 UTC
Hi again,

Another issue found in :
vi /usr/libexec/vdsm/hooks/before_network_setup/ovs_utils.py +64
When trying to create a ovs bond via UI and pass the next syntax: 
custom=ovs=True in the custom bond mode filed

def get_bond_options(options, keep_custom=False):
    """ Parse bonding options into dictionary, if keep_custom is set to True,
    custom option will not be recursive parsed.
    >>> get_bond_options('mode=4 custom=foo=yes,bar=no')
    {'custom': {'bar': 'no', 'foo': 'yes'}, 'mode': '4'}
    """
    def _string_to_dict(str, div):
        if options == '':
            return {}
        return dict(option.split('=', 1)
                    for option in str.strip(div).split(div))
    def _custom_dict(str, div):
        if options == '':
            return {}
        return dict((option, True)
                    for option in str.strip(div).split(div))
    if options:
        d_options = _string_to_dict(options, ' ')
        if d_options.get('custom') and not keep_custom:
            d_options['custom'] = _custom_dict(d_options['custom'], ',')
        return d_options
    else:
        return {}

We have a limitation on the engine side about the syntax -->
<key>=<value> separate with space and vdsm excepts to custom=ovs=True.

Currently Danken changed the code to except custom=ovs ^^ 
This should be taken care as well.

Comment 5 Red Hat Bugzilla Rules Engine 2016-04-07 15:03:15 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.


Note You need to log in before you can comment on or make changes to this bug.