[one-users] wrong gateway detected by vm-context

Javier Fontan jfontan at opennebula.org
Tue Feb 17 02:40:48 PST 2015


We should probably take out the code that generates the gateway as it only
gives problems:

https://github.com/OpenNebula/addon-context-linux/blob/master/base_rpm/etc/one-context.d/00-network#L68-L73

Concerning the GATEWAY_INTERFACE, this variable contains a number or the
ETH<num> that appears in the context file. In fact it is not the name of
the interface as with the new naming scheme it can be called with a
different name, for example en3p8.

http://en.wikipedia.org/wiki/Consistent_Network_Device_Naming

Cheers

On Fri Feb 13 2015 at 1:49:42 PM Madko <madko77 at gmail.com> wrote:

> I have found the solution. GATEWAY_IFACE must be set, but in upper case. I
> don't know why. Any idea? If I put GATEWAY_IFACE=eth1 (eth1 is the real
> name) it doesn't work, but GATEWAY_IFACE=ETH1 works...
>
> Le Fri Feb 13 2015 at 10:03:33, Madko <madko77 at gmail.com> a écrit :
>
> Hi,
>>
>> It seems vmcontext scripts try to guess the gateway IP as soon as any
>> interface has a gateway set.
>>
>> Here is my case:
>> one vm with eth0 to internal admin network, and eth1 to wan. Only eth1
>> has a gateway set.
>> When init script vmcontext start, it found out that there is a gateway
>> (but on eth1), and so is_gateway function on eth0 seems to returns true.
>> After that the gateway is guessed with NETWORK_ADDRESS.1 but I don't know
>> why?
>>
>> here is my context:
>> ETH0_IP='192.168.199.109'
>> ETH0_MAC='02:00:c0:a8:c7:6d'
>> ETH1_DNS='10.156.255.245'
>> ETH1_GATEWAY='10.156.0.1'
>> ETH1_IP='10.156.24.93'
>> ETH1_MAC='02:00:0a:9c:18:5d'
>> ETH1_MASK='255.255.224.0'
>> ETH1_NETWORK='10.156.0.0'
>>
>> Here is the ifcfg-eth0 written by vmcontext init script:
>> DEVICE=eth0
>> BOOTPROTO=none
>> ONBOOT=yes
>> TYPE=Ethernet
>> NETMASK=255.255.255.0
>> IPADDR=192.168.199.109
>> GATEWAY=192.168.199.1
>>
>> ifcfg-eth1 is good and has its gateway correctly set.
>>
>> Here is my vnet template where no gateway is set (same problem if I
>> remove the empty GATEWAY key):
>> VIRTUAL NETWORK TEMPLATE
>>
>> BRIDGE="br0"
>> DESCRIPTION="réseau admin vm"
>> GATEWAY=""
>> PHYDEV=""
>> ROLE="admin"
>> VLAN="YES"
>> VLAN_ID="199"
>>
>> is it a bug?
>>
>> Attached here is the vmcontext network script log
>>
>> best regards,
>>
>> Edouard
>>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20150217/b830e739/attachment.htm>


More information about the Users mailing list