Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

TestSocketActivation failed with systemd-v219 on the host #1739

Closed
alban opened this issue Nov 13, 2015 · 3 comments
Closed

TestSocketActivation failed with systemd-v219 on the host #1739

alban opened this issue Nov 13, 2015 · 3 comments

Comments

@alban
Copy link
Member

alban commented Nov 13, 2015

$ make functional-check GO_TEST_FUNC_ARGS='-run TestSocketActivation'
  GO TEST      github.com/coreos/rkt/tests
=== RUN TestSocketActivation
--- FAIL: TestSocketActivation (0.18s)
    rkt_socket_activation_test.go:120: Unit name /home/alban/go/src/github.com/coreos/rkt/build-rkt-0.10.0+git/gopath/src/github.com/coreos/rkt/tests/rkt-testing-socket-activation-7399526900105836502.service is not valid.
$ cat /home/alban/go/src/github.com/coreos/rkt/build-rkt-0.10.0+git/gopath/src/github.com/coreos/rkt/tests/rkt-testing-socket-activation-7399526900105836502.service

[Unit]
Description=Socket-activated echo server

[Service]
ExecStart=/home/alban/go/src/github.com/coreos/rkt/build-rkt-0.10.0+git/bin/rkt --dir=/tmp/datadir-884319114 --local-config=/tmp/localdir-095449953 --system-config=/tmp/systemdir-251208524 --insecure-skip-verify run --mds-register=false /home/alban/go/src/github.com/coreos/rkt/build-rkt-0.10.0+git/tmp/functional/test-tmp/rkt-inspect-echo.aci
KillMode=process
$
@alban
Copy link
Member Author

alban commented Nov 19, 2015

With systemd v219 on the host:

$ sudo gdbus call --system --dest org.freedesktop.systemd1 \
    --object-path /org/freedesktop/systemd1 \
    --method org.freedesktop.systemd1.Manager.LinkUnitFiles \
    "['aa.service']" true false
Error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid argument

$ sudo gdbus call --system --dest org.freedesktop.systemd1 \
    --object-path /org/freedesktop/systemd1 \
    --method org.freedesktop.systemd1.Manager.LinkUnitFiles \
    "['/tmp/aa.service']" true false
Error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Unit name /tmp/aa.service is not valid.

@iaguis also tried with systemd v227 and he got different errors:

  • Error: GDBus.Error:org.freedesktop.DBus.Error.FileNotFound: No such file or directory
  • Error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid argument

So it seems systemd v219 does not support absolute paths here.

@iaguis
Copy link
Member

iaguis commented Nov 19, 2015

With a test service file in /tmp/a.service:

> sudo gdbus call --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1 --method org.freedesktop.systemd1.Manager.LinkUnitFiles "['/tmp/a.service']" true false
([('symlink', '/run/systemd/system/a.service', '/tmp/a.service')],)
> ls -l /run/systemd/system/a.service
lrwxrwxrwx 1 root root 14 Nov 19 12:13 /run/systemd/system/a.service -> /tmp/a.service

@alban
Copy link
Member Author

alban commented Nov 19, 2015

I suspect this was fixed in systemd v220 by the commit "rework unit name validation and manipulation logic".

alban added a commit to alban/rkt that referenced this issue Nov 19, 2015
alban added a commit to alban/rkt that referenced this issue Nov 23, 2015
alban added a commit to alban/rkt that referenced this issue Nov 23, 2015
alban added a commit to kinvolk/rkt that referenced this issue Nov 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants