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

kvp daemon first #505

Merged
merged 3 commits into from
Aug 31, 2020
Merged

kvp daemon first #505

merged 3 commits into from
Aug 31, 2020

Conversation

rjschwei
Copy link
Contributor

Ensure the kvp data is populated in Azure, run after the hv_kvp_daemon.

@Moustafa-Moustafa
Copy link
Contributor

We first need to make sure that hv_kvp_daemon.service doesn't have the Requires and After directives on network-online.target. otherwise we will risk having circular dependencies.
cloud-init.service After cloud-init-local.service After hv_kvp_daemon.service After network-online.target After cloud-init.service

The hv_kvp_daemon.service in the current latest sles-15-sp1 image (SUSE:sles-15-sp1:gen1:2020.06.10) has both the Requires and After directives on network-online.target.

@rjschwei
Copy link
Contributor Author

We first need to make sure that hv_kvp_daemon.service doesn't have the Requires and After directives on network-online.target. otherwise we will risk having circular dependencies.
cloud-init.service After cloud-init-local.service After hv_kvp_daemon.service After network-online.target After cloud-init.service

The hv_kvp_daemon.service in the current latest sles-15-sp1 image (SUSE:sles-15-sp1:gen1:2020.06.10) has both the Requires and After directives on network-online.target.

That's a packaging and release timing exercise. How distributions implement the kvp daemon should not gate upstream changes.

@trstringer
Copy link
Contributor

Another consideration for packaging for the KVP daemon is the handling of the vmbus device (having a udev rules to tag it for systemd management) as well as having the KVP daemon with a dependency on that device.

@trstringer
Copy link
Contributor

Another thing worth considering is that not all KVP services are named the same. This name in the PR hv-kvp-daemon.service is the same for Ubuntu as well, but Debian has the service named hyperv-daemons.hv-kvp-daemon.service.

Perhaps the right answer is to work with the distro package maintainers for the hyperv daemons package to add an Alias=hv-kvp-daemon.service directive to Install.

@OddBloke OddBloke self-assigned this Aug 7, 2020
@OddBloke
Copy link
Collaborator

OddBloke commented Aug 7, 2020

Another thing worth considering is that not all KVP services are named the same. This name in the PR hv-kvp-daemon.service is the same for Ubuntu as well, but Debian has the service named hyperv-daemons.hv-kvp-daemon.service.

After= only affects the ordering of services that are being started at the same time; it does not cause systemd to start a listed service if it would not otherwise be started (that's what Wants=/Requires= are for). It follows that we can list all namings of this service here without problem; the directive is only relevant if something else is pulling in the named service, and nothing should pull those named services in on systems where they don't exist.

You can, in fact, see that we already do this for networking:

Before=NetworkManager.service
Before=network-pre.target

and this is fine on an Ubuntu server system:

$ grep NetworkManager.service /lib/systemd/system/cloud-init-local.service 
Before=NetworkManager.service
$ systemctl status NetworkManager.service
Unit NetworkManager.service could not be found.

Perhaps the right answer is to work with the distro package maintainers for the hyperv daemons package to add an Alias=hv-kvp-daemon.service directive to Install.

We don't need to do this to be able to add After= for the existing names of services, and we probably want to list out those names anyway, because there will be circumstances where systems don't have the new daemon package with its alias but do have a new cloud-init. (That said, the alias sounds like it could be helpful for users, so I think it's worth pursuing in parallel, but it is perhaps orthogonal to this PR.)

@github-actions
Copy link

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon.

(If the pull request is closed, please do feel free to reopen it if you wish to continue working on it.)

@github-actions github-actions bot added the stale-pr Pull request is stale; will be auto-closed soon label Aug 22, 2020
@rjschwei
Copy link
Contributor Author

@OddBloke Anything for me to do or can this be merged?

@mitechie
Copy link
Contributor

@rjschwei he went on holiday and we've been working to get to the new release so reviewers are scarce atm. I'll try to get it looked at here soon.

@mitechie mitechie removed the stale-pr Pull request is stale; will be auto-closed soon label Aug 24, 2020
Copy link
Collaborator

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

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

This LGTM, thanks!

@OddBloke OddBloke merged commit a802a12 into canonical:master Aug 31, 2020
@rjschwei rjschwei deleted the afterKvpD branch July 19, 2021 11:29
This was referenced May 11, 2023
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

5 participants