[Users] install a f18 host with ovirtmgmt vlan tagged
Jeff Bailey
bailey at cs.kent.edu
Thu Mar 7 23:29:28 UTC 2013
On 3/7/2013 11:05 AM, Gianluca Cecchi wrote:
> On Thu, Mar 7, 2013 at 4:38 PM, Gianluca Cecchi
> <gianluca.cecchi at gmail.com> wrote:
>> On Thu, Mar 7, 2013 at 3:58 PM, Gianluca Cecchi wrote:
>>> # cat ifcfg-em3.65
>>> DEVICE=em3.65
>>> ONBOOT=yes
>>> BOOTPROTO=none
>>> VLAN=yes
>>> IPADDR=10.4.4.57
>>> NETMASK=255.255.255.0
>>> GATEWAY=10.4.4.250
>>> NM_CONTROLLED=no
>>>
>>> How should I configure the host at the beginning to have ovirtmgmt
>>> configured as VLAN tagged and host deploy with no complain?
>>>
>>> Thanks in advance,
>>> Gianluca
>> Tried also the alternative configuration with ifcfg-vlan65 instead of
>> ifcfg-em3.65:
>>
>> # cat ifcfg-vlan65
>> DEVICE=vlan65
>> PHYSDEV=em3
>> ONBOOT=yes
>> BOOTPROTO=none
>> VLAN=yes
>> IPADDR=10.4.4.57
>> NETMASK=255.255.255.0
>> GATEWAY=10.4.4.250
>> NM_CONTROLLED=no
>>
>> But I get
>> Failed to execute stage 'Setup validation': Interface vlan65 is VLAN
>> interface However its configuration is unexpected.
>>
>> Possibly the involved code is on engine
>> /usr/share/otopi/plugins/ovirt-host-deploy/vdsm/bridge.py ?
>>
>> In host-deploy log:
>>
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> bridge._getInterfaceForDestination:302 determine interface
>> for 10.4.4.60
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> plugin.executeRaw:347 execute: ('/sbin/ip', 'route', 'get'
>> , 'to', '10.4.4.60'), executable='None', cwd='None', env=None
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> plugin.executeRaw:364 execute-result: ('/sbin/ip', 'route'
>> , 'get', 'to', '10.4.4.60'), rc=0
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> plugin.execute:411 execute-output: ('/sbin/ip', 'route', '
>> get', 'to', '10.4.4.60') stdout:
>> 10.4.4.60 dev vlan65 src 10.4.4.57
>> cache
>>
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> plugin.execute:416 execute-output: ('/sbin/ip', 'route', '
>> get', 'to', '10.4.4.60') stderr:
>>
>>
>> 2013-03-07 16:31:53 DEBUG otopi.plugins.ovirt_host_deploy.vdsm.bridge
>> bridge._getInterfaceForDestination:337 interface for 10.4.
>> 4.60 is vlan65
>> 2013-03-07 16:31:53 DEBUG otopi.context context._executeMethod:130
>> method exception
>> Traceback (most recent call last):
>> File "/tmp/ovirt-xz8p0a0BfX/pythonlib/otopi/context.py", line 120,
>> in _executeMethod
>> method['method']()
>> File "/tmp/ovirt-xz8p0a0BfX/otopi-plugins/ovirt-host-deploy/vdsm/bridge.py",
>> line 733, in _validation
>> self._getVlanMasterDevice(name=interface)
>> File "/tmp/ovirt-xz8p0a0BfX/otopi-plugins/ovirt-host-deploy/vdsm/bridge.py",
>> line 393, in _getVlanMasterDevice
>> interface=name,
>> RuntimeError: Interface vlan65 is VLAN interface However its
>> configuration is unexpected
>> 2013-03-07 16:31:53 ERROR otopi.context context._executeMethod:139
>> Failed to execute stage 'Setup validation': Interface vlan65 is VLAN
>> interface However its configuration is unexpected
>>
>>
>> Do I have perhaps to name it ovirtmgmt from the beginning?
>>
>> Gianluca
> I'm all but a python expert.....
>
> but I think these blocks in
> /usr/share/otopi/plugins/ovirt-host-deploy/vdsm/bridge.py are the ones
> involved
Yes, I ran into this same problem with _RE_VLAN_ID not matching on
whitespace instead of an actual space (there's a tab in the output).
Alon submitted a patch last month but I don't remember if it has made it
into a released rpm. Here's the relevant part:
--- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py
+++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py
@@ -128,8 +128,9 @@ class Plugin(plugin.PluginBase):
_RE_VLAN_ID = re.compile(
flags=re.VERBOSE,
pattern=r"""
+ ^
.*
- VID: ([0-9]+)
+ \sVID:\s(\d+)\s
.*
"""
)
> ...
> _RE_VLAN_ID = re.compile(
> flags=re.VERBOSE,
> pattern=r"""
> .*
> VID: ([0-9]+)
> .*
> """
> )
> _RE_VLAN_ID_VLANID = 1
>
> _RE_VLAN_DEVICE = re.compile(
> flags=re.VERBOSE,
> pattern=r"""
> ^
> Device:
> \s+
> (\S+)
> \s*
> $
> """
> )
> _RE_VLAN_DEVICE_DEVICE = 1
>
> ...
>
>
> def _getVlanMasterDevice(self, name):
> interface = None
> vlanid = None
> try:
> with open(
> os.path.join(
> '/proc/net/vlan',
> name
> ),
> 'r'
> ) as f:
> for line in f:
> m = self._RE_VLAN_ID.match(line)
> if m is not None:
> vlanid = m.group(self._RE_VLAN_ID_VLANID)
> else:
> m = self._RE_VLAN_DEVICE.match(line)
> if m is not None:
> interface = m.group(self._RE_VLAN_DEVICE_DEVICE)
>
> if interface is None or vlanid is None:
> raise RuntimeError(
> ...
>
> In my case:
> # cat /proc/net/vlan/vlan65
> vlan65 VID: 65 REORDER_HDR: 1 dev->priv_flags: 1
> total frames received 1910
> total bytes received 1319518
> Broadcast/Multicast Rcvd 4
>
> total frames transmitted 2232
> total bytes transmitted 426338
> Device: em3
> INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
> EGRESS priority mappings:
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
More information about the Users
mailing list