cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9317) Disabling static NAT on many IPs can leave wrong IPs on the router
Date Thu, 09 Mar 2017 10:27:38 GMT


ASF GitHub Bot commented on CLOUDSTACK-9317:

Github user ProjectMoon commented on a diff in the pull request:
    --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/
    @@ -625,15 +627,20 @@ protected ExecutionResult cleanupNetworkElementCommand(final IpAssocCommand
                     // there is only one ip in this public vlan and removing it, so
                     // remove the nic
    -                if (ipsCount == 1 && !ip.isAdd()) {
    -                    removeVif = true;
    +                if (lastIp != null && !ip.isAdd()) {
    --- End diff --
    Maybe it would make sense to check the value of `lastIp` being something instead of just
checking if it's not null? It works the way it is, but perhaps checking specifically for a
value like `"true"` would make sense. Would prevent someone from updating code later to send
`"false"` for whatever reason and then causing something unexpected. Relying on not null as
a truth value is a bit obtuse in my opinion.

> Disabling static NAT on many IPs can leave wrong IPs on the router
> ------------------------------------------------------------------
>                 Key: CLOUDSTACK-9317
>                 URL:
>             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

View raw message