Commit Graph

153 Commits

Author SHA1 Message Date
Nishant Totla 6ff0d29c9d Passing HostConfig for /start endpoint
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-02-17 11:06:51 -08:00
Victor Vieux cd3b1d5bd1 improve addNetwork
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-11 11:00:15 -08:00
Victor Vieux 3747ec9b9f change refresh logic with new events
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-10 00:48:31 -08:00
Victor Vieux 5492f4ab82 remove refresh networks
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-09 20:14:58 -08:00
Nishant Totla 16de94b9b1 Adding default name (unknown) for pending engine
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-02-01 12:54:37 -08:00
Victor Vieux 336a4ff9ae Merge pull request #1721 from nishanttotla/1625-RemoveInfoBackspaces
Removing backspaces in /info output for new API version
2016-02-01 09:30:51 -08:00
Nishant Totla 3d7678389f Removing backspaces in /info output for new API version
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-01-31 23:54:33 -08:00
Isabel Jimenez c809e6a643 Fix double start
Signed-off-by: Isabel Jimenez <contact@isabeljimenez.com>
2016-01-31 19:08:48 -05:00
Victor Vieux f3a1027bbe update docker info
add test

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-27 01:07:52 -08:00
Dong Chen abffebf09e Provide error when engine version is unsupported.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-25 15:58:48 -08:00
Victor Vieux 1225eddc79 allow engine/name support in volumes
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-16 17:40:53 -08:00
Dong Chen 39dc28a4df Fix a race condition in pending engine validation, discard parallel validation result.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-19 16:19:09 -08:00
Dong Chen 8cc9b6c284 Add swarm container create retry option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-13 16:06:38 -08:00
Victor Vieux fc1e7bbca2 use docker/docker/pkg/discovery
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-12 00:38:06 -08:00
Victor Vieux a2018c177c improve eventHandlers locking
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-11 17:23:48 -08:00
Victor Vieux 78008f4d4a add doc
fix tests and keep swarm id
remove duplicate on node reconnect
explicit failure

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-11 15:59:44 -08:00
Andrea Luzzardi 56941d02a8 cluster: Support multiple event handlers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-01-11 15:59:44 -08:00
Alexandre Beslic 8b173fd382 Merge pull request #1569 from dongluochen/nodeManagement
Improve node management.
2016-01-07 16:14:36 -08:00
Dong Chen 7e266f18ed Name constants.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-07 15:55:12 -08:00
Dong Chen 9a1584d508 Update integration test. Reduce pending node validation sleep interval. Each pending node has its own validation interval according to failure count. So reducing sleep interval is not increasing validation frequency for unreachable nodes.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-05 15:56:55 -08:00
Dong Chen 52a7616d99 Add integration test for state machine.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-05 14:59:30 -08:00
Victor Vieux 5daaecdaa1 do not save image affinity on reschedule
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-05 10:29:45 -08:00
Victor Vieux 97f3767618 fix soft affinity reschedule
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-05 04:58:36 -08:00
Dong Chen 995866d76c Improve node management.
1. Introduce pending state. Pending nodes need validation before moving to healthy state. Resolve issues of duplicate ID and dead node drop issues.
2. Expose error and last update time in docker info.
3. Use connect success/failure to drive state transition between healthy and unhealthy.

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-30 13:25:43 -08:00
Victor Vieux be0fce961f update code
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-12-22 00:20:04 -08:00
Daniel Hiltgen dde577d154 Add token pass-thru for Authconfig
This augments the CreateContainer call to detect the AuthConfig header
and use any supplied auth for pull operations.  This will allow pulling
of protected image on to specific node during the create operation.

CLI usage example using username/password:

    # Calculate the header
    REPO_USER=yourusername
    read -s PASSWORD
    HEADER=$(echo "{\"username\":\"${REPO_USER}\",\"password\":\"${PASSWORD}\"}"|base64 -w 0 )
    unset PASSWORD
    echo HEADER=$HEADER

    # Then add the following to your ~/.docker/config.json
    "HttpHeaders": {
        "X-Registry-Auth": "<HEADER string from above>"
    }

    # Now run a private image against swarm:
    docker run --rm -it yourprivateimage:latest

CLI usage example using registry tokens: (Required engine 1.10 with new auth token support)

    REPO=yourrepo/yourimage
    REPO_USER=yourusername
    read -s PASSWORD
    AUTH_URL=https://auth.docker.io/token
    TOKEN=$(curl -s -u "${REPO_USER}:${PASSWORD}" "${AUTH_URL}?scope=repository:${REPO}:pull&service=registry.docker.io" |
        jq -r ".token")
    HEADER=$(echo "{\"registrytoken\":\"${TOKEN}\"}"|base64 -w 0 )
    echo HEADER=$HEADER

    # Update the docker config as above, but the token will expire quickly...

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2015-12-11 18:36:55 -08:00
Alexandre Beslic f21efa4337 Increase default TTL and heartbeat value
Increases the default ttl and heartbeat value for discovery.
Because the node will still be listed for a long period on
`docker info`, there is now a Status to know if a node is
in the healthy or unhealthy state.

Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-12-04 17:11:33 -08:00
Victor Vieux 24fc1b6909 Merge pull request #1451 from aluzzardi/parallel-affinity-fix
Set labels for pending containers
2015-11-25 15:19:58 -08:00
Andrea Luzzardi 9310a385af Set labels for pending containers.
Fixes docker/compose#2447

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-11-25 06:56:57 -08:00
Victor Vieux d2c5446ea0 Merge pull request #1340 from jimmyxian/volume-driver
Move VolumeDriver to HostConfig
2015-10-28 15:28:53 -07:00
Dong Chen c9f3471dba add engine options for refresh interval
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-10-28 12:56:48 -07:00
Xian Chaobo 588c29c3cc move VolumeDriver to HostConfig
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-10-28 10:58:24 +08:00
Daniel Nephin e001980b5c Add filter by image name support to /images/json
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-27 11:00:37 -04:00
Alexandre Beslic da1f854462 Merge pull request #1310 from pwnall/image_affinity
Swarm filters support in image building
2015-10-23 14:54:33 -07:00
Victor Costan e32b3211ae Swarm filters support in image building.
When building an image (POST /build), swarm will extract filters from
buildargs. This is similar to how container creation (POST
/containers/create) extracts filters from environment variables.

Signed-off-by: Victor Costan <costan@gmail.com>
2015-10-23 14:24:42 -04:00
Alexandre Beslic 93e78ce641 Merge pull request #1314 from aluzzardi/fix-nullptr-pendingcontainer
Fix nullptr panic in pending containers.
2015-10-20 12:14:06 -07:00
Andrea Luzzardi 0399a3c60b Fix nullptr panic in pending containers.
Fixes #1289

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-19 13:38:06 -07:00
Victor Vieux 21d6fc5378 fix panic when createContainer returns nil,nil
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-18 21:22:59 -07:00
Victor Vieux f9807f561c fix golint
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-17 01:32:44 -07:00
Victor Vieux e9c486b046 refresh networks on whole cluster after create and rm
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-10-19 15:42:56 -07:00
Victor Vieux bef2892cee Merge pull request #1271 from jimmyxian/fix-reschedule-with-soft-affinity
Do not try retry with soft-image-affinity when have node constraint
2015-10-15 13:52:29 -07:00
Victor Vieux 6d6927d1de fix merge issue
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-13 01:24:10 -07:00
Alexandre Beslic 1e30ce215f Merge pull request #1262 from vieux/libnetwork
add 'docker network' support
2015-10-13 11:09:27 -07:00
Andrea Luzzardi b2b32d979d scheduler now returns the list of ranked nodes rather than the top node.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-09 15:32:37 -07:00
Andrea Luzzardi 7c0539c650 cluster: Fix name setting of pending containers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-09 12:54:57 -07:00
Andrea Luzzardi 24394612f5 cluster: Don't lock the scheduler when removing a container.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-09 12:54:56 -07:00
Andrea Luzzardi 91279c8256 cluster: Check name uniqueness among pending containers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-09 12:54:56 -07:00
Andrea Luzzardi c64ae5168a Parallel scheduling support for Swarm driver.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-10-09 12:54:53 -07:00
Victor Vieux 78ecf8497c Add network rm
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:36:13 -07:00
Victor Vieux b007cae8b2 Add docker network create
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:35:07 -07:00