Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

404 Client Error: Not Found ("No such image: a") #564

Closed
mrlesmithjr opened this issue May 27, 2017 · 18 comments · Fixed by #702
Closed

404 Client Error: Not Found ("No such image: a") #564

mrlesmithjr opened this issue May 27, 2017 · 18 comments · Fixed by #702
Labels

Comments

@mrlesmithjr
Copy link

ISSUE TYPE
  • Bug Report
container.yml
version: "2"
settings:
  conductor_base: ubuntu
services:
  web:
    from: ubuntu
    ports:
      - "80:80"
    command: ["/usr/bin/dumb-init", "/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
OS / ENVIRONMENT
Ansible Container, version 0.9.1
Darwin, Larrys-MBP.etsbv.internal, 16.6.0, Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64, x86_64
2.7.13 (default, Dec 17 2016, 23:03:43)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] /Users/larry/python-virtualenvs/ansible-container-0.9.1/bin/python2.7
{
  "ContainersPaused": 0,
  "Labels": null,
  "CgroupDriver": "cgroupfs",
  "ContainersRunning": 0,
  "ContainerdCommit": {
    "Expected": "4ab9917febca54791c5f071a9d1f404867857fcc",
    "ID": "4ab9917febca54791c5f071a9d1f404867857fcc"
  },
  "InitBinary": "docker-init",
  "NGoroutines": 26,
  "Swarm": {
    "Managers": 0,
    "ControlAvailable": false,
    "NodeID": "",
    "Cluster": {
      "Spec": {
        "TaskDefaults": {},
        "Orchestration": {},
        "EncryptionConfig": {
          "AutoLockManagers": false
        },
        "Raft": {
          "HeartbeatTick": 0,
          "ElectionTick": 0
        },
        "CAConfig": {},
        "Dispatcher": {}
      },
      "Version": {},
      "ID": "",
      "CreatedAt": "0001-01-01T00:00:00Z",
      "UpdatedAt": "0001-01-01T00:00:00Z"
    },
    "Nodes": 0,
    "Error": "",
    "RemoteManagers": null,
    "LocalNodeState": "inactive",
    "NodeAddr": ""
  },
  "LoggingDriver": "json-file",
  "OSType": "linux",
  "HttpProxy": "",
  "Runtimes": {
    "runc": {
      "path": "docker-runc"
    }
  },
  "DriverStatus": [
    [
      "Root Dir",
      "/var/lib/docker/aufs"
    ],
    [
      "Backing Filesystem",
      "extfs"
    ],
    [
      "Dirs",
      "3"
    ],
    [
      "Dirperm1 Supported",
      "true"
    ]
  ],
  "OperatingSystem": "Alpine Linux v3.5",
  "Containers": 1,
  "HttpsProxy": "",
  "BridgeNfIp6tables": true,
  "MemTotal": 2095890432,
  "SecurityOptions": [
    "name=seccomp,profile=default"
  ],
  "Driver": "aufs",
  "IndexServerAddress": "https://index.docker.io/v1/",
  "ClusterStore": "",
  "InitCommit": {
    "Expected": "949e6fa",
    "ID": "949e6fa"
  },
  "Isolation": "",
  "SystemStatus": null,
  "OomKillDisable": true,
  "ClusterAdvertise": "",
  "SystemTime": "2017-05-27T17:20:14.826675948Z",
  "Name": "moby",
  "CPUSet": true,
  "RegistryConfig": {
    "InsecureRegistryCIDRs": [
      "127.0.0.0/8"
    ],
    "IndexConfigs": {
      "docker.io": {
        "Official": true,
        "Name": "docker.io",
        "Secure": true,
        "Mirrors": null
      }
    },
    "Mirrors": []
  },
  "DefaultRuntime": "runc",
  "ContainersStopped": 1,
  "NCPU": 4,
  "NFd": 16,
  "Architecture": "x86_64",
  "KernelMemory": true,
  "CpuCfsQuota": true,
  "Debug": true,
  "ID": "NU7V:QV6Q:C56I:C66N:IBWD:YUBO:XZ6Z:2KDU:5V5Y:5VOF:QDVQ:XKE4",
  "IPv4Forwarding": true,
  "KernelVersion": "4.9.27-moby",
  "BridgeNfIptables": true,
  "NoProxy": "*.local, 169.254/16",
  "LiveRestoreEnabled": false,
  "ServerVersion": "17.03.1-ce",
  "CpuCfsPeriod": true,
  "ExperimentalBuild": true,
  "MemoryLimit": true,
  "SwapLimit": true,
  "Plugins": {
    "Volume": [
      "local"
    ],
    "Network": [
      "bridge",
      "host",
      "ipvlan",
      "macvlan",
      "null",
      "overlay"
    ],
    "Authorization": null
  },
  "Images": 1,
  "DockerRootDir": "/var/lib/docker",
  "NEventsListener": 1,
  "CPUShares": true,
  "RuncCommit": {
    "Expected": "54296cf40ad8143b62dbcaa1d90e520a2136ddfe",
    "ID": "54296cf40ad8143b62dbcaa1d90e520a2136ddfe"
  }
}
{
  "KernelVersion": "4.9.27-moby",
  "Arch": "amd64",
  "BuildTime": "2017-03-24T00:00:50.070226199+00:00",
  "ApiVersion": "1.27",
  "Version": "17.03.1-ce",
  "MinAPIVersion": "1.12",
  "GitCommit": "c6d412e",
  "Os": "linux",
  "Experimental": true,
  "GoVersion": "go1.7.5"
}
SUMMARY
STEPS TO REPRODUCE
ansible-container build
EXPECTED RESULTS
ACTUAL RESULTS

https://gist.github.com/mrlesmithjr/1e0f29b10d49c8f8bb0f001aef109c31


@mrlesmithjr
Copy link
Author

Looks like possibly the failure is coming from this particular role because of sudo. But still wanted to open this issue.
Without running in --debug mode I get the following error:

Building Docker Engine context...
Starting Docker build of Ansible Container Conductor image (please be patient)...
ERROR	Unknown exception
Traceback (most recent call last):
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/cli.py", line 268, in __call__
    getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/core.py", line 150, in hostcmd_build
    cache=kwargs['cache']
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/docker/engine.py", line 82, in __wrapped__
    return fn(self, *args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/docker/engine.py", line 744, in build_conductor_image
    nocache=not cache)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/models/images.py", line 180, in build
    return self.get(image_id)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/models/images.py", line 201, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/image.py", line 262, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/client.py", line 216, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
ImageNotFound: 404 Client Error: Not Found ("No such image: a")

@j00bar
Copy link
Contributor

j00bar commented May 27, 2017

Yeah, it seems we need to ensure sudo is installed in the Debian family of conductors - that's an easy change to make, and I'll do that today.

As far as the 404 error, I'd love to get a copy of docker events that transpire during that run, if you would?

@mrlesmithjr
Copy link
Author

Here are the docker events from the last build resulting in the 404 error again.

2017-05-27T20:56:32.025677611-04:00 image pull ubuntu:latest (name=ubuntu)
2017-05-27T20:56:33.022169452-04:00 container create 2b291c580914e3508db2ee1263411c4b78234e947b306369e8d3b391a6bfac1c (image=sha256:ebcd9d4fca80e9e8afc525d8a38e7c56825dfb4a220ed77156f9fb13b14d4ab7, name=naughty_keller)
2017-05-27T20:56:33.232027150-04:00 container commit 2b291c580914e3508db2ee1263411c4b78234e947b306369e8d3b391a6bfac1c (comment=, image=sha256:ebcd9d4fca80e9e8afc525d8a38e7c56825dfb4a220ed77156f9fb13b14d4ab7, imageID=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, imageRef=, name=naughty_keller)
2017-05-27T20:56:33.318380532-04:00 container destroy 2b291c580914e3508db2ee1263411c4b78234e947b306369e8d3b391a6bfac1c (image=sha256:ebcd9d4fca80e9e8afc525d8a38e7c56825dfb4a220ed77156f9fb13b14d4ab7, name=naughty_keller)
2017-05-27T20:56:33.506675280-04:00 container create 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, name=laughing_lewin)
2017-05-27T20:56:33.506847474-04:00 container attach 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, name=laughing_lewin)
2017-05-27T20:56:33.577078408-04:00 network connect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633, name=bridge, type=bridge)
2017-05-27T20:56:33.864083381-04:00 container start 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, name=laughing_lewin)
2017-05-27T20:58:08.593049174-04:00 container die 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (exitCode=0, image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, name=laughing_lewin)
2017-05-27T20:58:08.950577902-04:00 network disconnect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633, name=bridge, type=bridge)
2017-05-27T20:58:14.856453211-04:00 container commit 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (comment=, image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, imageID=sha256:bf0fdaba3a723341c52bd72414caed9966d707ce554a79580be546b6b0e5b0d4, imageRef=, name=laughing_lewin)
2017-05-27T20:58:16.086643677-04:00 container destroy 494751921d1369084ddb1200fef22c38bc3f3b22819df528a532af0ebd596633 (image=sha256:c1d8b1fe55b4ad440a2fdac6078b2e003138701bba865f9a8da5f313bce3708e, name=laughing_lewin)
2017-05-27T20:58:21.686420339-04:00 container create 5e1900ef362c3f6ce793eaa86196c0226d12747f0d2ad00ddeaeda9dfa20f044 (image=sha256:bf0fdaba3a723341c52bd72414caed9966d707ce554a79580be546b6b0e5b0d4, name=mystifying_swirles)
2017-05-27T20:58:22.317915886-04:00 container commit 5e1900ef362c3f6ce793eaa86196c0226d12747f0d2ad00ddeaeda9dfa20f044 (comment=, image=sha256:bf0fdaba3a723341c52bd72414caed9966d707ce554a79580be546b6b0e5b0d4, imageID=sha256:b144fed43b01865ad9ad3330b42627e7a88adde55f7245b419e7b338663b94db, imageRef=, name=mystifying_swirles)
2017-05-27T20:58:22.720158915-04:00 container destroy 5e1900ef362c3f6ce793eaa86196c0226d12747f0d2ad00ddeaeda9dfa20f044 (image=sha256:bf0fdaba3a723341c52bd72414caed9966d707ce554a79580be546b6b0e5b0d4, name=mystifying_swirles)
2017-05-27T20:58:22.884341043-04:00 container create f4be1b87700d234fd7592f9129daff3673d89c110db4003695b6824c61d51f2a (image=sha256:b144fed43b01865ad9ad3330b42627e7a88adde55f7245b419e7b338663b94db, name=cocky_fermat)
2017-05-27T20:58:23.295018798-04:00 container commit f4be1b87700d234fd7592f9129daff3673d89c110db4003695b6824c61d51f2a (comment=, image=sha256:b144fed43b01865ad9ad3330b42627e7a88adde55f7245b419e7b338663b94db, imageID=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, imageRef=, name=cocky_fermat)
2017-05-27T20:58:23.417674918-04:00 container destroy f4be1b87700d234fd7592f9129daff3673d89c110db4003695b6824c61d51f2a (image=sha256:b144fed43b01865ad9ad3330b42627e7a88adde55f7245b419e7b338663b94db, name=cocky_fermat)
2017-05-27T20:58:23.596640491-04:00 container create 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, name=eloquent_edison)
2017-05-27T20:58:23.596932043-04:00 container attach 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, name=eloquent_edison)
2017-05-27T20:58:23.665394084-04:00 network connect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e, name=bridge, type=bridge)
2017-05-27T20:58:23.989383465-04:00 container start 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, name=eloquent_edison)
2017-05-27T20:58:28.141810100-04:00 container die 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (exitCode=0, image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, name=eloquent_edison)
2017-05-27T20:58:28.501856221-04:00 network disconnect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e, name=bridge, type=bridge)
2017-05-27T20:58:29.994576865-04:00 container commit 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (comment=, image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, imageID=sha256:9a28683e47128b949027a84cc5e26f777ba27fe53190585f32311167c77be133, imageRef=, name=eloquent_edison)
2017-05-27T20:58:30.504778665-04:00 container destroy 8bbbe42bb0095d2af70193ef27038b2c35bc8cd9a7aa1875b62bff5eed56511e (image=sha256:f1bbacf50cc18ea6de6a0889225c41dfa81859a97d62582a4d0b4dbce02cc49f, name=eloquent_edison)
2017-05-27T20:58:30.656650795-04:00 container create 4cf948d40c29f00d06e8009bffcfa26316d609a877c21b4f58698c795dd6ab3d (image=sha256:9a28683e47128b949027a84cc5e26f777ba27fe53190585f32311167c77be133, name=gracious_heyrovsky)
2017-05-27T20:58:31.154904164-04:00 container commit 4cf948d40c29f00d06e8009bffcfa26316d609a877c21b4f58698c795dd6ab3d (comment=, image=sha256:9a28683e47128b949027a84cc5e26f777ba27fe53190585f32311167c77be133, imageID=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, imageRef=, name=gracious_heyrovsky)
2017-05-27T20:58:31.326968379-04:00 container destroy 4cf948d40c29f00d06e8009bffcfa26316d609a877c21b4f58698c795dd6ab3d (image=sha256:9a28683e47128b949027a84cc5e26f777ba27fe53190585f32311167c77be133, name=gracious_heyrovsky)
2017-05-27T20:58:31.484271123-04:00 container create 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing)
2017-05-27T20:58:31.485011139-04:00 container attach 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing)
2017-05-27T20:58:31.561473426-04:00 network connect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48, name=bridge, type=bridge)
2017-05-27T20:58:31.856521869-04:00 container start 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing)
2017-05-27T20:59:13.596601985-04:00 container kill 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing, signal=9)
2017-05-27T20:59:13.716688507-04:00 container die 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (exitCode=137, image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing)
2017-05-27T20:59:14.051226313-04:00 network disconnect 72cfe0300775e3d438410d9a6d6438f806faa98e12e3cb09194ef03021ab8a63 (container=1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48, name=bridge, type=bridge)
2017-05-27T20:59:14.656760966-04:00 container destroy 1c5281378e55241783bd552351374442115f7bb62c2824547b02bdfc46bd4e48 (image=sha256:2ac8f949386a27b22fed5f2e67ebdde59f78778a22175971466bd74d94958f38, name=vigilant_wing)

And here is the actual output of the ansible-container build:

Building Docker Engine context...
Starting Docker build of Ansible Container Conductor image (please be patient)...
ERROR	Unknown exception
Traceback (most recent call last):
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/cli.py", line 268, in __call__
    getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/core.py", line 150, in hostcmd_build
    cache=kwargs['cache']
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/docker/engine.py", line 82, in __wrapped__
    return fn(self, *args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/container/docker/engine.py", line 744, in build_conductor_image
    nocache=not cache)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/models/images.py", line 180, in build
    return self.get(image_id)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/models/images.py", line 201, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/image.py", line 262, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/api/client.py", line 216, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/Users/larry/python-virtualenvs/ansible-container-0.9.1/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
ImageNotFound: 404 Client Error: Not Found ("No such image: a")

@mrlesmithjr
Copy link
Author

Using Python virtualenv with the following modules BTW:

ansible==2.3.0.0
ansible-container==0.9.1
ansible-lint==3.4.13
appdirs==1.4.3
asn1crypto==0.22.0
backports.ssl-match-hostname==3.5.0.1
certifi==2017.4.17
cffi==1.10.0
chardet==3.0.3
colorama==0.3.9
cryptography==1.8.2
docker==2.3.0
docker-pycreds==0.2.1
enum34==1.1.6
idna==2.5
ipaddress==1.0.18
Jinja2==2.9.6
MarkupSafe==1.0
packaging==16.8
paramiko==2.1.2
pyasn1==0.2.3
pycparser==2.17
pycrypto==2.6.1
pyparsing==2.2.0
PyYAML==3.12
requests==2.16.0
ruamel.ordereddict==0.4.9
ruamel.yaml==0.14.12
six==1.10.0
structlog==17.2.0
urllib3==1.21.1
websocket-client==0.40.0

@ehelms
Copy link
Contributor

ehelms commented May 28, 2017

@mrlesmithjr I've seen other users report this issue (and was even able to replicate it myself) who install ansible-container from pip. From my own testing, the latest ansible-container from HEAD of git fixes this issue. I would recommend installing from source [1] and trying again until a new release is out (maybe @chouseknecht or @j00bar can shed some light on the plans for a 0.9.2).

[1] https://docs.ansible.com/ansible-container/installation.html#running-from-source

@mrlesmithjr
Copy link
Author

@ehelms Good information to know. Hopefully this can get sorted out soon.

@mrlesmithjr
Copy link
Author

So it looks like become: true in existing roles seem to be an issue for both Debian and RedHat.

Building Docker Engine context...
Starting Docker build of Ansible Container Conductor image (please be patient)...
Parsing conductor CLI args.
Docker™ daemon integration engine loaded. Build starting.	project=nginx
Building service...	project=nginx service=web

PLAY [web] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [web]

TASK [ansible-nginx : setting Alpine facts] ************************************
skipping: [web]

TASK [ansible-nginx : setting Debian facts] ************************************
skipping: [web]

TASK [ansible-nginx : setting RedHat facts] ************************************
ok: [web]

TASK [ansible-nginx : setting PHP version] *************************************
skipping: [web]

TASK [ansible-nginx : setting PHP version] *************************************
skipping: [web]

TASK [ansible-nginx : setting PHP version] *************************************
skipping: [web]

TASK [ansible-nginx : alpine | Installing NGINX] *******************************
skipping: [web]

TASK [ansible-nginx : debian | installing nginx] *******************************
skipping: [web]

TASK [ansible-nginx : redhat | installing epel repo (RedHat)] ******************
fatal: [web]: FAILED! => {"changed": false, "failed": true, "module_stderr": "/bin/sh: sudo: command not found\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 127}
	to retry, use: --limit @/tmp/tmpJ1wUD9/playbook.retry

PLAY RECAP *********************************************************************
web                        : ok=2    changed=0    unreachable=0    failed=1

ERROR	Error applying role!	engine=<container.docker.engine.Engine object at 0x165c510> exit_code=2 playbook=[{'hosts': u'web', 'roles': [ordereddict([('role', 'ansible-nginx')])], 'vars': {'nginx_worker_processes': 4, 'nginx_enable_php': True, 'nginx_events_block': ['worker_connections 768'], 'nginx_error_log': '/var/log/nginx/error.log', 'nginx_server_block': [ordereddict([('server_name', 'localhost'), ('default_server', True), ('enable_php', True), ('index', ['index.php', 'index.html', 'index.htm']), ('listen_address', ['*']), ('listen_port', '{{ nginx_listen_port }}'), ('location', '/'), ('root', '{{ nginx_web_root }}'), ('try_files', '$uri $uri/ =404')])], 'nginx_php_timezone': 'America/New_York', 'nginx_listen_port': 80, 'config_nginx': False, 'nginx_php_set_timezone': False, 'nginx_http_block': ordereddict([('basic_settings', ['keepalive_timeout 65', 'sendfile on', 'tcp_nodelay on', 'tcp_nopush on', 'types_hash_max_size 2048', 'include /etc/nginx/mime.types', 'default_type application/octet-stream']), ('gzip_settings', ['gzip on', 'gzip_disable "msie6"']), ('logging_settings', ['access_log {{ nginx_access_log }}', 'error_log {{ nginx_error_log }}']), ('vhost_configs', ['include /etc/nginx/conf.d/*.conf', 'include /etc/nginx/sites-enabled/*'])]), 'nginx_access_log': '/var/log/nginx/access.log', 'nginx_enable_ipv6': False}}]
Traceback (most recent call last):
  File "/usr/bin/conductor", line 11, in <module>
    load_entry_point('ansible-container', 'console_scripts', 'conductor')()
  File "/_ansible/container/__init__.py", line 19, in __wrapped__
    return fn(*args, **kwargs)
  File "/_ansible/container/cli.py", line 356, in conductor_commandline
    **params)
  File "/_ansible/container/__init__.py", line 19, in __wrapped__
    return fn(*args, **kwargs)
  File "/_ansible/container/core.py", line 712, in conductorcmd_build
    raise RuntimeError('Build failed.')
RuntimeError: Build failed.
Conductor terminated. Cleaning up.	command_rc=1 conductor_id=7448a18dee53e0287ff128478a17f215857a5f7b411a3c3245c8e6b975c2d85b save_container=False
ERROR	Conductor exited with status 1

@martivo
Copy link

martivo commented Jun 2, 2017

I seem to experience the same issue with 0.9.1
Maybe this input will help.

Base OS/build env: Centos 7
Building application: jenkins
Using just docker (not k8s or openshift)

docker --version
Docker version 1.12.6, build 3a094bd/1.12.6

container.yml

version: "2"
settings:
  conductor_base: centos:7
services: 
  commonOS:
     from: "centos:7"
     command: ["sleep 7200"]

registries: {}

docker events

2017-06-02T14:33:33.677025491+03:00 container create 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, vendor=CentOS)
2017-06-02T14:33:33.677784951+03:00 container attach 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, vendor=CentOS)
2017-06-02T14:33:33.730383387+03:00 network connect f037898a4168abbec324099223ac781cc8a36966c73aba66142d4bd1036a9257 (container=02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b, name=bridge, type=bridge)
2017-06-02T14:33:33.912133725+03:00 container start 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, vendor=CentOS)
2017-06-02T14:34:21.591979160+03:00 container kill 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, signal=9, vendor=CentOS)
2017-06-02T14:34:21.663543675+03:00 container die 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, exitCode=137, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, vendor=CentOS)
2017-06-02T14:34:21.714839371+03:00 network disconnect f037898a4168abbec324099223ac781cc8a36966c73aba66142d4bd1036a9257 (container=02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b, name=bridge, type=bridge)
2017-06-02T14:34:22.173179079+03:00 container destroy 02b20e33859e326623e668d0b114ce20e517d040f86e322221e2e3c7489cb74b (build-date=20170510, image=sha256:656cd1f58851fa73bbf32ae55ceb3bc11d21a212ebc1b72817c7f4537b5407fc, license=GPLv2, name=sleepy_cray, vendor=CentOS)

Commands used for building

      sh 'virtualenv venv && \
      source venv/bin/activate && \
      pip install --upgrade pip && \
      pip install --upgrade setuptools && \
      source venv/bin/activate && \
      pip install  -Ur requirements.txt'
      sh 'source venv/bin/activate && \
      cd commonOS && pwd && \
      ansible-container build'

requirements.txt

ansible
openshift==0.0.1
ansible-container[docker,k8s]

Output:

+ pip install -Ur requirements.txt
Collecting ansible (from -r requirements.txt (line 1))
  Using cached ansible-2.3.1.0.tar.gz
Collecting openshift==0.0.1 (from -r requirements.txt (line 2))
  Using cached openshift-0.0.1-py2.py3-none-any.whl
Collecting ansible-container[docker,k8s]==0.9.1 (from -r requirements.txt (line 3))
  Using cached ansible-container-0.9.1.tar.gz
Collecting jinja2 (from ansible->-r requirements.txt (line 1))
  Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting PyYAML (from ansible->-r requirements.txt (line 1))
  Using cached PyYAML-3.12.tar.gz
Collecting paramiko (from ansible->-r requirements.txt (line 1))
  Using cached paramiko-2.1.2-py2.py3-none-any.whl
Collecting pycrypto>=2.6 (from ansible->-r requirements.txt (line 1))
  Using cached pycrypto-2.6.1.tar.gz
Requirement already up-to-date: setuptools in ./venv/lib/python2.7/site-packages (from ansible->-r requirements.txt (line 1))
Collecting kubernetes~=1.0.1 (from openshift==0.0.1->-r requirements.txt (line 2))
  Using cached kubernetes-1.0.2-py2.py3-none-any.whl
Collecting ruamel.yaml (from openshift==0.0.1->-r requirements.txt (line 2))
  Using cached ruamel.yaml-0.14.12-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six (from openshift==0.0.1->-r requirements.txt (line 2))
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting dictdiffer (from openshift==0.0.1->-r requirements.txt (line 2))
  Using cached dictdiffer-0.6.1-py2.py3-none-any.whl
Collecting python-string-utils (from openshift==0.0.1->-r requirements.txt (line 2))
  Using cached python-string-utils-0.6.0.tar.gz
Collecting requests>=2 (from ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached requests-2.17.3-py2.py3-none-any.whl
Collecting structlog[dev]>=16.1 (from ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached structlog-17.2.0-py2.py3-none-any.whl
Collecting docker>=2.1 (from ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached docker-2.3.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->ansible->-r requirements.txt (line 1))
  Using cached MarkupSafe-1.0.tar.gz
Collecting cryptography>=1.1 (from paramiko->ansible->-r requirements.txt (line 1))
  Using cached cryptography-1.9.tar.gz
Collecting pyasn1>=0.1.7 (from paramiko->ansible->-r requirements.txt (line 1))
  Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Collecting websocket-client (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached websocket_client-0.40.0.tar.gz
Collecting python-dateutil (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting oauth2client (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached oauth2client-4.1.0-py2.py3-none-any.whl
Collecting urllib3!=1.21 (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached urllib3-1.21.1-py2.py3-none-any.whl
Collecting ipaddress (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting certifi (from kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached certifi-2017.4.17-py2.py3-none-any.whl
Collecting ruamel.ordereddict (from ruamel.yaml->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached ruamel.ordereddict-0.4.9-cp27-cp27mu-manylinux1_x86_64.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2->ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached chardet-3.0.3-py2.py3-none-any.whl
Collecting idna<2.6,>=2.5 (from requests>=2->ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached idna-2.5-py2.py3-none-any.whl
Collecting colorama; extra == "dev" (from structlog[dev]>=16.1->ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached colorama-0.3.9-py2.py3-none-any.whl
Collecting backports.ssl-match-hostname>=3.5; python_version < "3.5" (from docker>=2.1->ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached backports.ssl_match_hostname-3.5.0.1.tar.gz
Collecting docker-pycreds>=0.2.1 (from docker>=2.1->ansible-container[docker,k8s]==0.9.1->-r requirements.txt (line 3))
  Using cached docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->paramiko->ansible->-r requirements.txt (line 1))
  Using cached asn1crypto-0.22.0-py2.py3-none-any.whl
Collecting enum34 (from cryptography>=1.1->paramiko->ansible->-r requirements.txt (line 1))
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting cffi>=1.7 (from cryptography>=1.1->paramiko->ansible->-r requirements.txt (line 1))
  Using cached cffi-1.10.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client->kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached pyasn1_modules-0.0.9-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from oauth2client->kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting httplib2>=0.9.1 (from oauth2client->kubernetes~=1.0.1->openshift==0.0.1->-r requirements.txt (line 2))
  Using cached httplib2-0.10.3.tar.gz
Collecting pycparser (from cffi>=1.7->cryptography>=1.1->paramiko->ansible->-r requirements.txt (line 1))
  Using cached pycparser-2.17.tar.gz
Installing collected packages: MarkupSafe, jinja2, PyYAML, idna, asn1crypto, six, enum34, ipaddress, pycparser, cffi, cryptography, pyasn1, paramiko, pycrypto, ansible, backports.ssl-match-hostname, websocket-client, python-dateutil, pyasn1-modules, rsa, httplib2, oauth2client, urllib3, certifi, kubernetes, ruamel.ordereddict, ruamel.yaml, dictdiffer, python-string-utils, openshift, chardet, requests, colorama, structlog, docker-pycreds, docker, ansible-container
  Running setup.py install for MarkupSafe: started
    Running setup.py install for MarkupSafe: finished with status 'done'
  Running setup.py install for PyYAML: started
    Running setup.py install for PyYAML: finished with status 'done'
  Running setup.py install for pycparser: started
    Running setup.py install for pycparser: finished with status 'done'
  Running setup.py install for cryptography: started
    Running setup.py install for cryptography: finished with status 'done'
  Running setup.py install for pycrypto: started
    Running setup.py install for pycrypto: finished with status 'done'
  Running setup.py install for ansible: started
    Running setup.py install for ansible: finished with status 'done'
  Running setup.py install for backports.ssl-match-hostname: started
    Running setup.py install for backports.ssl-match-hostname: finished with status 'done'
  Running setup.py install for websocket-client: started
    Running setup.py install for websocket-client: finished with status 'done'
  Running setup.py install for httplib2: started
    Running setup.py install for httplib2: finished with status 'done'
  Running setup.py install for python-string-utils: started
    Running setup.py install for python-string-utils: finished with status 'done'
  Running setup.py install for ansible-container: started
    Running setup.py install for ansible-container: finished with status 'done'
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.3.1.0 ansible-container-0.9.1 asn1crypto-0.22.0 backports.ssl-match-hostname-3.5.0.1 certifi-2017.4.17 cffi-1.10.0 chardet-3.0.3 colorama-0.3.9 cryptography-1.9 dictdiffer-0.6.1 docker-2.3.0 docker-pycreds-0.2.1 enum34-1.1.6 httplib2-0.10.3 idna-2.5 ipaddress-1.0.18 jinja2-2.9.6 kubernetes-1.0.2 oauth2client-4.1.0 openshift-0.0.1 paramiko-2.1.2 pyasn1-0.2.3 pyasn1-modules-0.0.9 pycparser-2.17 pycrypto-2.6.1 python-dateutil-2.6.0 python-string-utils-0.6.0 requests-2.17.3 rsa-3.4.2 ruamel.ordereddict-0.4.9 ruamel.yaml-0.14.12 six-1.10.0 structlog-17.2.0 urllib3-1.21.1 websocket-client-0.40.0
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build Image)
[Pipeline] sh
[k8s-build-OS-image] Running shell script
+ source venv/bin/activate
++ deactivate nondestructive
++ unset pydoc
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/var/lib/jenkins/workspace/k8s-build-OS-image/venv
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ PATH=/var/lib/jenkins/workspace/k8s-build-OS-image/venv/bin:/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ '[' x '!=' x ']'
+++ basename /var/lib/jenkins/workspace/k8s-build-OS-image/venv
++ '[' venv = __ ']'
+++ basename /var/lib/jenkins/workspace/k8s-build-OS-image/venv
++ PS1='(venv)'
++ export PS1
++ alias 'pydoc=python -m pydoc'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
+ cd commonOS
+ pwd
/var/lib/jenkins/workspace/k8s-build-OS-image/commonOS
+ ansible-container build
Building Docker Engine context...	
Starting Docker build of Ansible Container Conductor image (please be patient)...	
ERROR	Unknown exception	
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/cli.py", line 268, in __call__
    getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/core.py", line 150, in hostcmd_build
    cache=kwargs['cache']
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/docker/engine.py", line 82, in __wrapped__
    return fn(self, *args, **kwargs)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/__init__.py", line 28, in __wrapped__
    return fn(*args, **kwargs)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/container/docker/engine.py", line 744, in build_conductor_image
    nocache=not cache)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/models/images.py", line 180, in build
    return self.get(image_id)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/models/images.py", line 201, in get
    return self.prepare_model(self.client.api.inspect_image(name))
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/api/image.py", line 262, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/api/client.py", line 220, in _result
    self._raise_for_status(response)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/api/client.py", line 216, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/var/lib/jenkins/workspace/k8s-build-OS-image/venv/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
ImageNotFound: 404 Client Error: Not Found ("No such image: a")
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

I also tried to clear /var/lib/docker folder. Also tried to build with root user directly in shell. Result is same.

@j00bar
Copy link
Contributor

j00bar commented Jun 2, 2017

Okay! Mystery solved, methinks...

The error about missing image 'a' comes from this section in docker-py: https://github.com/docker/docker-py/blob/e4093ab/docker/models/images.py#L176-L182 It's trying to identify when the build has finished properly so that it can return the image object.

Unfortunately, the output of pip triggers that condition. pip install ansible gives us Successfully built ansible, and the a matches the regex just enough to where it thinks the build is complete and fails trying to find image a.

This is already documented as docker/docker-py#1625, which means it should be fixed in the next release of docker-py.

@j00bar
Copy link
Contributor

j00bar commented Jun 2, 2017

I'm going to leave this open to track the No such image: a problem and open another one for the missing sudo package problem.

@j00bar j00bar changed the title ansible-container build fails 404 Client Error: Not Found ("No such image: a") Jun 2, 2017
@mrlesmithjr
Copy link
Author

Oh nice, good find man.

@jmvbxx
Copy link

jmvbxx commented Jun 10, 2017

The feedback on this is great and awesome find @j00bar ..

So what's the workaround for now?

I received the following

docker.errors.ImageNotFound: 404 Client Error: Not Found ("no such image: a: No such image: a:latest")

After only running ansible-container init & ansible-container build. Please don't make me use docker compose :-D

@LukeShortCloud
Copy link
Contributor

@ehelms pointed out earlier in this issue that installing Ansible-Container from the source code on GitHub is the short-term solution. Refer to this link for the GitHub installation steps: https://docs.ansible.com/ansible-container/installation.html#running-from-source. This is no longer an issue in the 0.92rc0 release which should have a full/stable release soon. I have been using a virtual Python environment to run Ansible-Container from GitHub and can confirm that I no longer run into the issue.

@datwiz
Copy link

datwiz commented Jun 19, 2017

As a short-term fix, I applied the following patch in my build container to get around the 404 issue.

docker-model-images.patch.txt

@xenithorb
Copy link

This is bad for the project because the example in the documentation (i.e. ansible-container init ansible.django-template ) breaks in this exact way. Even weirder and more confusing is that running it in --debug doesn't cause an error and builds successfully.

@j00bar
Copy link
Contributor

j00bar commented Jun 26, 2017

Given how many people this is affecting, I've got a workaround that just needs testing. By ensuring the pip output for "Successfully built" begins with a package whose name does not begin with [a-f], it shouldn't trigger the regex. I'm in Israel this week for a conference, but I'll see what I can do.

@datwiz
Copy link

datwiz commented Jun 26, 2017

The reason it works with the --debug flag can be found around line 770 in the build_conductor_image method in container/docker/engine.py
With the debug flag set, the build code calls a different docker-py api method in order to output docker build output.
A really quick workaround is to use the debug flag.

@ryansb
Copy link
Contributor

ryansb commented Jul 31, 2017

It looks like the docker-py fix for this was released on July 28 https://github.com/docker/docker-py/milestone/33

We'll need to test, but once we do bumping the docker-py version in requirements.txt should resolve this.

LukeShortCloud pushed a commit to LukeShortCloud/ansible-container that referenced this issue Aug 15, 2017
LukeShortCloud pushed a commit to LukeShortCloud/ansible-container that referenced this issue Aug 16, 2017
chouseknecht pushed a commit that referenced this issue Aug 17, 2017
* Require the Docker >= 2.4.0 Python library (#564)

* Require the Docker >= 2.4.0 Python library in setup.py (#564)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants