Skip to content

Fatal errors when I 'install_only' on a base AMI (AWS) followed by a regular Chef run #78

@mvh

Description

@mvh

We're installing / running threatstack on 1/2 of our nodes. In order to save time during startup, threatstack-agent is installed with 'install_only' set to 'true' when building the base AMI, and then this value is set to 'false' on half of the booted instances. I'm seeing a fatal error at the end of the Chef run that looks like:

[2021-01-11T10:11:31-08:00]` FATAL: Mixlib::ShellOut::ShellCommandFailed: service[threatstack] (threatstack::agent_setup line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /bin/systemctl --system start threatstack ----
STDOUT:
STDERR: Job for threatstack.service canceled.
---- End output of /bin/systemctl --system start threatstack ----

If I run the /bin/systemctl --system start threatstack manually as root after the Chef run threatstack does start up fine, it also starts on a reboot. Following Chef runs do not start the service running, though. On the initial boot from the AMI before the chef run systemd tries to bring up the threatstack-agent service, but it fails because it's not configured, and the service is shut down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions