| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
That method was only referenced by ipam.Allocator, but as it no longer
stores any state persistently there is no possibility for it to load an
inconsistent bit-sequence from Docker 1.9.x.
Signed-off-by: Cory Snider <csnider@mirantis.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Without (*Controller).ReloadConfiguration, the only way to configure
datastore scopes would be by passing config.Options to libnetwork.New.
The only options defined which relate to datastore scopes are limited to
configuring the local-scope datastore. Furthermore, the default
datastore config only defines configuration for the local-scope
datastore. The local-scope datastore is therefore the only datastore
scope possible in libnetwork. Start removing code which is only
needed to support multiple datastore scopes.
Signed-off-by: Cory Snider <csnider@mirantis.com>
|
| |
|
|
| |
Signed-off-by: Cory Snider <csnider@mirantis.com>
|
| |
|
|
|
|
|
| |
Catch any backwards-compatibility hazards with serialization of
sequences early.
Signed-off-by: Cory Snider <csnider@mirantis.com>
|
| |
|
|
|
|
|
|
| |
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
|
| |
|
|
|
|
|
| |
Perhaps the testutils package in the past had an `init()` function to set up
specific things, but it no longer has. so these imports were doing nothing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
| |
|
|
| |
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
|
| |
|
|
|
|
|
|
| |
libnetwork does different stuff depending on if you are running the
tests in a container or not... without telling it we are in a container
a bunch of the tests actually fail.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
|
| |
|
|
| |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
| |
|
|
|
|
|
| |
This commit contains test cases to verify the changes and to
solidify the library.
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
|
| |
|
|
| |
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
|
| |
|
|
|
|
|
|
| |
Since bit allocation is no longer first available from
the start some verfications are removed/modified to
the change allocation model
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
|
| |
|
|
| |
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
|
| |
|
|
| |
Signed-off-by: Ke Li <kel@splunk.com>
|
| |
|
|
|
|
| |
- size 1 range is a valid input
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
|
|
| |
Currently datastore has dependencies on various kv backends.
This is undesirable if datastore had to be used as a backend
agnostic store management package with it's cache layer. This
PR aims to achieve that.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
|
| |
|
|
| |
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
| |
- Cover random allocation/deallocation
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove from contract predefined errors which are no longer
valid (ex. ErrInvalidIpamService, ErrInvalidIpamConfigService)
- Do not use network driver error for ipam load failure in controller.go
- Bitseq to expose two well-known errors (no more bit available, bit is already set)
- Default ipam to report proper well-known error on RequestAddress()
based on bitseq returned error
- Default ipam errors to comply with types error interface
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- pushReservation fails to correctly detect when
the affected block is the last in the current
sequence. It thinks instead the block is in between
the sequence. Because of this a couple of issues
may happen:
1. The allocation of the last bit causes the creation
of a phantom sequence (length 0) at the end.
(This has no side effects).
2. The allocation of a bit somewhere in the middle of
the bitmask may lead to a completely incorrect
sequence pattern.
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
| |
- Allow bitsequence of length 2^64-1
- Updated ID Manager and IPAM
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
|
|
| |
This way we won't vendor test related functions in docker anymore.
It also moves netns related functions to a new ns package to be able to
call the ns init function in tests. I think this also helps with the
overall package isolation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
|
| |
|
|
|
|
| |
- Also add validation for passed ordinal
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
| |
- bitseq users only need to know Handle type
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
|
|
|
|
|
|
| |
- At Handle creation, first check if an instance of the
the respective object is already present in the datastore.
- Handle sequence must be saved only if commit
to datastore is succesfull
- Caller (ipam) needs to manage the retry
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
| |
|
|
| |
Signed-off-by: Alessandro Boch <aboch@docker.com>
|
|
|
- Initial version
- It allows handling reservation/release of a finite set
of resources through large bitmask.
- It represents the bitmask as a list of equal
consecutive 32 bits long bitmask symbols.
It basically operates on a run-length encoding
of the bitmask without encode/decode processing.
Signed-off-by: Alessandro Boch <aboch@docker.com>
|