systemctl status globbing does not work with .service suffix on version 222

Bug #1474426 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I am writing a test that executes systemctl status docker_docker-daemon_*.service to get if the docker service is running.

This works in systemd 219, the version we have in vivid:

(amd64)ubuntu@test:~$ systemd --version
systemd 219
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN
(amd64)ubuntu@test:~$ systemctl status docker_docker-daemon_*.service
● docker_docker-daemon_1.6.1.002.service - The docker app deployment mechanism
   Loaded: loaded (/etc/systemd/system/docker_docker-daemon_1.6.1.002.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2015-07-14 14:41:10 UTC; 15min ago
 Main PID: 11860 (docker.start)
   CGroup: /system.slice/docker_docker-daemon_1.6.1.002.service
           ├─11860 /bin/bash /apps/docker/1.6.1.002/bin/docker.start
           ├─11868 docker.x86_64 -d -G docker -g /var/lib/apps/docker/1.6.1.0...
           └─12664 sleep 2

On version 222, the version we have in wily it doesn't work:

(amd64)ubuntu@localhost:~$ systemctl status docker_docker-daemon_*.service

(nothing is returned)
Changing the * by the version, it works:

(amd64)ubuntu@localhost:~$ systemctl status docker_docker-daemon_1.6.1.002.service
● docker_docker-daemon_1.6.1.002.service - The docker app deployment mechanism
   Loaded: loaded (/etc/systemd/system/docker_docker-daemon_1.6.1.002.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2015-07-14 14:45:31 UTC; 12min ago
 Main PID: 789 (docker.start)
   CGroup: /system.slice/docker_docker-daemon_1.6.1.002.service
           ├─ 789 /bin/bash /apps/docker/1.6.1.002/bin/docker.start
           ├─ 800 docker.x86_64 -d -G docker -g /var/lib/apps/docker/1.6.1.00...
           └─1372 sleep 2

Revision history for this message
Leo Arias (elopio) wrote :

To test it easily in every machine, try: systemctl status *.mount

Revision history for this message
Martin Pitt (pitti) wrote :

With current wily (225) this seems to work fine for services: sudo systemctl status 'a*' shows me apparmor, apport, and atd. This also works for templates, e. g. systemctl status '*rfkill@*'.

What indeed does not work is globbing with unit suffixes, like systemctl status 'a*.service'. I suggest for now to just drop the .service suffix in your test to unblock this.

Changed in systemd (Ubuntu):
status: New → Triaged
summary: - systemctl status globbing does not work on version 222
+ systemctl status globbing does not work with .service suffix on version
+ 222
Revision history for this message
Leo Arias (elopio) wrote :

This is not blocking us. We worked it around by using the full service name.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Triaged → Invalid
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.