Il 19/03/2014 16:03, Antoni Segura Puimedon ha scritto: > > > ----- Original Message ----- >> From: "Dan Kenigsberg" <dan...@redhat.com> >> To: "Antoni Segura Puimedon" <asegu...@redhat.com> >> Cc: "Sandro Bonazzola" <sbona...@redhat.com>, "VDSM Project Development" >> <vdsm-devel@lists.fedorahosted.org> >> Sent: Wednesday, March 19, 2014 3:58:07 PM >> Subject: Re: [vdsm] creating ovirtmgmt bridge using tagged vlans >> >> On Wed, Mar 19, 2014 at 08:00:48AM -0400, Antoni Segura Puimedon wrote: >>> >>> >>> ----- Original Message ----- >>>> From: "Sandro Bonazzola" <sbona...@redhat.com> >>>> To: "VDSM Project Development" <vdsm-devel@lists.fedorahosted.org> >>>> Cc: "Antoni Segura Puimedon" <asegu...@redhat.com> >>>> Sent: Wednesday, March 19, 2014 12:54:45 PM >>>> Subject: creating ovirtmgmt bridge using tagged vlans >>>> >>>> Hi, >>>> I'm working on: Bug 1072027 - hosted-engine setup fails when using VLAN >>>> tagged interfaces >>>> >>>> Provided the following caps: >>>> >>>> # vdsClient -s localhost getVdsHardwareInfo >>>> systemFamily = 'Not Specified' >>>> systemManufacturer = 'Dell Inc.' >>>> systemProductName = 'OptiPlex 7010' >>>> systemSerialNumber = 'DYC5YX1' >>>> systemUUID = '4C4C4544-0059-4310-8035-C4C04F595831' >>>> systemVersion = '01' >>>> [root@dellserver network-scripts]# vdsClient -s localhost getVdsCap >>>> getVdsCapabilities getVdsCaps >>>> [root@dellserver network-scripts]# vdsClient -s localhost getVdsCaps >>>> HBAInventory = {'FC': [], 'iSCSI': [{'InitiatorName': >>>> 'iqn.1994-05.com.redhat:babababa'}]} >>>> ISCSIInitiatorName = 'iqn.1994-05.com.redhat:babababa' >>>> bondings = {'bond0': {'addr': '', >>>> 'cfg': {}, >>>> 'hwaddr': '5a:46:b1:db:ec:9b', >>>> 'ipv6addrs': [], >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'slaves': []}} >>>> bridges = {';vdsmdummy;': {'addr': '', >>>> 'cfg': {}, >>>> 'gateway': '', >>>> 'ipv6addrs': >>>> ['fe80::8c8a:edff:fe92:b332/64'], >>>> 'ipv6gateway': '::', >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'ports': [], >>>> 'stp': 'off'}} >>>> clusterLevels = ['3.0', '3.1', '3.2', '3.3', '3.4'] >>>> cpuCores = '4' >>>> cpuFlags = >>>> 'fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,aperfmperf,eagerfpu,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,ida,arat,epb,xsaveopt,pln,pts,dtherm,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,model_Nehalem,model_Conroe,model_coreduo,model_core2duo,model_Penryn,model_Westmere,model_n270,model_SandyBridge' >>>> cpuModel = 'Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz' >>>> cpuSockets = '1' >>>> cpuSpeed = '1864.156' >>>> cpuThreads = '8' >>>> emulatedMachines = ['pc', >>>> 'pc-q35-1.4', >>>> 'pc-q35-1.5', >>>> 'q35', >>>> 'isapc', >>>> 'pc-0.10', >>>> 'pc-0.11', >>>> 'pc-0.12', >>>> 'pc-0.13', >>>> 'pc-0.14', >>>> 'pc-0.15', >>>> 'pc-1.0', >>>> 'pc-1.1', >>>> 'pc-1.2', >>>> 'pc-1.3', >>>> 'pc-i440fx-1.4', >>>> 'pc-i440fx-1.5', >>>> 'none'] >>>> guestOverhead = '65' >>>> hooks = {} >>>> kvmEnabled = 'true' >>>> lastClient = '127.0.0.1' >>>> lastClientIface = 'lo' >>>> management_ip = '0.0.0.0' >>>> memSize = '15936' >>>> netConfigDirty = 'False' >>>> networks = {} >>>> nics = {'em1': {'addr': '192.168.1.105', >>>> 'cfg': {'DEVICE': 'em1', >>>> 'HWADDR': 'b8:ca:3a:76:9a:43', >>>> 'MTU': '1500', >>>> 'ONBOOT': 'yes'}, >>>> 'hwaddr': 'b8:ca:3a:76:9a:43', >>>> 'ipv6addrs': ['fe80::baca:3aff:fe76:9a43/64'], >>>> 'mtu': '1500', >>>> 'netmask': '255.255.255.0', >>>> 'speed': 1000}} >>>> operatingSystem = {'name': 'Fedora', 'release': '8', 'version': '19'} >>>> packages2 = {'kernel': {'buildtime': 1394207804.0, >>>> 'release': '100.fc19.x86_64', >>>> 'version': '3.13.6'}, >>>> 'libvirt': {'buildtime': 1387094943, >>>> 'release': '1.fc19', >>>> 'version': '1.1.3.2'}, >>>> 'mom': {'buildtime': 1391183561, 'release': '1.fc19', >>>> 'version': '0.4.0'}, >>>> 'qemu-img': {'buildtime': 1384762225, >>>> 'release': '2.fc19', >>>> 'version': '1.6.1'}, >>>> 'qemu-kvm': {'buildtime': 1384762225, >>>> 'release': '2.fc19', >>>> 'version': '1.6.1'}, >>>> 'spice-server': {'buildtime': 1383130020, >>>> 'release': '3.fc19', >>>> 'version': '0.12.4'}, >>>> 'vdsm': {'buildtime': 1394889953, >>>> 'release': '2.git7a51fe1.fc19', >>>> 'version': '4.14.5'}} >>>> reservedMem = '321' >>>> rngSources = ['random'] >>>> software_revision = '2' >>>> software_version = '4.14' >>>> supportedENGINEs = ['3.0', '3.1', '3.2', '3.3', '3.4'] >>>> supportedProtocols = ['2.2', '2.3'] >>>> uuid = '4C4C4544-0059-4310-8035-C4C04F595831' >>>> version_name = 'Snow Man' >>>> vlans = {'em1.5': {'addr': '', >>>> 'cfg': {'DEVICE': 'em1.5', >>>> 'HWADDR': 'b8:ca:3a:76:9a:43', >>>> 'MTU': '1500', >>>> 'ONBOOT': 'yes', >>>> 'VLAN': 'yes'}, >>>> 'iface': 'em1', >>>> 'ipv6addrs': ['fe80::baca:3aff:fe76:9a43/64'], >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'vlanid': 5}} >>>> vmTypes = ['kvm'] >>>> [root@dellserver network-scripts]# vdsClient -s localhost getVdsCaps >>>> iface=em1.5 >>>> HBAInventory = {'FC': [], 'iSCSI': [{'InitiatorName': >>>> 'iqn.1994-05.com.redhat:babababa'}]} >>>> ISCSIInitiatorName = 'iqn.1994-05.com.redhat:babababa' >>>> bondings = {'bond0': {'addr': '', >>>> 'cfg': {}, >>>> 'hwaddr': '5a:46:b1:db:ec:9b', >>>> 'ipv6addrs': [], >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'slaves': []}} >>>> bridges = {';vdsmdummy;': {'addr': '', >>>> 'cfg': {}, >>>> 'gateway': '', >>>> 'ipv6addrs': >>>> ['fe80::8c8a:edff:fe92:b332/64'], >>>> 'ipv6gateway': '::', >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'ports': [], >>>> 'stp': 'off'}} >>>> clusterLevels = ['3.0', '3.1', '3.2', '3.3', '3.4'] >>>> cpuCores = '4' >>>> cpuFlags = >>>> 'fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,aperfmperf,eagerfpu,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,ssse3,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,ida,arat,epb,xsaveopt,pln,pts,dtherm,tpr_shadow,vnmi,flexpriority,ept,vpid,fsgsbase,smep,erms,model_Nehalem,model_Conroe,model_coreduo,model_core2duo,model_Penryn,model_Westmere,model_n270,model_SandyBridge' >>>> cpuModel = 'Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz' >>>> cpuSockets = '1' >>>> cpuSpeed = '2287.164' >>>> cpuThreads = '8' >>>> emulatedMachines = ['pc', >>>> 'pc-q35-1.4', >>>> 'pc-q35-1.5', >>>> 'q35', >>>> 'isapc', >>>> 'pc-0.10', >>>> 'pc-0.11', >>>> 'pc-0.12', >>>> 'pc-0.13', >>>> 'pc-0.14', >>>> 'pc-0.15', >>>> 'pc-1.0', >>>> 'pc-1.1', >>>> 'pc-1.2', >>>> 'pc-1.3', >>>> 'pc-i440fx-1.4', >>>> 'pc-i440fx-1.5', >>>> 'none'] >>>> guestOverhead = '65' >>>> hooks = {} >>>> kvmEnabled = 'true' >>>> lastClient = '127.0.0.1' >>>> lastClientIface = 'lo' >>>> management_ip = '0.0.0.0' >>>> memSize = '15936' >>>> netConfigDirty = 'False' >>>> networks = {} >>>> nics = {'em1': {'addr': '192.168.1.105', >>>> 'cfg': {'DEVICE': 'em1', >>>> 'HWADDR': 'b8:ca:3a:76:9a:43', >>>> 'MTU': '1500', >>>> 'ONBOOT': 'yes'}, >>>> 'hwaddr': 'b8:ca:3a:76:9a:43', >>>> 'ipv6addrs': ['fe80::baca:3aff:fe76:9a43/64'], >>>> 'mtu': '1500', >>>> 'netmask': '255.255.255.0', >>>> 'speed': 1000}} >>>> operatingSystem = {'name': 'Fedora', 'release': '8', 'version': '19'} >>>> packages2 = {'kernel': {'buildtime': 1394207804.0, >>>> 'release': '100.fc19.x86_64', >>>> 'version': '3.13.6'}, >>>> 'libvirt': {'buildtime': 1387094943, >>>> 'release': '1.fc19', >>>> 'version': '1.1.3.2'}, >>>> 'mom': {'buildtime': 1391183561, 'release': '1.fc19', >>>> 'version': '0.4.0'}, >>>> 'qemu-img': {'buildtime': 1384762225, >>>> 'release': '2.fc19', >>>> 'version': '1.6.1'}, >>>> 'qemu-kvm': {'buildtime': 1384762225, >>>> 'release': '2.fc19', >>>> 'version': '1.6.1'}, >>>> 'spice-server': {'buildtime': 1383130020, >>>> 'release': '3.fc19', >>>> 'version': '0.12.4'}, >>>> 'vdsm': {'buildtime': 1394889953, >>>> 'release': '2.git7a51fe1.fc19', >>>> 'version': '4.14.5'}} >>>> reservedMem = '321' >>>> rngSources = ['random'] >>>> software_revision = '2' >>>> software_version = '4.14' >>>> supportedENGINEs = ['3.0', '3.1', '3.2', '3.3', '3.4'] >>>> supportedProtocols = ['2.2', '2.3'] >>>> uuid = '4C4C4544-0059-4310-8035-C4C04F595831' >>>> version_name = 'Snow Man' >>>> vlans = {'em1.5': {'addr': '', >>>> 'cfg': {'DEVICE': 'em1.5', >>>> 'HWADDR': 'b8:ca:3a:76:9a:43', >>>> 'MTU': '1500', >>>> 'ONBOOT': 'yes', >>>> 'VLAN': 'yes'}, >>>> 'iface': 'em1', >>>> 'ipv6addrs': ['fe80::baca:3aff:fe76:9a43/64'], >>>> 'mtu': '1500', >>>> 'netmask': '', >>>> 'vlanid': 5}} >>>> vmTypes = ['kvm'] >>>> >>>> >>>> How have I to call vdsClient addNetwork for creating the bridge using >>>> em1.5 ? >>> >>> vdsClient -s 0 addNetwork bridge=ovirtmgmt nics=em1 vlan=5 # And the >>> bootproto/ipaddr config you want after that. >> >> However, if you value your sanity, you'd try to avoid that command line >> and do: >> >> from vdsm import vdscli >> s = vdscli.connect() >> s.setupNetwork( >> {'netname': {'vlan': 5}, 'nic': 'em1', 'bootproto': 'dhcp', > the line above should be > {'netname': {'vlan': 5, 'nic': 'em1', 'bootproto': 'dhcp', >> 'blockingdhcp': True}, >> {}, >> {'connectivityCheck': False} >> ) >>
Thanks all for the help. I'll consider migrating from vdsClient call to vdscli API usage. On early days of hosted-engine vdsClient running as separate process gave less trouble than the API cli. Will test it a bit. -- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com _______________________________________________ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel