mirror of https://github.com/docker/docs.git
Merge pull request #1369 from vieux/fix_various_issues
Fix various issues
This commit is contained in:
commit
087e2452f3
|
@ -128,6 +128,9 @@ func (e *Engine) ConnectWithClient(client dockerclient.Client) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start monitoring events from the engine.
|
||||||
|
e.client.StartMonitorEvents(e.handler, nil)
|
||||||
|
|
||||||
// Force a state update before returning.
|
// Force a state update before returning.
|
||||||
if err := e.RefreshContainers(true); err != nil {
|
if err := e.RefreshContainers(true); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -144,8 +147,6 @@ func (e *Engine) ConnectWithClient(client dockerclient.Client) error {
|
||||||
// Start the update loop.
|
// Start the update loop.
|
||||||
go e.refreshLoop()
|
go e.refreshLoop()
|
||||||
|
|
||||||
// Start monitoring events from the engine.
|
|
||||||
e.client.StartMonitorEvents(e.handler, nil)
|
|
||||||
e.emitEvent("engine_connect")
|
e.emitEvent("engine_connect")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -218,7 +219,10 @@ func (e *Engine) updateSpecs() error {
|
||||||
|
|
||||||
// RemoveImage deletes an image from the engine.
|
// RemoveImage deletes an image from the engine.
|
||||||
func (e *Engine) RemoveImage(image *Image, name string, force bool) ([]*dockerclient.ImageDelete, error) {
|
func (e *Engine) RemoveImage(image *Image, name string, force bool) ([]*dockerclient.ImageDelete, error) {
|
||||||
return e.client.RemoveImage(name, force)
|
array, err := e.client.RemoveImage(name, force)
|
||||||
|
e.RefreshImages()
|
||||||
|
return array, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveNetwork deletes a network from the engine.
|
// RemoveNetwork deletes a network from the engine.
|
||||||
|
@ -521,6 +525,7 @@ func (e *Engine) Create(config *ContainerConfig, name string, pullImage bool) (*
|
||||||
// Register the container immediately while waiting for a state refresh.
|
// Register the container immediately while waiting for a state refresh.
|
||||||
// Force a state refresh to pick up the newly created container.
|
// Force a state refresh to pick up the newly created container.
|
||||||
e.refreshContainer(id, true)
|
e.refreshContainer(id, true)
|
||||||
|
e.RefreshVolumes()
|
||||||
e.RefreshNetworks()
|
e.RefreshNetworks()
|
||||||
|
|
||||||
e.RLock()
|
e.RLock()
|
||||||
|
|
|
@ -28,7 +28,7 @@ function teardown() {
|
||||||
run docker_swarm network inspect node-0/bridge
|
run docker_swarm network inspect node-0/bridge
|
||||||
[[ "${output}" != *"\"Containers\": {}"* ]]
|
[[ "${output}" != *"\"Containers\": {}"* ]]
|
||||||
|
|
||||||
diff <(docker_swarm network inspect node-0/bridge) <(docker_host -H ${HOSTS[0]} network inspect bridge)
|
diff <(docker_swarm network inspect node-0/bridge) <(docker -H ${HOSTS[0]} network inspect bridge)
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "docker network create" {
|
@test "docker network create" {
|
||||||
|
|
|
@ -107,7 +107,7 @@ function teardown() {
|
||||||
[[ "${output}" == *"node-0/test_container"* ]]
|
[[ "${output}" == *"node-0/test_container"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "docker run - reschedule with soft-image-affinity(have node constraint))" {
|
@test "docker run - reschedule with soft-image-affinity and node constraint" {
|
||||||
start_docker_with_busybox 1
|
start_docker_with_busybox 1
|
||||||
start_docker 1
|
start_docker 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue