service is_running error in Ubuntu 16.04 docker container
See original GitHub issueI’m using molecule with testinfra. I have two contaieners: ubuntu 16.04 and ubuntu 18.04. On new version the test work, but on the older I get:
$ molecule verify
(...)
============================= test session starts ==============================
platform darwin -- Python 2.7.15, pytest-4.3.0, py-1.8.0, pluggy-0.9.0
rootdir: /Users/tomasz/ansible-playbooks/plays/haproxy/molecule/default, inifile:
plugins: testinfra-1.19.0
collected 4 items
tests/test_default.py ...F [100%]
=================================== FAILURES ===================================
______________ test_service_is_running[ansible://ladon.amana.vpn] ______________
host = <testinfra.host.Host object at 0x107235d50>
def test_service_is_running(host):
service = host.service('haproxy')
> assert service.is_running
tests/test_default.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <service haproxy>
@property
def is_running(self):
return self.run_expect(
> [0, 3], "systemctl is-active %s", self.name).rc == 0
E AssertionError: Unexpected exit code 1 for CommandResult(command=u'systemctl is-active haproxy', exit_status=1, stdout=u'', stderr=u'Failed to connect to bus: No such file or directory')
E assert 1 in [0, 3]
E + where 1 = CommandResult(command=u'systemctl is-active haproxy', exit_status=1, stdout=u'', stderr=u'Failed to connect to bus: No such file or directory').rc
/usr/local/lib/python2.7/site-packages/testinfra/modules/service.py:107: AssertionError
===================== 1 failed, 3 passed in 50.88 seconds ======================
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Processes are running slow in docker container on ubuntu 18.04
This is a bug report This is a feature request I searched existing issues before opening this one Processes are taking time when...
Read more >docker - Container is not running - Stack Overflow
The docker exec command runs a new command in a running container. The command started using docker exec will only run while the...
Read more >Docker service create complete, no error, but mounted share ...
On my Ubuntu 16.04 laptop, I did a 'docker service create' with two --mount statements. the command ran to completion, and service is...
Read more >How to Debug and Fix Common Docker Issues - DigitalOcean
To install Docker on a server, you can follow the how-to guides for CentOS 7 or for Ubuntu 16.04. You can visit the...
Read more >Root User and Password Inside a Docker Container - Baeldung
Here, we used “ubuntu:16.04” as the base image. Let's build the image using the docker build command: $ docker build -t baeldung ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TomaszKlosinski it’s released as 2.1.0
Great @philpep, thanks for the fix, you’re awsome!
By the way, in which version this will be released?