Giter Club home page Giter Club logo

Comments (3)

ambsw-technology avatar ambsw-technology commented on June 18, 2024

That was the API. Here's the CLI error at the same place:

DEBUG:dockerfabric.base:Creating new DockerCliConnections connection for key ('172.24.2.11', None) with args: (), kwargs: {}
DEBUG:paramiko.transport:[chan 18] Max packet in: 32768 bytes
DEBUG:paramiko.transport:[chan 18] Max packet out: 32768 bytes
DEBUG:paramiko.transport:Secsh channel 18 opened.
DEBUG:paramiko.transport:[chan 18] Sesch channel 18 request ok
DEBUG:paramiko.transport:[chan 18] Sesch channel 18 request ok
DEBUG:paramiko.transport:[chan 18] EOF received (18)
DEBUG:paramiko.transport:[chan 18] EOF sent (18)
Traceback (most recent call last):
  File "/mnt/data/.virtualenvs/build_deploy/local/lib/python2.7/site-packages/fabric/main.py", line 756, in main
    *args, **kwargs
  File "/mnt/data/.virtualenvs/build_deploy/local/lib/python2.7/site-packages/fabric/tasks.py", line 426, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/mnt/data/.virtualenvs/build_deploy/local/lib/python2.7/site-packages/fabric/tasks.py", line 173, in run
    return self.wrapped(*args, **kwargs)
  File "/data/apex-server/build_deploy/src/fabfile.py", line 812, in setup_service_graylog
    pull_required_containers()
  File "/data/apex-server/build_deploy/src/fabfile.py", line 1957, in pull_required_containers
    docker_client.pull(env.docker_maps.containers[container].image)
  File "/mnt/data/.virtualenvs/build_deploy/local/lib/python2.7/site-packages/dockerfabric/cli.py", line 113, in pull
    cmd_str = self._out.get_cmd('pull', repo_tag, **kwargs)
  File "/mnt/data/.virtualenvs/build_deploy/local/lib/python2.7/site-packages/dockermap/client/cli.py", line 263, in get_cmd
    return '{0}{1} {2}'.format(cmd_prefix or '', self._cmd, ' '.join(cmd_args))
TypeError: sequence item 1: expected string or Unicode, _NotSet found

from docker-fabric.

merll avatar merll commented on June 18, 2024

If you use code similar to what you described when reporting the client parsing errors, there has been a change in the containers property in Docker-Map from 0.7.0 to 0.7.1. It was intended to be working similar to several other objects (e.g. the volumes property) as

  • access to items is possible via both dictionary and attribute syntax (e.g. containers['c1'] is equivalent to containers.c1);
  • iteration goes by items, not keys as usual for dictionaries.

Unfortunately the behavior was not as documented which went unnoticed for a while. So the code from your earlier example could be changed similar to this:

for container_name, container_config in env.docker_maps.containers:
    docker_client.pull(container_config.image)

Whereas the attribute access is just an additional feature that should not cause any issues, the iteration behavior change probably should have been mentioned in the change log.

from docker-fabric.

ambsw-technology avatar ambsw-technology commented on June 18, 2024

Thanks for the explanation.

from docker-fabric.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.