question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing systemd service descriptions fails when (valid) single quote is in unit.description

See original GitHub issue

Describe the issue you are experiencing

I’m attempting to update supervisor from supervisor-2021.03.4 to supervisor-2021.03.6 and it’s throwing an error while trying to parse host system service information.

What is the used version of the Supervisor?

supervisor-2021.03.4

What type of installation are you running?

Home Assistant Supervised

Which operating system are you running on?

Debian

What is the version of your installed operating system?

Debian GNU/Linux 10 (buster)

What version of Home Assistant Core is installed?

core-2021.3.3

Steps to reproduce the issue

  1. Have the Splunk Forwarder installed on the host system, or have a ’ mark in a systemd service file in the description line (this is valid)
  2. Browse to Supervisor -> System tab
  3. Click update in the Supervisor block
  4. See error

Anything in the Supervisor logs that might be useful for us?

# Put your logs below this line
' - Expecting ',' delimiter: line 1 column 14455 (char 14454)
21-03-27 09:34:21 WARNING (MainThread) [supervisor.host.services] Can't update host service information

The line where it throws an error is this, at the misplaced quote just before splunk enable boot-start:

["SplunkForwarder.service", "Systemd service file for Splunk, generated by "splunk enable boot-start"", "loaded", "active", "running", "", "/org/freedesktop/systemd1/unit/SplunkForwarder_2eservice", 0, "", "/"]

It’s erroring because 'splunk enable boot-start' from the systemd unit file (which has single quotes) has been converted to double quotes at some point in Home Assistant’s handling of things.

The relevant part of the original systemd unit file:

$ cat /etc/systemd/system/SplunkForwarder.service
[Unit]
Description=Systemd service file for Splunk, generated by 'splunk enable boot-start'
After=network.target

[Service]
Type=simple
Restart=always
<snip>

SImilar output from the command line:

$ systemctl status SplunkForwarder.service
* SplunkForwarder.service - Systemd service file for Splunk, generated by 'splunk enable boot-start'
   Loaded: loaded (/etc/systemd/system/SplunkForwarder.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-03-22 13:22:26 AEST; 5 days ago

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yalemancommented, Jul 25, 2021

This is still a problem with the latest version.

0reactions
ludeeuscommented, Jul 26, 2021

Hi there @yaleman 👋

Installing additional software on the host for supervised installations is not supported and this is not considered a bug with the supervisor.

https://github.com/home-assistant/architecture/blob/master/adr/0014-home-assistant-supervised.md

No additional software, outside of the Home Assistant ecosystem, is installed.

I suggest you; a) Remove it b) Manually adjust the service file

Read more comments on GitHub >

github_iconTop Results From Across the Web

systemctl - Freedesktop.org
Stop (deactivate) one or more units specified on the command line. This command will fail if the unit does not exist or if...
Read more >
Bash won't recognize existence of closing single quote in ...
Bash won't recognize existence of closing single quote in systemd unit file - Stack Overflow. Stack Overflow for Teams – Start collaborating ...
Read more >
How to use quote and dollarsign with systemd
So, the quoting rules: Enclose the string to be treated as a single argument either in single quotes (' ') or double quotes...
Read more >
Understanding Systemd Units and Unit Files | DigitalOcean
Ideas that in other init systems may be handled with one unified service definition can be broken out into component units according to ......
Read more >
Ubuntu Manpage: systemd.service - Service unit configuration
A unit configuration file whose name ends in .service encodes information about ... If one of the commands fails (and is not prefixed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found