Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
315 views
315 views

Our systems are Ubuntu Xenial with Systemd removed, and we're using goss for validating system configurations. Our VM image build process suddenly started failing with goss complaining that a number of services that should be running allegedly aren't:

...
Service: postfix: enabled:
Expected
    <bool>: false
to equal
    <bool>: true
Service: postfix: running:
Expected
    <bool>: false
to equal
    <bool>: true

Service: ssh: enabled:
Expected
    <bool>: false
to equal
    <bool>: true
Service: ssh: running:
Expected
    <bool>: false
to equal
    <bool>: true
...

However, I verified that the services are, in fact, up and running, as they should, so goss is reporting incorrectly here.

in Sysadmin
edited by
by (100)
1 13 28
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

As it turns out, uninstalling the package systemd after replacing Systemd with Upstart doesn't actually remove some of the files installed by that package, namely /bin/systemctl. But goss uses the presence or absence of that file to decide how it checks service states.

We didn't run into this issue before, because we were using an older goss version that would fall back to SysV init scripts. However, that fallback got removed in version 0.3.8 (per issue #319), so when we updated goss to a more recent version the checks started failing.

After removing /bin/systemctl the checks worked correctly again.

by (100)
1 13 28
edit history
...