rundeck-plugins/docker

Model Source: Empty "Default Attributes" causes error

gschueler opened this issue · 0 comments

I added the 'docker / container / model' model source, and left the "Default Attributes" entry blank.

The result on the stderr was:

DEBUG: container-model-source: RD_CONFIG_DOCKER_HOST environment variable not defined.
DEBUG: container-model-source: RD_CONFIG_DOCKER_CERT_PATH environment variable not defined.
DEBUG: container-model-source: RD_CONFIG_DOCKER_TLS_VERIFY environment variable not defined.
DEBUG: container-model-source: Mapping: nodename.selector=default:Name,hostname.selector=default:IPAddress
DEBUG: container-model-source: Executing `docker ps --format {{.ID}}` ...
DEBUG: container-model-source: Processing 1 containers ...
DEBUG: container-model-source: Inspecting container: 3becfb1c5437

DEBUG: container-model-source: Parsing json data for container: 3becfb1c5437
DEBUG: container-model-source: Mapping: nodename.selector=default:Name,hostname.selector=default:IPAddress
DEBUG: container-model-source: Custom Attributes: {'hostname': u'172.17.0.2', 'nodename': u'/nifty_knuth'}
Traceback (most recent call last):
  File "/Users/greg/rundeckpro/libext/cache/docker-container/model-source", line 197, in <module>
    mappingList
  File "/Users/greg/rundeckpro/libext/cache/docker-container/model-source", line 118, in nodeCollectData
    data.update(dict(token.split('=') for token in shlex.split(defaults)))
ValueError: dictionary update sequence element #0 has length 1; 2 is required

workaround: I added some=thing as the Default Attributes, and then it worked