Commit Graph

167 Commits

Author SHA1 Message Date
Nishant Totla ff0c79e08d
Fix image pull bug (wait until download finishes)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:37:00 -07:00
Nishant Totla 11df80601c
Updating cluster
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:36:59 -07:00
Nishant Totla 81e1528d0f
Updating API handlers
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:36:59 -07:00
Sun Hongliang d403254ed2 1.validate cluster option swarm.overcommit
2.change swarm.createretry's error info and add its integration test
Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
2016-04-07 09:00:41 +08:00
Victor Vieux 5e13bcf8ff use engine-api for network create
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-03-25 15:35:04 -07:00
Morgan Bauer 4516d1ae16
use apiClient for volumes management
- create volume
 - list volumes

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2016-03-29 15:01:27 -07:00
Morgan Bauer 1e22226b71
use apiClient for removing images
- remove unused argument
 - unit test of new client

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2016-03-29 14:50:22 -07:00
Victor Vieux 3461df4032 Merge pull request #2042 from vieux/update_build
support private images, labels and other new flags in docker build
2016-03-28 22:50:28 -07:00
Nishant Totla 0ebb26bdd4 Printing engine version in Info
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-03-28 17:40:50 -07:00
Victor Vieux e98cf00409 support private images, labels and other new flags in docker build
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-03-24 18:27:20 -07:00
Victor Vieux b05dee4d6e HostConfig for /start endpoint
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-03-14 19:23:57 -07:00
Nishant Totla 6af37c4888 Updating info function to use engine-api
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-03-09 13:58:50 -08:00
Victor Vieux 22fedf0db0 support docker run --net <node>/<network>
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-23 13:13:31 -08:00
Victor Vieux c42142e408 Revert "Passing HostConfig for /start endpoint"
This reverts commit 6ff0d29c9d.

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-17 15:46:37 -08:00
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