Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pki-tomcatd@pki-tomcat.service does not start when pki-tomcatd.target is started #1285

Closed
pki-bot opened this issue Oct 2, 2020 · 8 comments
Milestone

Comments

@pki-bot
Copy link

pki-bot commented Oct 2, 2020

This issue was migrated from Pagure Issue #716. Originally filed by pviktori (@encukou) on 2013-08-28 14:10:32:


/lib/systemd/system/pki-tomcatd.target currently contains:

After=pki-tomcatd.target
BindTo=pki-tomcatd.target

Instead of BindTo there should be PartOf, so that starting and stopping the target is propagated to the service.

Also, instead of logging

An exit status of '143' refers to the 'systemd' method of using 'SIGTERM' to shutdown a Java process and can safely be ignored.

the SuccessExitStatus=143 service directive can be used.

@pki-bot pki-bot added this to the 10.0.5 milestone Oct 2, 2020
@pki-bot pki-bot closed this as completed Oct 2, 2020
@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from pviktori (@encukou) at 2013-08-28 14:13:14

This bug prevents FreeIPA installation in some cases.

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from pviktori (@encukou) at 2013-08-28 14:29:30

Sorry, I've made a typo: the file is /lib/systemd/system/pki-tomcatd@.service, not the target

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from nkinder (@nkinder) at 2013-08-28 18:36:04

Replying to [ticket:716 encukou]:

/lib/systemd/system/pki-tomcatd.target currently contains:

After=pki-tomcatd.target
BindTo=pki-tomcatd.target

Instead of BindTo there should be PartOf, so that starting and stopping the target is propagated to the service.

Should we be using 'PartOf' in addition to 'BindsTo'? The systemd.unit manpage describes these directives as having slightly different purposes:

   BindsTo=
       Configures requirement dependencies, very similar in style to Requires=, however
       in addition to this behavior it also declares that this unit is stopped when any
       of the units listed suddenly disappears. Units can suddenly, unexpectedly
       disappear if a service terminates on its own choice, a device is unplugged or a
       mount point unmounted without involvement of systemd.

   PartOf=
       Configures dependencies similar to Requires=, but limited to stopping and
       restarting of units. When systemd stops or restarts the units listed here, the
       action is propagated to this unit. Note that this is a one way dependency -
       changes to this unit do not affect the listed units.

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from pviktori (@encukou) at 2013-08-28 19:50:32

If that's the case, there's a typo: it's BindsTo, not BindTo.

I've contacted Lukáš from systemd to answer.

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from nkinder (@nkinder) at 2013-08-28 19:57:15

Replying to [comment:4 encukou]:

If that's the case, there's a typo: it's BindsTo, not BindTo.

The directive name was changed from 'BindTo' to 'BindsTo' at some point, but the old name is still supported for backwards compatibility. If we still need to use it at all, we should update to use the new recommended name of 'BindsTo'.

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from lnykryn (@lnykryn) at 2013-08-29 09:17:50

I am not sure that this is your exact use-case, but if you use pki-tomcatd.target to control (start, stop, restart,...) all instances of pki-tomcatd@.service, the recommended way is to have WantedBy=pki-tomcatd.target and PartOf=pki-tomcatd.target in pki-tomcatd@.service. In that case another dependency (BindsTo) should not be there.

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from vakwetu (@vakwetu) at 2013-09-03 04:22:18

Fixed:

To ssh://vakwetu@git.fedorahosted.org/git/pki.git
265f790..f27f8a5 DOGTAG_10_0_BRANCH -> DOGTAG_10_0_BRANCH

To ssh://vakwetu@git.fedorahosted.org/git/pki.git
05ff18e..27ed263 master -> master

@pki-bot
Copy link
Author

pki-bot commented Oct 2, 2020

Comment from pviktori (@encukou) at 2017-02-27 14:00:43

Metadata Update from @encukou:

  • Issue assigned to vakwetu
  • Issue set to the milestone: 10.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant