Skip to content

[backport 17.06]Adding logic to restore networks in order#2584

Merged
anshulpundir merged 1 commit into
moby:bump_v17.06from
abhi:bump_v17.06
Apr 3, 2018
Merged

[backport 17.06]Adding logic to restore networks in order#2584
anshulpundir merged 1 commit into
moby:bump_v17.06from
abhi:bump_v17.06

Conversation

@abhi
Copy link
Copy Markdown
Contributor

@abhi abhi commented Apr 2, 2018

This commits adds a fix for restore case where there might a mix of allocated and unallocated
network in raft. During restore the allocator was going over the networks lexicographically which would mean that there might be a chance for an unallocated network say net1 o be allocated the same vxlan
id or subnet pool that was allocated to another networki net2. Because of this during restoring, when allocator tries to allocate the reallocate network net2, it would fail because it allocated network resources to net1 during restore. This would mean services,tasks and network itself would be in a
messed up state.

(cherry picked from commit 7f9db67)

Signed-off-by: Abhinandan abhi@docker.com

This commits adds a fix for restore case where
there might a mix of allocated and unallocated
network in raft. During restore the allocator
was going over the networks lexicographically which
would mean that there might be a chance for an
unallocated network say net1 o be allocated the same vxlan
id or subnet pool that was allocated to another networki net2.
Because of this during restoring, when allocator tries
to allocate the reallocate network net2, it would fail
because it allocated network resources to net1 during restore.
This would mean services,tasks and network itself would be in a
messed up state.

Signed-off-by: Abhinandan <abhi@docker.com>
@abhi abhi changed the title Adding logic to restore networks in order [backport 17.06]Adding logic to restore networks in order Apr 2, 2018
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2018

Codecov Report

Merging #2584 into bump_v17.06 will increase coverage by 0.13%.
The diff coverage is 62.85%.

@@               Coverage Diff               @@
##           bump_v17.06    #2584      +/-   ##
===============================================
+ Coverage        60.99%   61.12%   +0.13%     
===============================================
  Files              120      120              
  Lines            20011    20025      +14     
===============================================
+ Hits             12205    12240      +35     
+ Misses            6462     6441      -21     
  Partials          1344     1344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants