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

CA-315107 Create xapi-init-complete systemd target #3851

Merged
merged 1 commit into from Apr 24, 2019

Conversation

TimSmithCtx
Copy link
Contributor

Create a xapi-init-complete.target and a xapi-wait-init-complete.service
which is wanted by it. The service invokes the existing
xapi-wait-init-complete so that it is only done in one place now.

The SPEC file will need altering to enable the xapi-wait-init-complete
service on installation.

xapi-domains.service (and any other service which needs to start after
Xapi has completed initialisation) can now declare

Wants=xapi-init-complete.target
After=xapi-init-complete.target

to ensure that Xapi will be done initialising before they are started.

@@ -1,7 +1,8 @@
[Unit]
Description=Start/stop domains on dom0 start/shutdown
Requires=proc-xen.mount
After=remote-fs.target xapi.service
Wants=xapi-init-complete.target
After=remote-fs.target xapi-init-complete.target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this still do the right thing on shutdown, i.e. stop xapi-domains before xapi?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't change the shutdown behaviour. Since xapi-domains is started after xapi, it will be shut down before.

@coveralls
Copy link

coveralls commented Apr 24, 2019

Coverage Status

Coverage remained the same at 21.472% when pulling 832659b on TimSmithCtx:private/timsmi/CA-315107 into 7e78a46 on xapi-project:master.

Create a xapi-init-complete.target and a xapi-wait-init-complete.service
which is wanted by it. The service invokes the existing
xapi-wait-init-complete so that it is only done in one place now.

The SPEC file will need altering to enable the xapi-wait-init-complete
service on installation.

xapi-domains.service (and any other service which needs to start after
Xapi has completed initialisation) can now declare

Wants=xapi-init-complete.target
After=xapi-init-complete.target

to ensure that Xapi will be done initialising before they are started.

Signed-off-by: Tim Smith <tim.smith@citrix.com>
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and I like shifting startup dependencies to systemd.

@lindig lindig merged commit 49d0fbc into xapi-project:master Apr 24, 2019
@TimSmithCtx TimSmithCtx deleted the private/timsmi/CA-315107 branch April 24, 2019 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants