Bug 1038328 - Printing/cups: Upgrading CUPS: 'Unit name cups-lpd@.service is missing the instance name'
Summary: Printing/cups: Upgrading CUPS: 'Unit name cups-lpd@.service is missing the in...
Status: RESOLVED DUPLICATE of bug 1050845
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: 3rd party software (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Johannes Meixner
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-09 18:27 UTC by Sebastian Wagner
Modified: 2019-11-27 12:01 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Wagner 2017-05-09 18:27:39 UTC
When Upgrading TW to 20170505 I got this output:

( 81/147) Installing: cups-2.1.3-5.1.x86_64 ............................................................................................................[done]
Additional rpm output:
Failed to try-restart cups-lpd@.service: Unit name cups-lpd@.service is missing the instance name.
See system logs and 'systemctl status cups-lpd@.service' for details.

> systemctl list-units | grep cups
  cups.path
  cups.service
  cups.socket
> systemctl list-unit-files | grep cups
cups.path                                                              enabled  
cups-browsed.service                                                   disabled 
cups-lpd@.service                                                      static   
cups.service                                                           enabled  
cups-lpd.socket                                                        disabled 
cups.socket                                                            enabled
Comment 1 Dr. Werner Fink 2017-05-10 06:03:53 UTC
Service units like cups-lpd@.service can become restart nor started nor enabled, as those are *templates* only. From manual page systemd.unit(5)                                  

       Optionally, units may be instantiated from a template file at
       runtime. This allows creation of multiple units from a single
       configuration file. If systemd looks for a unit configuration
       file, it will first search for the literal unit name in the
       file system. If that yields no success and the unit name
       contains an "@" character, systemd will look for a unit
       template that shares the same name but with the instance
       string (i.e. the part between the "@" character and the
       suffix) removed. Example: if a service getty@tty3.service is
       requested and no file by that name is found, systemd will
       look for getty@.service and instantiate a service from that
       configuration file if it is found.

       To refer to the instance string from within the configuration
       file you may use the special "%i" specifier in many of the
       configuration options. See below for details.
Comment 2 Dr. Werner Fink 2017-05-10 06:20:16 UTC
IMHO the template cups-lpd@.service should not be in the line of the %service_*.* macros ... or we skip templates at all within the %service_*.* macros if there is no DefaultInstance given.
Comment 3 Dr. Werner Fink 2019-11-27 12:01:43 UTC
This seems to be fixed for boo#1050845

 Fri Sep 14 05:30:55 UTC 2018 - antoine.belvire@opensuse.org
 - Fix warning message upon update (boo#1050845): Remove template
   service cups-lpd@ from service_* macro in scriptlets.

... hopefully no one will tries to enable template, as for e.g. for socket activation the socket units have to be enabled!

*** This bug has been marked as a duplicate of bug 1050845 ***