Bug 770681 - [ovirt] [vdsm] bridge creation is skipped in case nic is already a part of ANY bridge
Summary: [ovirt] [vdsm] bridge creation is skipped in case nic is already a part of AN...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2
Assignee: Alon Bar-Lev
QA Contact:
URL:
Whiteboard: network
Depends On: bootstrap-rewrite
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-28 10:29 UTC by Haim
Modified: 2014-01-13 00:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-15 06:47:47 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

Description Haim 2011-12-28 10:29:23 UTC
Description of problem:

scenario:
########
- host installation 

case:
#####
- host is already configured with bridge - any bridge, with regardless of its 
  name
- setNetworking function is skipped since host nic is already a part of bridge, 
  which means, host won't be able to participate in engine cluster, as it will 
  miss the required bridge name.

cause:
######

I think that the problem is with the following function, as it doesn't check if bridge exits and brdigeName == MGT_BRIDGE_NAME but only if nic is a part of bridge.

def _getBridgeParams(bridgeName):
    import shlex

    fIsBridgeDevice = False
    lstReturn = []
    fileName = IFACE_CONFIG + bridgeName

    try:
        for line in file(fileName):
            line = line.strip()
            if line.startswith("DEVICE=") or \
               line.startswith("#") or \
               line.startswith("HWADDR="):
                pass
            elif line.startswith("TYPE="):
                t = line.split("=", 1)[1].strip()
                fIsBridgeDevice = (t == "Bridge")
            else:
                try:
                    line = ''.join(shlex.split(line))
                except:
                    logging.warn("_getBridgeParams: failed to read parse line %s", line)
                lstReturn.append(line)
    except Exception, e:
        logging.error("_getBridgeParams: failed to read params of file " + fileName + ".\n Error:" + str(e))
        lstReturn = []

    return lstReturn, fIsBridgeDevice

git d68a46fe522d6e14e66cc5e093ceb9cdfb750792

Comment 1 Dan Kenigsberg 2012-01-05 10:31:12 UTC
I am not sure this is even a bug; it is an unexpected feature. If management is connected across a bridge device, no new bridge is created, and installation continues with no error.

However, in ovirt-engine perspective, the host lacks the proper network.

So yeah, installation should either fail, or replace the existing bridge with the requested one.

Comment 2 Haim 2012-01-05 11:49:50 UTC
(In reply to comment #1)
> I am not sure this is even a bug; it is an unexpected feature. If management is
> connected across a bridge device, no new bridge is created, and installation
> continues with no error.
> 
> However, in ovirt-engine perspective, the host lacks the proper network.
> 
> So yeah, installation should either fail, or replace the existing bridge with
> the requested one.

+1 for failing the installation.

Comment 8 Alon Bar-Lev 2012-11-28 09:22:52 UTC
This is solved in new bootstrap, the bridge name is compared to whatever expected if it is different than installation skips.

Comment 9 Itamar Heim 2013-01-16 16:10:18 UTC
3.2 beta built, moving to ON_QA status to allow testing


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