No output from snapped vault app when run in a systemd service

Bug #2003077 reported by Alberto Donato
6
This bug affects 1 person
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=/snap/bin/vault server -dev
Type=simple

[Install]
WantedBy=multi-user.target

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=/snap/vault/current/bin/vault server -dev

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=/path/to/my/script

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.