Open amanbha opened 4 years ago
There is a discussion here on the overlap between dynamic updating of components/config by dapr and when the K8s operator manages the rollout of a new application. We need to get options from both sides for this proposal.
Adding notes from maintainers meeting: Pros and cons of dynamic updating the components::
Suggested approaches:
Given the above what it we:
This will allow 3 cases:
We could brand this as a new feature that users opt into if they want to.
It seems the code for the hot reload is already in place. According to the operator logs, sidecars are successfully establishing connections to it and component changes are being successfully detected. However, for some reason sidecars are not getting notified about the modified component.
@RadoslavGatev The operator side is mostly in place, however the sidecar part is currently (intentionally) ignoring updates.
We (maintainers) have spoken about this issue today and I just triaged this into the 0.12.0 milestone.
just came across the same issue. This really need to be solved. How else do you propose people can be sure config changes are applied?
Any fix planned for this issue in the coming releases ?
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
Any plans to fix this issue.
How do you enable the hot reload mentioned here ?
@engeluke I don't think there is a hot reload yet, this appears to be an open proposal.
In Kubernetes, would like the operator to do a rollout on the Deployment so that if the new component configuration breaks things, the rollout doesn't proceed.
Of course, the rolled back pods would now have the new broken configuration and also be down, but this is the same outcome as when pods are restarted (K8s node down, or rescheduled) or the Deployment is scaled up so I think that concern can be somewhat handled independently.
In Kubernetes, would like the operator to do a rollout on the Deployment so that if the new component configuration breaks things, the rollout doesn't proceed.
Of course, the rolled back pods would now have the new broken configuration and also be down, but this is the same outcome as when pods are restarted (K8s node down, or rescheduled) or the Deployment is scaled up so I think that concern can be somewhat handled independently.
We're looking into doing the hot reloading in such a way that the pods do not need rolling out.
We're looking into doing the hot reloading in such a way that the pods do not need rolling out.
Nice. Will that include rolling back to previous values if it fails (might be unsafe), or at least stopping the reload?
We're looking into doing the hot reloading in such a way that the pods do not need rolling out.
Nice. Will that include rolling back to previous values if it fails (might be unsafe), or at least stopping the reload?
The implementation should include replacing an existing component only if the new one inits successfully, yes.
To move the hot reloading behavior out of feature preview- we need to have conformance/e2e tests to ensure that all components release all their resources after calling Close()
.
@JoshVanL Is there a document that describes the changes required from the perspective of the components? Is there new API (e.g. Close()
mentioned above)? I'm curious as to whether there needs be any corresponding changes to the Pluggable Components APIs to allow for reloading.
@philliphoff components have always (at least as long as I've worked on the project!) optionally supported a Close()
method which runtime calls if it is available. Components which spin up long running processes should implement a Close() error
method to ensure that all resources are released and all go routines have exited before Close
returns.
@JoshVanL Thanks. It doesn't appear that such "close" calls are currently (directly) propagated to pluggable components. It may make sense for the runtime to do that (both in general, as well as to allow for "hot reload" capabilities). While I don't think it's a blocker for "hot reload" itself, it could do with some more investigation on the SDK side to determine what that might look like (and I've created an issue for that on the SDK side).
@JoshVanL @yaron2 @artursouza Moving this issue to 1.14 for tracking actor state after adding all related closed PRs to 1.13 for tracking.
Currently in k8s, Dapr needs a pod restart to pick new configuration after they have been applied. This will cause inconsistency in scenarios in which few pods of an app are restarted by platform. Restarted pods will use new config whereas pods which are not restarted will continue to use old config.
Tasks: