Commit Graph

45 Commits

Author SHA1 Message Date
Nishant Totla c70f836e88
Remove type unnecessary type conversion
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-26 13:42:17 -07:00
Victor Vieux b352839605
@abronan's typo
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-04-22 14:17:32 -07:00
Victor Vieux 622b509274 use engine-api for events
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-04-14 18:11:40 -07:00
Nishant Totla 40456d0926
Updating unit tests
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:37:01 -07:00
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 2363ea8077
Updating Godeps (distribution/reference)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:37:00 -07:00
Nishant Totla 6d2937b3ec
Updating cluster unit tests
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-04-14 09:36:59 -07:00
Nishant Totla ebdbefecda Updating image related unit tests to use engine-api
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-03-30 10:15:35 -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 0be5b31f27
use apiClient for listing networks in refresh
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2016-03-29 14:50:22 -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
Nishant Totla 1e821e48ed Plumbing context through all calls to engine-api client
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-03-18 14:55:05 -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
Nishant Totla 453304c795 Updating version function to use engine-api
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-03-07 17:46:24 -08:00
Dong Chen e0583ea7d7 Prevent crash on channel double close.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-03-07 11:48:01 -08:00
Dong Chen 388b8fd50f Only record connection failure error in error message.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-02-01 22:30:36 -08:00
Victor Vieux 04fb48d27a support 1.10 events
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-15 19:35:04 -08:00
Dong Chen 8f384b1d40 Address review comments.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-11 16:08:51 -08:00
Dong Chen cf664141b6 Scheduler prefers nodes without connection failures.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-11 11:42:58 -08:00
Dong Chen 58a0e1719d Update failureCount scenario and test cases.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-01-06 10:33:51 -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
Dong Chen 9bc6c35321 Use engine connection error to fail engine fast.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-15 19:13:03 -08:00
Dong Chen ec3b00c484 Reorganize engine failure detection procedure. Change engine option 'RefreshRetry' to 'FailureRetry'.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-15 19:13:03 -08:00
Dong Chen 4d24256c19 Use failureCount as a secondary health indicator.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-15 19:13:03 -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
Dong Chen 51d92d4b69 fix time duration in EngineOpts
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-11-02 16:13:50 -08: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
Victor Vieux d2c5446ea0 Merge pull request #1340 from jimmyxian/volume-driver
Move VolumeDriver to HostConfig
2015-10-28 15:28:53 -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
Victor Vieux e634df03a7 add 'docker network ls' support
add 'docker network inspect' suport

Signed-off-by: Victor Vieux <vieux@docker.com>
2015-10-08 22:35:07 -07:00
Daniel Nephin 8abf7d32e9 Support filtering images by labels
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-02 15:45:52 -04:00
Victor Vieux 77c96908f0 add support for docker volume ls & inspect
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-09-05 07:56:22 -07:00
Alexandre Beslic a7303ecc5e Fix panic on various calls when assigning Engine client to nil
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-09-02 09:41:51 -07:00
Xian Chaobo d4daee4f27 add support images -a
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-12 07:39:11 -04:00
Xian Chaobo a3cf5b9e9c improve build
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-04 02:45:06 -04:00
ealang 15fc8d8210 Prevent panic if a container is removed during a refresh
If InspectContainer fails, Engine.containers gets set to nil.

Log cause of updateContainer failure.

Signed-off-by: Eric Lang <ealang@gmail.com>
2015-06-29 22:04:15 -05:00
Victor Vieux 1afc1be2d1 support only 1.6.0+
update test/regression/run.sh
uddate doc
update tests

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-12 13:27:15 -07:00
Marco Mancini 9e27ae9140 Fix reserved cpus computation
Added test as Vieux suggested/Fixed CpuShare computation

Signed-off-by: Marco Mancini <marcomancini72@gmail.com>
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-06-04 18:59:15 -07:00
Xian 8da3de3cc4 add import unit test
Signed-off-by: Xian <xianchaobo@huawei.com>
2015-05-27 22:11:05 +08:00
Andrea Luzzardi 0fb33f61d5 update testify
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-26 19:01:09 -07:00
Victor Vieux faf26a62f4 fix container matching algorithm
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-15 17:57:40 -07:00
Victor Vieux 6eceffacf9 use cluster.ContainerConfig
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-30 11:44:25 -07:00
Victor Vieux 0c1782c7c0 fix proxyRandom and cleanup node -> engine
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-06 13:38:10 -07:00
Victor Vieux 1297a4cef2 transform node interface to engine struct
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-04-06 13:19:37 -07:00