<div dir="ltr">A few hours ago i was checking my compute nodes when i noticed that they have a load of 5 but they just run a few VMs. I started looking for problems and i found that quantum-openvswitch-agent was taking too much CPU time.<div>
<br></div><div>I checked the logs and found lots of these:</div><div><br></div><div><div>root@acelga:~# tail -f /var/log/quantum/openvswitch-agent.log</div><div>Exit code: 0</div><div>Stdout: '{attached-mac="fa:16:3e:66:8a:cb", iface-id="b8d3bb55-90bb-4a93-9daf-9d5da52171db", iface-status=active, vm-uuid="5406eca9-3b99-473d-b4e4-3ac53568a5a8"}\n'</div>
<div>Stderr: ''</div><div>2013-10-07 02:58:11    DEBUG [quantum.agent.linux.utils] Running command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvobe75299f-e5', 'external_ids']</div>
<div>2013-10-07 02:58:11    DEBUG [quantum.agent.linux.utils] </div><div>Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvof13c912d-35', 'external_ids']</div>
<div>Exit code: 0</div><div>Stdout: '{attached-mac="fa:16:3e:8e:7d:54", iface-id="f13c912d-3516-4ec2-9d60-5cc01db0b2e3", iface-status=active, vm-uuid="de1f79cd-7289-40d8-a5cf-acf43c089727"}\n'</div>
<div>Stderr: ''</div><div>2013-10-07 02:58:11    DEBUG [quantum.agent.linux.utils] Running command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvof4329543-aa', 'external_ids']</div>
<div>2013-10-07 02:58:12    DEBUG [quantum.agent.linux.utils] </div><div>Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvobe75299f-e5', 'external_ids']</div>
<div>Exit code: 0</div><div>Stdout: '{attached-mac="fa:16:3e:4f:92:9f", iface-id="be75299f-e597-4f37-85b5-e517883bbfeb", iface-status=active, vm-uuid="dd9783c1-344a-43b7-9cc1-b969c003f838"}\n'</div>
<div>Stderr: ''</div><div>2013-10-07 02:58:12    DEBUG [quantum.agent.linux.utils] Running command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvod00a1408-ad', 'external_ids']</div>
<div>2013-10-07 02:58:12    DEBUG [quantum.agent.linux.utils] </div><div>Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ovs-vsctl', '--timeout=2', 'get', 'Interface', 'qvof4329543-aa', 'external_ids']</div>
</div><div>...</div><div><div>
<br></div><div>It seems to be just a normal check interface message, but i just have 1 instance running on that compute node:</div><div><br></div><div><div>4oot@acelga:~# virsh list</div><div>setlocale: No such file or directory</div>
<div> Id    Name                           State</div><div>----------------------------------------------------</div><div> 1     instance-00000077              running</div><div><br></div><div>root@acelga:~# </div><div><br>
</div><div style>With just one network interface attached to it. So i checked ovs to see if there was something wrong.. and :</div><div style><br></div><div style><div>root@acelga:~# ovs-vsctl show</div><div>bb36ccf6-ba02-48df-970a-4b2b39b12e84</div>
<div>    Bridge "br-eth1"</div><div>        Port "eth1"</div><div>            Interface "eth1"</div><div>        Port "phy-br-eth1"</div><div>            Interface "phy-br-eth1"</div>
<div>        Port "br-eth1"</div><div>            Interface "br-eth1"</div><div>                type: internal</div><div>    Bridge br-int</div><div>        Port "qvoa017fc49-48"</div><div>            tag: 1</div>
<div>            Interface "qvoa017fc49-48"</div><div>        Port "qvo38b6ba57-81"</div><div>            tag: 1</div><div>            Interface "qvo38b6ba57-81"</div><div>        Port "qvo27d0051a-0d"</div>
<div>            tag: 1</div><div>            Interface "qvo27d0051a-0d"</div><div>        Port "int-br-eth1"</div><div>            Interface "int-br-eth1"</div><div>        Port "qvof4329543-aa"</div>
<div>            tag: 4095</div><div>            Interface "qvof4329543-aa"</div><div>        Port "qvo6bf34ce3-25"</div><div>            tag: 1</div><div>            Interface "qvo6bf34ce3-25"</div>
<div>        Port "qvo0c4c9cd8-2b"</div><div>            tag: 1</div><div>            Interface "qvo0c4c9cd8-2b"</div><div>           ...</div><div>        Port "qvo54a38640-30"<br></div><div>
            tag: 2</div><div>            Interface "qvo54a38640-30"</div><div>    ovs_version: "1.4.0+build0"</div></div><div><br></div><div style>Too many ports, way too many actually considering i'm running just one instance. A few weeks ago i did some tests, creating many instances deleting them and so on, so it could be related to that, maybe during delete operations the ovs ports weren't actually deleted and that's why i have so many of them. Did someone notice this behaviour before? How could i cleanly get rid of them? I'm runing most of the services in debug mode because the cloud is not in production yet.</div>
<div><br></div>-- <br><div dir="ltr">Pavlik Salles Juan José</div>
</div></div></div>