registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #08936
Re: [Bug 608505] Re: Error in unit test NetworkTestCase test_subnet_edge
This looks like a legit bug to me - I remember adding the release_ip stuff
when we added the dhcpleasor process.
Remember that, in production, nova-dhcpleasor is called directly from
dnsmasq, so we don't have an opportunity to check the error code. But I
agree we ought to be doing it in the tests.
On Thu, Jul 22, 2010 at 11:38 AM, justinsb
<608505@xxxxxxxxxxxxxxxxxx>wrote:
> The error only appears if you introduce another patch that checks the
> exit code of the self.dnsmasq.release_ip sub-process. That change is in
> my abstract-data-stores branch. I was sort of hoping we could just
> agree that the unit test was wrong, rather than my doing yet another
> branch, but I could do that if people want.
>
> In general, we're not very good at checking exit codes from
> subprocesses, and I think that needs to be cleaned up. Maybe I could
> start a branch to do that 'big picture' change...
>
> --
> Error in unit test NetworkTestCase test_subnet_edge
> https://bugs.launchpad.net/bugs/608505
> You received this bug notification because you are a member of Nova
> Bugs, which is subscribed to OpenStack Compute (nova).
>
> Status in OpenStack Compute (Nova): New
>
> Bug description:
> I think there's a bug in this unit test (I turned on exit code checking of
> the spawned bin/nova-dhcpbridge)
>
> The test looks like this:
>
> def test_subnet_edge(self):
> secondaddress = network.allocate_ip("netuser", "project0",
> utils.generate_mac())
> hostname = "toomany-hosts"
> for project in range(1,5):
> <snip>
> net = network.get_project_network("project0", "default")
> rv = network.deallocate_ip(secondaddress)
> self.dnsmasq.release_ip(mac, address, hostname, net.bridge_name)
>
> and I think that last line should read:
> self.dnsmasq.release_ip(mac, secondaddress, hostname,
> net.bridge_name)
>
> Address is declared inside the loop, but it is also freed inside the loop
>
>
>
--
Error in unit test NetworkTestCase test_subnet_edge
https://bugs.launchpad.net/bugs/608505
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack.
References