Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to initialize logging driver issue and work around #1077

Closed
snoby opened this issue Dec 23, 2017 · 4 comments
Closed

failed to initialize logging driver issue and work around #1077

snoby opened this issue Dec 23, 2017 · 4 comments

Comments

@snoby
Copy link

snoby commented Dec 23, 2017

Issue Type

  • Bug report with work around

Molecule and Ansible details

ansible  version = 2.4.1.0
molecule version = 2.5.0
  • Molecule installation method: pip
  • Ansible installation method: pip

Desired Behaviour

Should be able to converge
I have a virtenv python environment up and running and my molecule file and playbook look like this:

dependency:
  name: galaxy
driver:
  name: docker
lint:
  name: yamllint
platforms:
  - name: instance
    image: centos:latest
provisioner:
  name: ansible
  lint:
    name: ansible-lint
scenario:
  name: default
verifier:
  name: testinfra
  lint:
    name: flake8

and the simple playbook

- name: Converge
  hosts: all
  become: true
  roles:
    - role: kubeadm

However I try to do a converge I get this error message:

     "msg": "Error starting container 87b8864b730298c599a70af9e4ef7a3aff38d3b24d2f474b4b75c472bf7d1c20: 500 Server Error: Internal Server Error (\"{\"message\":\"failed to initialize logging driver: Unix syslog delivery error\"}\")"

I've tried everything I can think of to set this up just like the examples. This is running on MAC with docker version 17.12.0-ce-rc3

Actual Behaviour (Bug report only)

fails to converge in the task "Create Molecule instances"

snippet of back trace:

      File "/var/folders/dz/71gp3_rx7sqbpwqmzr8ps_c00000gn/T/ansible_iYxr6B/ansible_module_docker_container.py", line 1952, in container_start
        self.client.start(container=container_id)
      File "/Users/snoby/work/home_servers/virtenv/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
        return f(self, resource_id, *args, **kwargs)
      File "/Users/snoby/work/home_servers/virtenv/lib/python2.7/site-packages/docker/api/container.py", line 383, in start
        self._raise_for_status(res)
      File "/Users/snoby/work/home_servers/virtenv/lib/python2.7/site-packages/docker/client.py", line 174, in _raise_for_status
        raise errors.APIError(e, response, explanation=explanation)

and the error message

      "msg": "Error starting container 87b8864b730298c599a70af9e4ef7a3aff38d3b24d2f474b4b75c472bf7d1c20: 500 Server Error: Internal Server Error (\"{\"message\":\"failed to initialize logging driver: Unix syslog delivery error\"}\")"

I was able to work around the issue by downgrading my docker install from the beta channel to the stable channel.
I ended up with version 17.09.1-ce and I was able to converge.

Basically just know that something is coming down the road that will break molecule.

@retr0h retr0h closed this as completed Dec 28, 2017
@retr0h retr0h added the invalid label Dec 28, 2017
@retr0h retr0h reopened this Jan 6, 2018
@retr0h retr0h added enhancement and removed invalid labels Jan 6, 2018
retr0h added a commit to retr0h/molecule that referenced this issue Jan 6, 2018
Docker edge would fail to start container due to syslog.
Since we don't need to log to syslog, setting to none.

Fixes: ansible#1077
@retr0h
Copy link
Contributor

retr0h commented Jan 6, 2018

Thanks @snoby

retr0h added a commit that referenced this issue Jan 6, 2018
Docker edge would fail to start container due to syslog.
Since we don't need to log to syslog, setting to none.

Fixes: #1077
triplepoint added a commit to triplepoint/ansible-mosquitto that referenced this issue Jan 13, 2018
@sameergautam
Copy link

@retr0h
I'm still getting this error.

ansible --version
ansible 2.4.3.0
  config file = /Users/sameergautam/.ansible.cfg
  configured module search path = [u'/usr/share/ansible']
  ansible python module location = /Library/Python/2.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
molecule --version
molecule, version 2.7.0
docker version
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:03:51 2017
 OS/Arch:	darwin/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:12:29 2017
  OS/Arch:	linux/amd64
  Experimental:	true

Play is no different from Snoby's.

@Nklya
Copy link

Nklya commented Mar 25, 2018

@sameergautam You need to check molecule/default/create.yml file.
I think you still have log_driver: syslog in it.

@sameergautam
Copy link

@Nklya yeah, I had the syslog as log_driver mentioned in the create.yml file. I replaced it with none and the test went ahead just fine.

triplepoint added a commit to triplepoint/ansible-dockerized-services that referenced this issue Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants