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

service module: ubuntu xenial on travis: failure 1 running systemctl show for 'apache2': Failed to connect to bus: No such file or directory #19818

Closed
juju4 opened this issue Jan 3, 2017 · 12 comments
Labels
affects_2.1 This issue/PR affects Ansible v2.1 bug This issue/PR relates to a bug. module This issue/PR relates to a module.

Comments

@juju4
Copy link
Contributor

juju4 commented Jan 3, 2017

From @juju4 on August 5, 2016 21:52

ISSUE TYPE
  • Bug Report
COMPONENT NAME

service module

ANSIBLE VERSION
ansible 2.1.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION

No extra

OS / ENVIRONMENT

Docker in Travis, mapping ubuntu xenial in local connection

SUMMARY

when using service task to check one is started, task is failed with above message

STEPS TO REPRODUCE

See
https://travis-ci.org/juju4/ansible-icinga2/jobs/150094107
https://travis-ci.org/juju4/ansible-bro-ids/jobs/150093516
https://travis-ci.org/juju4/ansible-mhn/jobs/150159300
(only on target xenial, working on trusty)

On a local Vagrantfile with xenial (as found in github/#role#/test/vagrant): it's working normally...
So there is something with travis environment

EXPECTED RESULTS

test/vagrant local execution on xenial

TASK [bro-ids : check that mysql is running] ***********************************
task path: /home/julien/Documents/script/homelab/roles/bro-ids/tasks/main.yml:80
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936 `" && echo ansible-tmp-1470432978.69-241202336337936="` echo $HOME/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936 `" ) && sleep 0'"'"''
<127.0.0.1> PUT /tmp/tmp2IUx42 TO /home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/service
<127.0.0.1> SSH: EXEC sftp -b - -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r '[127.0.0.1]'
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2202 -o 'IdentityFile="/home/julien/Documents/script/homelab/roles/bro-ids/test/vagrant/.vagrant/machines/broids/virtualbox/private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/julien/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-drceqxkhrlhnomixtamaaklasdzascol; LANG=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/service; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1470432978.69-241202336337936/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
ok: [broids] => {"changed": false, "invocation": {"module_args": {"arguments": "", "enabled": null, "name": "mysql", "pattern": null, "runlevel": "default", "sleep": null, "state": "started"}, "module_name": "service"}, "name": "mysql", "state": "started"}
ACTUAL RESULTS

https://travis-ci.org/juju4/ansible-bro-ids/jobs/150166292

TASK [bro-ids : check that mysql is running] ***********************************

task path: /etc/ansible/roles/bro-ids/tasks/main.yml:80

<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root

<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016 `" && echo ansible-tmp-1470433523.11-95534498356016="` echo $HOME/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016 `" ) && sleep 0'

<localhost> PUT /tmp/tmpMC1xcR TO /root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/service

<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/service; rm -rf "/root/.ansible/tmp/ansible-tmp-1470433523.11-95534498356016/" > /dev/null 2>&1 && sleep 0'

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"arguments": "", "enabled": null, "name": "mysql", "pattern": null, "runlevel": "default", "sleep": null, "state": "started"}, "module_name": "service"}, "msg": "failure 1 running systemctl show for 'mysql': Failed to connect to bus: No such file or directory\n"}


Copied from original issue: ansible/ansible-modules-core#4348

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on August 5, 2016 22:0

@grossws ping, this issue is waiting for your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on September 8, 2016 19:3

@grossws, ping. This issue is still waiting on your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @geerlingguy on September 18, 2016 2:20

I seem to have hit this as well, in a Fedora 24 Docker build on Travis CI (note that I can't reproduce the issue using the exact same container and build steps when running them on Docker for Mac 1.12.1...). See: https://travis-ci.org/geerlingguy/ansible-role-redis/jobs/160756445#L298

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on October 5, 2016 15:18

@ansible, ping. This issue is waiting on your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on October 21, 2016 8:42

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

for reference, running privileged works, but not --cap-add=SYS_ADMIN

    run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"

as seen here moby/moby#7459
seems for cap-add need an unreleased docker.

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on November 6, 2016 9:40

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on November 22, 2016 9:49

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@juju4
Copy link
Contributor Author

juju4 commented Jan 3, 2017

From @ansibot on December 7, 2016 18:1

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

@gundalow
Copy link
Contributor

gundalow commented Jan 4, 2017

Hi

  1. Does this work in Ansible 2.2 (which is the current stable release)
  2. Does this work on devel (2.3)
  3. Can u put please link the the playbook you are runing
  4. Have you tested this outside of Vagrant

needs_info

@juju4
Copy link
Contributor Author

juju4 commented Jan 4, 2017

It seems to be fixed in current 2.2.
I check latest travis build for bro-ids (docker) and mhn(lxc) and corresponding tasks are working.
issue was in travis testing, local vagrant or kitchen-test were working fine.
closing.

@juju4 juju4 closed this as completed Jan 4, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jan 18, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.1 This issue/PR affects Ansible v2.1 bug This issue/PR relates to a bug. module This issue/PR relates to a module.
Projects
None yet
Development

No branches or pull requests

4 participants