Hello, Some time ago I introduced basic test for DHCP agent in fullstack tests ([1]). Now I want to add test(s) for HA of DHCP agent - I started it in [2]. I want to add which will: * create environment with 2 hosts and 2 dhcp agents, * spawn FakeMachine and check if it will get IP address, * kill DHCP agent which hosts DHCP for created network, * wait a while and check if another DHCP agent starts hosting this network, * spawn new FakeMachine and check if it will get IP address from DHCP
So it looks quite easy but there is one problem. Dhcp agent creates network namespace with name "qdhcp-<network_id>" and spawn there dnsmasq process. This dnsmasq is using tap interface in this namespace. So when I killed first dhcp agent, it not removes qdhcp-<network_id> namespace so second agent want's to "reuse" it. Problem is that in this namespace still is running dnsmasq spawned by first agent. So I think that best solution would be to change somehow DHCP agent that each agent will create namespaces with names like "qdhcp-<networ_id>-some-random-suffix". And my question is how to do it in easiest way? I wanted to do it in same way how it is in L3 agent in fullstack but I would need to "override" couple methods from agent only for tests and I don't think it's good idea. Maybe someone more experienced will have some better ideas how to do it. [1] https://review.openstack.org/#/c/409432/ [2] https://review.openstack.org/#/c/413994/ -- Best regards / Pozdrawiam Sławek Kapłoński sla...@kaplonski.pl
signature.asc
Description: PGP signature
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev