[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055059#comment-15055059
 ] 

ASF subversion and git services commented on CLOUDSTACK-9134:
-------------------------------------------------------------

Commit 5774b965f35fcfea645c25a9cc0be9f3e603dfa1 in cloudstack's branch 
refs/heads/4.6 from [~dahn]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5774b96 ]

Merge pull request #1209 from ustcweizhou/free-deviceid

CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic 
count
when we restart vpc tiers, the old nics will be removed, and create a new nic.
however, the device_id was set to the nic count, which may be already used.
this commit get the first device_id not in use as the device_id of new nic.

This issue also happen when we add multiple networks to a vm and remove them.

* pr/1209:
  CLOUDSTACK-9134: set device_id as the first device_id not in use instead of 
nic count

Signed-off-by: Daan Hoogland <d...@onecht.net>


> ip and route are not applied to the right NIC in VR after restarting a VPC 
> tier
> -------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9134
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9134
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Wei Zhou
>            Assignee: Wei Zhou
>
> I created three tiers: tier1 /tier 2/ tier3 with corresponding network:
> tier1: 192.168.0.0/24
> tier2: 192.168.1.0/24
> tier3: 192.168.2.0/24
> when I restart the tier 2 (in network tab, choose the tier, restart it with 
> cleanup), the ip and router are wrong:
> root@r-7587-VM:~# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 0e:00:a9:fe:03:1a brd ff:ff:ff:ff:ff:ff
>     inet 169.254.3.26/16 brd 169.254.255.255 scope global eth0
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 06:1b:30:00:00:1e brd ff:ff:ff:ff:ff:ff
>     inet 10.11.115.119/24 brd 10.11.115.255 scope global eth1
> 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:01:59:00:0b brd ff:ff:ff:ff:ff:ff
>     inet 192.168.0.49/24 brd 192.168.0.255 scope global eth2
>     inet 192.168.0.1/24 brd 192.168.0.255 scope global secondary eth2
> 6: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:64:46:00:04 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.2.104/24 brd 192.168.2.255 scope global eth4
>     inet 192.168.1.49/24 brd 192.168.1.255 scope global eth4
>     inet 192.168.2.254/24 brd 192.168.2.255 scope global secondary eth4
>     inet 192.168.1.254/24 brd 192.168.1.255 scope global secondary eth4
> 8: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:30:af:00:10 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.1.254/24 brd 192.168.1.255 scope global eth3
> root@r-7587-VM:~# ip route
> default via 10.11.115.254 dev eth1
> 10.11.115.0/24 dev eth1  proto kernel  scope link  src 10.11.115.119
> 169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.3.26
> 192.168.0.0/24 dev eth2  proto kernel  scope link  src 192.168.0.49
> 192.168.1.0/24 dev eth4  proto kernel  scope link  src 192.168.1.49
> 192.168.1.0/24 dev eth3  proto kernel  scope link  src 192.168.1.254
> 192.168.2.0/24 dev eth4  proto kernel  scope link  src 192.168.2.104
> the ip and router of tier2 should be applied to eth3, but sometimes it is 
> applied to eth4.
> --------------
> if I restart the tier1 after that, the issue continues:
> root@r-7587-VM:~# ip a;ip route
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 0e:00:a9:fe:03:1a brd ff:ff:ff:ff:ff:ff
>     inet 169.254.3.26/16 brd 169.254.255.255 scope global eth0
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 06:1b:30:00:00:1e brd ff:ff:ff:ff:ff:ff
>     inet 10.11.115.119/24 brd 10.11.115.255 scope global eth1
> 6: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:64:46:00:04 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.2.104/24 brd 192.168.2.255 scope global eth4
>     inet 192.168.1.49/24 brd 192.168.1.255 scope global eth4
>     inet 192.168.2.254/24 brd 192.168.2.255 scope global secondary eth4
>     inet 192.168.1.254/24 brd 192.168.1.255 scope global secondary eth4
> 8: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:30:af:00:10 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.1.254/24 brd 192.168.1.255 scope global eth3
> 9: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>     link/ether 02:00:07:4c:00:0d brd ff:ff:ff:ff:ff:ff
> default via 10.11.115.254 dev eth1
> 10.11.115.0/24 dev eth1  proto kernel  scope link  src 10.11.115.119
> 169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.3.26
> 192.168.1.0/24 dev eth4  proto kernel  scope link  src 192.168.1.49
> 192.168.1.0/24 dev eth3  proto kernel  scope link  src 192.168.1.254
> 192.168.2.0/24 dev eth4  proto kernel  scope link  src 192.168.2.104
> --------
> this also happenes if we change the network offering of vpc tier (the tier 
> will restart)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to