Bug 1093163 - mdadm: using service templates in preun is wrong:
mdadm: using service templates in preun is wrong:
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Neil Brown
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-14 15:35 UTC by Ruediger Oertel
Modified: 2020-03-27 04:30 UTC (History)
0 users

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 Ruediger Oertel 2018-05-14 15:35:37 UTC
in mdadm.spec:
%preun
%service_del_preun %services mdmon@.service mdadm-last-resort@.service mdadm-grow-continue@.service


leads to:
# rpm -e mdadm --nodeps
Failed to stop mdmon@.service: Unit name mdmon@.service is missing the instance name.
See system logs and 'systemctl status mdmon@.service' for details.
Failed to stop mdadm-last-resort@.service: Unit name mdadm-last-resort@.service is missing the instance name.
See system logs and 'systemctl status mdadm-last-resort@.service' for details.
Failed to stop mdadm-grow-continue@.service: Unit name mdadm-grow-continue@.service is missing the instance name.
See system logs and 'systemctl status mdadm-grow-continue@.service' for details.
Failed to get load state of mdmon@.service: Unit name mdmon@.service is neither a valid invocation ID nor unit name.
Failed to get load state of mdadm-last-resort@.service: Unit name mdadm-last-resort@.service is neither a valid invocation ID nor unit name.
Failed to get load state of mdadm-grow-continue@.service: Unit name mdadm-grow-continue@.service is neither a valid invocation ID nor unit name.


a service template file (foo@.service) can not be used with the %service_add/del macros.
Comment 1 Neil Brown 2018-05-21 06:17:40 UTC
This was fixed...
https://build.opensuse.org/request/show/397531

That landed in revision r143 of Base:System/mdadm, but I cannot do an rdiff for any version before 147, so I cannot see exactly when the change was reverted.
The log shows:

Maybe I messed things up with
----------------------------------------------------------------------------
r147 | neilbrown | 2017-03-27 03:26:19 | c64fa28886a20a48ef966bd7c12ba12a | unknown | 

- New upstream release 4.0


Maybe it was

r146 | buildservice-autocommit | 2016-07-24 17:42:39 | 3d165db25f59e3b5fd135e1c7178384a | unknown | rq408603

baserev update by copy to link target

(what ever that is).
I wonder what else is lost.

I wonder if there is some way to get release 143....
Comment 2 Neil Brown 2020-03-27 03:55:55 UTC
It seems I misunderstood.
The previous change I listed removed the @.service lines from all but %service_del_preun.  Now you are saying I should remove those too.  I see now that is correct.
I've done that.
Thanks.
Comment 3 Swamp Workflow Management 2020-03-27 04:30:06 UTC
This is an autogenerated message for OBS integration:
This bug (1093163) was mentioned in
https://build.opensuse.org/request/show/788735 Factory / mdadm