cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Shepherd <darren.s.sheph...@gmail.com>
Subject Re: ifconfig and MacAddress
Date Thu, 31 Oct 2013 00:20:02 GMT
Shoot, I didn't see your patch.  I just created a patch that
supersedes yours.  https://reviews.apache.org/r/15108/  The logic is
as follows

1. Look for MAC that matches interface of cluster.node.IP
2. Look for first interface alphabetically that has a non-linklocal address
3. Look for first interface alphabetically
4. Randomly generate a mac address

Darren

On Wed, Oct 30, 2013 at 4:27 PM, Laszlo Hornyak
<laszlo.hornyak@gmail.com> wrote:
> Hi,
>
> A patch to make MacAddress eat the Windows ipconfig output.
> https://reviews.apache.org/r/15106/
>
> I have one more question about how MacAddress should work. It seems it is
> returning the mac address of the first interface of the ipconfig/ifconfig
> output. Therefore if you configure up a new network, e.g. let libvirt start
> a new network or just plug in a usb wifi adapter, it may get something
> else. Does this meet the expectations?
>
>
>
>
> On Tue, Oct 29, 2013 at 8:18 PM, Laszlo Hornyak <laszlo.hornyak@gmail.com>wrote:
>
>> Hi,
>>
>> I will update my patch with a fix, but I also like Darran's solution: just
>> delete the class and/or use InetAddress
>>
>>
>>
>>
>> On Tue, Oct 29, 2013 at 6:42 PM, Kelven Yang <kelven.yang@citrix.com>wrote:
>>
>>>  Windows ipconfig is not supported, a fix is welcome.
>>>
>>>  To run a CS management server cluster on Windows. manual configuration
>>> is required. cluster.node.ip needs to configured correctly in db.properties
>>>
>>>  Kelven
>>>
>>>   From: Alex Huang <Alex.Huang@citrix.com>
>>> Date: Tuesday, October 29, 2013 at 8:43 AM
>>> To: Laszlo Hornyak <laszlo.hornyak@gmail.com>, "dev@cloudstack.apache.org"
>>> <dev@cloudstack.apache.org>
>>> Cc: Kelven Yang <kelven.yang@citrix.com>
>>> Subject: RE: ifconfig and MacAddress
>>>
>>>   I can confirm the code’s only there because Java didn’t have it before.
>>> ****
>>>
>>> ** **
>>>
>>> --Alex****
>>>
>>> ** **
>>>
>>> *From:* Laszlo Hornyak [mailto:laszlo.hornyak@gmail.com<laszlo.hornyak@gmail.com>]
>>>
>>> *Sent:* Monday, October 28, 2013 11:50 PM
>>> *To:* dev@cloudstack.apache.org
>>> *Cc:* Alex Huang; Kelven Yang
>>> *Subject:* Re: ifconfig and MacAddress****
>>>
>>> ** **
>>>
>>> Hi,
>>>
>>> I noticed other problem with the MacAddress, it appears that it does not
>>> handle the Windows ipconfig output.****
>>>
>>> (see related patch) https://reviews.apache.org/r/14514/ I tested it with
>>> win8, 7, and XP outputs****
>>>
>>> As far as I remember this may be a problem when running CS cluster on
>>> windows, since each node determines the default as id.****
>>>
>>> ** **
>>>
>>> On Sun, Oct 27, 2013 at 1:11 AM, Darren Shepherd <
>>> darren.s.shepherd@gmail.com> wrote:****
>>>
>>> Is there a specific reason that in MacAddress it uses "ifconfig" or
>>> other utilities to grab the Mac Address as opposed to the java API
>>> java.net.NetworkInterface?  There's a comment in that code that says
>>> that code was copied from some public domain utility.  So I'm guessing
>>> its there just because that's what somebody wrote back before Java 6
>>> introduced NetworkInteface.getHardwareAddress().  I'd like to rewrite
>>> this code to use the standard API, grab the Mac deterministically and
>>> also not use ifconfig which was deprecated 3 years ago.
>>>
>>> Darren****
>>>
>>>
>>>
>>>
>>> --
>>>
>>> EOF ****
>>>
>>
>>
>>
>> --
>>
>> EOF
>>
>
>
>
> --
>
> EOF

Mime
View raw message