jaredledvina/sensu-go-ansible

Molecule tests are failing on docker driver

Closed this issue · 7 comments

Thanks for this role. Just checked out the code and wanted to run CentOS tests on Docker:

pipenv run molecule --base-config molecule/shared/base.yml test --scenario-name centos

But it fails because dokken/centos-7 container does not have systemd configured:

TASK [sensu-go-ansible : Ensure sensu-backend service state] *******************
    Wednesday 31 July 2019  13:18:39 +0200 (0:00:00.147)       0:01:21.624 ********
    fatal: [centos-7]: FAILED! => changed=false 
      cmd: /usr/bin/systemctl
      msg: 'Failed to get D-Bus connection: Operation not permitted'
      rc: 1
      stderr: |-
        Failed to get D-Bus connection: Operation not permitted
      stderr_lines: <omitted>
      stdout: ''
      stdout_lines: <omitted>

Are there perhaps some pre-configure steps missing to tweak the centos image prior running the role on it?

Also, is Travis intentionally not connected to the project? I think only license checks are currently run for every PR.

Hi @miha-plesko,

Interesting that CentOS is failing for you, the only build issue I'm aware of is that Fedora 30 is being a bit weird.

TravisCI is and has always been hooked up, it should be https://travis-ci.com/jaredledvina/sensu-go-ansible and every PR is required to pass the TravisCI and DCO checks (unless I override as Admin which due to the previously mentioned Fedora issue I have been).

Lemme take a look at the local tests and see if I can repro the issue.

Ahh I see, Travis is run for every PR, but not for every commit that's why the latest commit only has a single check (instead three). Sorry, I missed that. Now I see CentOS test is actually green on Travis, which suggests something could be wrong in my dev env.

No worries! My local docker is sideways so, reinstalling that currently to see what's wrong.

Yeah, the repo is setup to block pushing to master and requiring PRs always.

Hey @miha-plesko - Were you able to get the tests to run locally?

I'd love to keep https://github.com/jaredledvina/sensu-go-ansible/blob/master/CONTRIBUTING.md up to date so, let me know if there was anything you had to do specifically to get them to run.

Closing out for now, but, do let me know if you run into any issues.

Hi @jaredledvina, sorry I forgot to answer here; I actually haven't played with it since because I got overwhelmed with other work. Will post when I get there.