qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/qemu_iotests: Minimize usage of used ports


From: Max Reitz
Subject: Re: [PATCH] tests/qemu_iotests: Minimize usage of used ports
Date: Fri, 7 Feb 2020 09:24:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 06.02.20 19:33, Lukáš Doktor wrote:
> Dne 06. 02. 20 v 17:59 Max Reitz napsal(a):
>> On 06.02.20 17:48, Eric Blake wrote:
>>> On 2/6/20 10:37 AM, Max Reitz wrote:

[...]

>>>> OTOH, would it work if we just did a %s/localhost/127.0.0.1/ in the
>>>> test?  We have specific cases for IPv6, so I think it makes sense to
>>>> force IPv4 in all other cases.
>>>
>>> Except then it will fail on machines configured for IPv6-only.
>>
>> So we’ll just have to test whether IPv4 works, just like we already do
>> for IPv6, no?
>>
> 
> Sure, using ::1 for IPv6 and 127.0.0.1 for IPv4 cases would work. The 
> question is whether the behavior is really expected. In migration it was 
> considered dangerous, because you can have 2 VMs starting the migration at 
> the same time. They both might attempt to get the same port, one would 
> receive IPv4 the other IPv6. Then depending on the order of start migrate you 
> might end-up attempting to migrate the other VMs instead of the intended ones.
> 
> The same can happen here, you might start 2 nbd exports at the same time, get 
> the same port without any failures and then depending on luck get the right 
> or wrong export when attempting to connect. So I think bailing out in case we 
> fail to get all interfaces would be the most appropriate (note the same 
> situation is for 0.0.0.0 where you might end-up serving multiple different 
> disks on different interfaces). Anyway I leave it to you. If you decide you 
> don't want to fail than using ::1/127.0.0.1 sounds like a good idea. 
> Otherwise it'd make sense to create a test that especially uses ::1 and then 
> localhost to make sure it bails-out.

OK.  I’ll defer to Eric on that one. O:-)

Max




reply via email to

[Prev in Thread] Current Thread [Next in Thread]