No output from snapped vault app when run in a systemd service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
New
|
Undecided
|
Unassigned |
Bug Description
The vault snap doesn't provide a service within the snap, so it's necessary to manually create a systemd unit on the host.
When doing so, I noticed there's no output from the service in the systemd journal.
This is a sample unit definition which shows the issue:
[Unit]
Description=Vault service
After=syslog.target
[Service]
ExecStart=
Type=simple
[Install]
WantedBy=
While I'm not sure this is a snapd issue, it seems to be related to snap confinement, because running the same binary without the snap confinement does make the output appear in the journal.
For instance, replacing the command with:
ExecStart=
Another weird behavior I've noticed is that while running vault from a bash script called by the systemd unit doesn't fix the issue, having the script print something to stdout does also make the vault output appear.
For instance:
ExecStart=
where script is
#/bin/bash -e
exec /snap/bin/vault server -dev # no output in journal
#/bin/bash -e
echo hello
exec /snap/bin/vault server -dev # output in journal