Commit Graph

24 Commits

Author SHA1 Message Date
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