asset/ignition: add event on bootstrap completion#459
Merged
openshift-merge-robot merged 3 commits intoopenshift:masterfrom Oct 15, 2018
crawford:progress
Merged
asset/ignition: add event on bootstrap completion#459openshift-merge-robot merged 3 commits intoopenshift:masterfrom crawford:progress
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
crawford:progress
Conversation
Contributor
Author
|
From my tests: $ kubectl --kubeconfig=crawford-libvirt/auth/kubeconfig -n kube-system get events bootstrap-complete
LAST SEEN FIRST SEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
7m 7m 1 bootstrap-complete bootstrap, crawford-libvirt-bootstrap cluster bootstrapping has completedThis was way more difficult than it should have been. |
wking
reviewed
Oct 12, 2018
wking
reviewed
Oct 12, 2018
wking
reviewed
Oct 12, 2018
Contributor
|
/approve |
wking
reviewed
Oct 15, 2018
The content package only contains bootstrap assets. It's more clear that that is the case if that package is under the bootstrap package, rather than being adjacent to it.
Adding a line break before and after the closing and opening grave ticks makes this a little more readable and is the style that the rest of the codebase uses. This does result in an empty line at the top and bottom of the file, which is why this style cannot be applied to the shell scripts.
wking
reviewed
Oct 15, 2018
In order to allow the installer to eventually track the installation progress, this adds a reporting service which inserts an event when the bootstrap process has completed. This event can be used to determine when it is safe to remove the bootstrap node, since it signifies that the bootstrap control plane has pivoted to the scheduled control plane and that all of the OpenShift manifests have been inserted. This no longer enables `tectonic.service` because `progress.service` is enabled and lists both `tectonic.service` and `bootkube.service` as dependencies. systemd will start all three services as a result. In an ideal world, this would make use of sd-notify to signal the completion of prerequisites but this doesn't work for two reasons. First, runc doesn't support passing the extra file descriptor used by sd-notify [1]. Second, systemd doesn't support retrying activations when a dependency has failed [2]. This change makes use of "breadcrumb" files to signal completion as a workaround. In the creation of the event, `date` is invoked and passed a custom format. This was necessary because Golang requires the `T` separator in the time package [3] but GNU's `date` uses a space separator. ISO8601 was also tried, but Golang doesn't seem to parse that correctly either (`date` uses "+0000" to specify timezone but Golang expects "+00:00"). [1]: opencontainers/runc#1807 [2]: systemd/systemd#1312 [3]: golang/go#25937
Contributor
|
/retest |
Member
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, crawford, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to allow the installer to eventually track the installation
progress, this adds a reporting service which inserts an event when the
bootstrap process has completed. This event can be used to determine
when it is safe to remove the bootstrap node, since it signifies that
the bootstrap control plane has pivoted to the scheduled control plane
and that all of the OpenShift manifests have been inserted.
This no longer enables
tectonic.servicebecauseprogress.serviceisenabled and lists both
tectonic.serviceandbootkube.serviceasdependencies. systemd will start all three services as a result.
In an ideal world, this would make use of sd-notify to signal the
completion of prerequisites but this doesn't work for two reasons.
First, runc doesn't support passing the extra file descriptor used by
sd-notify 1. Second, systemd doesn't support retrying activations when
a dependency has failed 2. This change makes use of "breadcrumb" files
to signal completion as a workaround.
In the creation of the event,
dateis invoked and passed a customformat. This was necessary because Golang requires the
Tseparator inthe time package 3 but GNU's
dateuses a space separator. ISO8601was also tried, but Golang doesn't seem to parse that correctly either
(
dateuses "+0000" to specify timezone but Golang expects "+00:00").