[
https://issues.apache.org/jira/browse/CLOUDSTACK-9317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893804#comment-15893804
]
ASF GitHub Bot commented on CLOUDSTACK-9317:
--------------------------------------------
Github user jayapalu commented on the issue:
https://github.com/apache/cloudstack/pull/1908
@ProjectMoon
I have today this PR after rebasing latest master. I did not observe the
add:true for the removed ip.
Here is output from the ips.json and ip addr show output.
Here is the output:
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP qlen 1000
link/ether 06:f6:cc:00:00:0e brd ff:ff:ff:ff:ff:ff
inet 10.147.46.102/24 brd 10.147.46.255 scope global eth2
inet 10.147.46.112/24 brd 10.147.46.255 scope global secondary eth2
"eth2": [
{
"add": true,
"broadcast": "10.147.46.255",
"cidr": "10.147.46.102/24",
"device": "eth2",
"first_i_p": true,
"gateway": "10.147.46.1",
"netmask": "255.255.255.0",
"network": "10.147.46.0/24",
"new_nic": false,
"nic_dev_id": 2,
"nw_type": "public",
"one_to_one_nat": false,
"public_ip": "10.147.46.102",
"size": "24",
"source_nat": true,
"vif_mac_address": "06:4a:54:00:00:0e"
},
{
"add": false,
"broadcast": "10.147.46.255",
"cidr": "10.147.46.107/24",
"device": "eth2",
"first_i_p": true,
"gateway": "10.147.46.1",
"netmask": "255.255.255.0",
"network": "10.147.46.0/24",
"new_nic": false,
"nic_dev_id": 2,
"nw_type": "public",
"one_to_one_nat": true,
"public_ip": "10.147.46.107",
"size": "24",
"source_nat": true,
"vif_mac_address": "06:b5:36:00:00:13"
},
{
"add": false,
"broadcast": "10.147.46.255",
"cidr": "10.147.46.108/24",
"device": "eth2",
"first_i_p": true,
"gateway": "10.147.46.1",
"netmask": "255.255.255.0",
"network": "10.147.46.0/24",
"new_nic": false,
"nic_dev_id": 2,
"nw_type": "public",
"one_to_one_nat": true,
"public_ip": "10.147.46.108",
"size": "24",
"source_nat": true,
"vif_mac_address": "06:6d:c8:00:00:14"
},
{
"add": false,
"broadcast": "10.147.46.255",
"cidr": "10.147.46.111/24",
"device": "eth2",
"first_i_p": true,
"gateway": "10.147.46.1",
"netmask": "255.255.255.0",
"network": "10.147.46.0/24",
"new_nic": false,
"nic_dev_id": 2,
"nw_type": "public",
"one_to_one_nat": true,
"public_ip": "10.147.46.111",
"size": "24",
"source_nat": true,
"vif_mac_address": "06:32:90:00:00:17"
},
{
"add": true,
"broadcast": "10.147.46.255",
"cidr": "10.147.46.112/24",
"device": "eth2",
"first_i_p": true,
"gateway": "10.147.46.1",
"netmask": "255.255.255.0",
"network": "10.147.46.0/24",
"new_nic": false,
"nic_dev_id": 2,
"nw_type": "public",
"one_to_one_nat": true,
"public_ip": "10.147.46.112",
"size": "24",
"source_nat": true,
"vif_mac_address": "06:83:68:00:00:18"
}
> Disabling static NAT on many IPs can leave wrong IPs on the router
> ------------------------------------------------------------------
>
> Key: CLOUDSTACK-9317
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9317
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server, Virtual Router
> Affects Versions: 4.7.0, 4.7.1, 4.7.2
> Reporter: Jeff Hair
>
> The current behavior of enabling or disabling static NAT will call the apply
> IP associations method in the management server. The method is not
> thread-safe. If it's called from multiple threads, each thread will load up
> the list of public IPs in different states (add or revoke)--correct for the
> thread, but not correct overall. Depending on execution order on the virtual
> router, the router can end up with public IPs assigned to it that are not
> supposed to be on it anymore. When another account acquires the same IP, this
> of course leads to network problems.
> The problem has been in CS since at least 4.2, and likely affects all
> recently released versions. Affected version is set to 4.7.x because that's
> what we verified against.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)