Mellanox / ceilometer_sriov_counters

Plugin for Ceilometer SRIOV traffic counters
2 stars 2 forks source link

Bugs: #1

Open ZTE-SuZhengwei opened 8 years ago

ZTE-SuZhengwei commented 8 years ago

1.it cann't deal with the vm which used mixed-type ports. 2.If one vm bond two sriov port,then it only get one sriov's io-state.

ghost commented 8 years ago

Hi,

  1. what openstack env are you using?
  2. do you have patch for issue1? or can you give me some logs
  3. I am not sure I understand you second issue? you can send me a mail directly moshele@mellanox.com or look for me openstack-neutron irc as moshele
ZTE-SuZhengwei commented 8 years ago

1.To one vm with mixed-type ports,after it firstly deal with no-sriov port, it returns and never deal with sriov port. I just raise it through your code logic and has not prove it.Please check by yourself. 2.my env is rhel7/kilo/libvirt 3.my env doesn't have this directory: COUNTERS_DEST = "/sys/class/net/%(if_name)s/vf%(vf)s/statistics/%(cnt_name)s" so I execute ""ethtool -S %s | grep 'VF %s'"% (if_name, vf_num)" to get vf's io-state. 4.I start a vm by below steps:

neutron port-create 493e444c-84b7-429c-baac-3550fd0e2f96 --name test_sriov_port --bond 1 --binding:vnic_type direct

neutron port-create --name test_sriov_port net-sriov-160 --bond 1 --binding:vnic_type direct

nova boot --flavor 3 --image e4879c04-5163-4337-8019-4717d79c408b --nic port-id=2ece494a-b4fb-4771-bfe0-c717989ac34c --availability-zone nova:tfg-8-123 test_sriov

then,I found the doman dumpxml of the vm: """ <! interface type='hostdev' managed='yes'> <! mac address='fa:16:3e:a2:82:2d'/> <! driver name='kvm'/> <! source> <! address type='pci' domain='0x0000' bus='0x84' slot='0x1f' function='0x5'/> <! /source> <! vlan> <! tag id='160'/> <! /vlan> <! alias name='hostdev0'/> <! address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> <! /interface> <! interface type='hostdev' managed='yes'> <! mac address='fa:16:3e:a2:82:2d'/> <! driver name='kvm'/> <! source> <! address type='pci' domain='0x0000' bus='0x84' slot='0x12' function='0x2'/> <! /source> <! vlan> <! tag id='160'/> <! /vlan> <! alias name='hostdev1'/> <! address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> <! /interface> """ It has two sriov port with the same mac_address.

ip link show

""" ... 4: enp132s0f0: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 9000 qdisc mq master ovs-system state DOWN mode DEFAULT qlen 1000 .... vf 9 MAC fa:16:3e:a2:82:2d, vlan 160, link-state auto ... 5: enp132s0f1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 9000 qdisc mq master ovs-system state UP mode DEFAULT qlen 1000 ..... vf 62 MAC fa:16:3e:a2:82:2d, vlan 160, link-state auto ... """ There are two vf, but your code only deal with the last one. I have improved it in my applying. if you need I will push it to github.

ghost commented 8 years ago

for issues 1 I see the mistake it would be great if you can submit a patch for it regarding "/sys/class/net/%(if_name)s/vf%(vf)s/statistics/%(cnt_name)s" this was mellanox propriety we can change it to ethtool you can submit for this as well regarding the bond issue, I didn't know openstack support --bond

ZTE-SuZhengwei commented 8 years ago

I don't know how to modify base on your project.This is my commit for openstack/ceilometer,please refer to it.

https://github.com/ZTE-SuZhengwei/ceilometer/commit/13dc880f6eb6f6ed6fd325c47d996d2ba00e85d9

lennybe commented 8 years ago

Fixed with f186d857cc010eca77e96a86276593d9f4a3fee0