Commit Graph

458 Commits

Author SHA1 Message Date
Alessandro Boch
bca6ec2e64 Rework push reservation w/ datastore
- 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>
2015-06-17 16:49:21 -07:00
Alessandro Boch
0020b76d39 Change subnet key schema in ipam
- to addrSpace/subnet/childSubnet

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:49:21 -07:00
Madhu Venugopal
c87a2f4567 Datastore additions to bitmask management
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-17 16:49:19 -07:00
Madhu Venugopal
9f69b0aa0d Added a new RetryError to indicate the caller to possibly retry
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-17 16:46:08 -07:00
Alessandro Boch
62b7668b58 Make bitseq.Handle thread-safe
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:46:08 -07:00
Alessandro Boch
b512536cb3 Add numerical ids manager
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:46:05 -07:00
Alessandro Boch
eb66d4456e bitseq to provide handle
- Handle contains sequence and identifier.
  This way datastore integration can be done
  at bitseq level.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
f01ec8c471 Reorganize libnetwork ipam datastructures
- In order to facilitate usage of datastore
- This makes it slower. Efficiency will be
  revisited later after datastore integration
  is done.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
0a4887a1ba Add locking to libnetwork ipam
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
2c26fdf8df Add serialize/deserialize for sequence list
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
f80cf7ff08 Add libnetwork ipam implementation
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
421edc42b3 Add ipam contract
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-17 16:37:59 -07:00
Alessandro Boch
c603907331 Add bitseq package
- 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>
2015-06-17 16:37:59 -07:00
Madhu Venugopal
3c58b7a79d Updating CallFunc to match the Docker CLI API changes
Updated Docker deps to pickup UI changes

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-15 09:41:28 -07:00
Madhu Venugopal
41ce4e0280 Merge pull request #296 from aboch/dn
Add implementation for lookupContainerID
2015-06-15 03:49:41 -07:00
Alessandro Boch
1f8e86f1ba Add implementation for lookupContainerID
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-15 02:45:30 -07:00
aboch
7af4d0b5c5 Merge pull request #295 from mavenugo/mapi
workaround to a minor bug in mux which filters out empty query
2015-06-15 01:35:39 -07:00
Madhu Venugopal
9b39726c0c workaround to a minor bug in mux which filters out empty query
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-15 01:25:45 -07:00
Jana Radhakrishnan
6ddf500c32 Merge pull request #294 from mavenugo/sdcli
Few changes to the UI and API implementation
2015-06-14 22:26:56 -07:00
Madhu Venugopal
5fcef105bb Few changes to the UI and API implementation
1. replaced --net option for service UI with SERVICE.[NETWORK] format
2. Making using of the default network/driver backend support
3. NetworkName and NetworkType from the UI/API can be empty string
   and it will be replaced with DefaultNetwork and DefaultDriver

As per the design goals, we wanted to keep libnetwork core free of
handling defaults. Rather, the clients (docker & dnet) must handle the
defaultness of these entities.
Also, since there is no API to get these Default values from the
backend, UI will not handle the default values either. Hence, this falls
under the responsibility of the API layer to handle this specific case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-14 21:57:18 -07:00
Jana Radhakrishnan
18165e3c22 Merge pull request #293 from mavenugo/dlabels
support for daemon labels
2015-06-14 09:19:49 -07:00
Madhu Venugopal
0a49ceb0d0 support for libnetwork daemon labels
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-14 09:03:42 -07:00
Jana Radhakrishnan
281c387e46 Merge pull request #291 from mavenugo/master
Return an empty config if nil
2015-06-13 15:14:49 -07:00
Madhu Venugopal
580fd18ef3 Return an empty config if nil
Since the Config is a read-only entity, Confg() method returned a value
instead of the pointer. In cases the config is nil, we should return an
empty config.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-13 14:28:56 -07:00
Madhu Venugopal
3be488927d Merge pull request #277 from Microsoft/10662-compile3
Windows: Fix compile after SB interface
2015-06-12 12:58:37 -07:00
Jana Radhakrishnan
0f7399a4cb Merge pull request #289 from mavenugo/defcfg
Moved the TOML based Configuration to dnet
2015-06-12 12:58:06 -07:00
Madhu Venugopal
f8eb4da90c Moved the TOML based Configuration to dnet
The configuration format for docker runtime is based on daemon flags and
hence adjusting the libnetwork configuration to accomodate it by moving
the TOML based configuration to the dnet tool.

Also changed the controller configuration via options

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-12 12:46:12 -07:00
John Howard
72b3215a20 Windows: Compiles again
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-12 12:40:36 -07:00
aboch
e03f32d73f Merge pull request #286 from mavenugo/master
Cherry-picked : enable hairpin mode on the bridge port & fix iptables rule
2015-06-12 08:39:00 -07:00
Madhu Venugopal
092460013c Merge pull request #284 from aboch/sv
Remove dnet binary
2015-06-11 19:32:32 -07:00
Madhu Venugopal
acfac0ba4c enable hairpin mode on the bridge port & fix iptables rule
* When userland-proxy is disabled, enable hairpin mode on the host-side of the veth
* When userland-proxy is enabled, fix the iptable rules appropriately

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-11 19:23:02 -07:00
Alessandro Boch
5774cc2463 Remove dnet binary
- It slipped in as part of a previous commit by mistake

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 18:38:03 -07:00
Madhu Venugopal
cd54fb3dbe Merge pull request #271 from aboch/sv
Rework service UI
2015-06-11 17:02:04 -07:00
Jana Radhakrishnan
137ca9700b Merge pull request #280 from mavenugo/libkv_m
Replace swarm store with libkv
2015-06-11 16:51:32 -07:00
Madhu Venugopal
b714b04cac Replace swarm store with libkv
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-11 16:19:28 -07:00
Alessandro Boch
6f496671d8 Promote Service cli
- To the same level of Network cli
  and to make use of the new service
  rest apis

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 16:07:09 -07:00
Alessandro Boch
496d267d96 Endpoint to provide ContainerInfo
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 16:06:58 -07:00
Alessandro Boch
ba012a703a Add Service hierarchy to rest api
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 15:46:45 -07:00
aboch
45b7755298 Merge pull request #260 from squaremo/now_with_more_semantics
Add note on EndpointInfo semantics
2015-06-11 15:35:39 -07:00
Jana Radhakrishnan
b465a35695 Merge pull request #279 from aboch/smrm
Make sure sandbox files are removed after tests
2015-06-11 15:34:19 -07:00
Jana Radhakrishnan
590b873ac3 Merge pull request #264 from mavenugo/mh-ln
datastore support for endpoint, GetObject, DeleteObject and swarm store API upgrade
2015-06-11 15:28:19 -07:00
Alessandro Boch
0888df37f6 Make sure sandbox files are removed after tests
- and check for error on sandbox.Destroy() in tests

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-11 14:55:17 -07:00
Madhu Venugopal
2e40befd82 Replacing isReservedNetwork with Driver capability
Currently store makes use of a static isReservedNetwork check to decide
if a network needs to be stored in the distributed store or not. But it
is better if the check is not static, but be determined based on the
capability of the driver that backs the network.

Hence introducing a new capability mechanism to the driver which it can
express its capability during registration. Making use of first such
capability : Scope. This can be expanded in the future for more such cases.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 23:59:38 -07:00
Madhu Venugopal
9c3695fae8 Reworked endpoint store operation to address a few cases
* Removed network from being marshalled (it is part of the key anyways)
* Reworked the watch function to handle container-id on endpoints
* Included ContainerInfo to be marshalled which needs to be synchronized
* Resolved multiple race issues by introducing data locks

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 23:59:29 -07:00
Jana Radhakrishnan
14e18d7a79 Merge pull request #276 from mrjana/cnm
Generate container mac address based on IP
2015-06-10 21:34:30 -07:00
Madhu Venugopal
2f07bc64a0 datastore delete support for network and endpoints
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 21:19:31 -07:00
Madhu Venugopal
c653f03fe8 GetObject support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 21:17:56 -07:00
Madhu Venugopal
09383f5077 datastore support for Endpoint
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 21:17:55 -07:00
Madhu Venugopal
b987d2627b Updating to new Swarm discovery and store APIs
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 21:17:55 -07:00
Madhu Venugopal
d7c4c8f558 Updating to latest Swarm dependancies
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-10 21:17:55 -07:00