Bug #4528

Unable to add IP to virtual Router with more than 1 VM's (HA mode)

Added by Stefan Kooman about 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:06/08/2016
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 5.0
Resolution:fixed Pull request:
Affected Versions:Development

Description

onevrouter nic-attach 2 -n vxlan-test03 --ip 192.168.57.1
[VirtualRouterAttachNic] Cannot get IP/MAC lease from virtual network 36.

onevrouter show 2:

VIRTUAL ROUTER NICS
ID NETWORK MANAGEMENT IP
0 vxlan-test01 NO 192.168.55.1
1 vxlan-test02 NO 192.168.56.1
2 v-rend-test01 YES -
3 vxlan-test01 NO -
4 vxlan-test03 NO -

TEMPLATE CONTENTS

VIRTUAL MACHINES
276
277

- No mention here about 192.168.57.1 .... but:

ADDRESS RANGE POOL
AR 0
SIZE : 200
LEASES : 1

RANGE FIRST LAST
MAC 02:02:c0:a8:39:01 02:02:c0:a8:39:c8
IP 192.168.57.1 192.168.57.200

LEASES
AR OWNER MAC IP IP6_GLOBAL
0 V:276 02:02:c0:a8:39:01 192.168.57.1 -

VIRTUAL ROUTERS
2

The 192.168.57.1 IP has been given to VM 276, first vrouter.

The onevrouter nic-attach command should have an option to mention the IP being a "floating IP" ... and return an error if you would try to add an non-floating IP to a virtual router with more than 1 Virtual Machines (virtual routers) in it like I did in this example.

Associated revisions

Revision af9f06e0
Added by Ruben S. Montero about 5 years ago

Bug #4528: Allow to set floating IPs from the command line to VRs

History

#1 Updated by Javi Fontan about 5 years ago

  • Assignee set to Javi Fontan

#2 Updated by Ruben S. Montero about 5 years ago

  • Category set to Core & System
  • Target version set to Release 5.0

#3 Updated by Stefan Kooman about 5 years ago

The same goes for detach:

onevrouter show 3
VIRTUAL ROUTER 3 INFORMATION
ID : 3
NAME : vrouter-test
USER : oneadmin
GROUP : oneadmin

PERMISSIONS
OWNER : um-
GROUP : ---
OTHER : ---

VIRTUAL ROUTER NICS
ID NETWORK MANAGEMENT IP
0 vxlan-test01 NO 192.168.55.1
1 vxlan-test02 NO 192.168.56.1
2 v-rend-test01 YES -
3 vxlan-test03 NO -

TEMPLATE CONTENTS
KEEPALIVED_ID="2"

VIRTUAL MACHINES
278
279
oneadmin@test-oned2:~$ onevrouter nic-detach 3 3
[VirtualRouterDetachNic] Could not detach NIC with NIC_ID 3, it does not exist.

onevrouter show 3
VIRTUAL ROUTER 3 INFORMATION
ID : 3
NAME : vrouter-test
USER : oneadmin
GROUP : oneadmin

PERMISSIONS
OWNER : um-
GROUP : ---
OTHER : ---

VIRTUAL ROUTER NICS
ID NETWORK MANAGEMENT IP
0 vxlan-test01 NO 192.168.55.1
1 vxlan-test02 NO 192.168.56.1
2 v-rend-test01 YES -

TEMPLATE CONTENTS
KEEPALIVED_ID="2"

VIRTUAL MACHINES
278
279

It actually manages to detach the nic from the first-vrouter, but not the second

#4 Updated by Ruben S. Montero about 5 years ago

  • Assignee changed from Javi Fontan to Ruben S. Montero

#5 Updated by Ruben S. Montero about 5 years ago

Hi Stefan,

This is a bug in the CLI, Sunstone interface works for me. We are fixing the CLI, but in case you want to test it further you can use Sunstone. Note, do not forget to tick the FLOATING_IP check.

#6 Updated by Ruben S. Montero about 5 years ago

  • Status changed from Pending to Closed
  • Resolution set to fixed

This would be the CLI equivalent implemented to address this.

onevrouter nic-attach 1 --network 2 --ip 10.5.5.210 --float

Additionally we may think to add --float automatically both in Sunstone and CLI in HA...

There were no issue with detach-nic, at least I could not reproduce it. Probably it was a libvirt error to detach the NIC so a VM still has the network device.

Also available in: Atom PDF