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

Add option to wait until config is fully configured #1732

Closed
ondrej-fabry opened this issue Sep 30, 2020 · 0 comments · Fixed by #1734
Closed

Add option to wait until config is fully configured #1732

ondrej-fabry opened this issue Sep 30, 2020 · 0 comments · Fixed by #1734
Assignees

Comments

@ondrej-fabry
Copy link
Member

ondrej-fabry commented Sep 30, 2020

Problem

The Update method of ConfiguratorService currently returns right after the given config is committed.. This can in some cases return before the input config might not be fully configured yet causing race conditions for the gRPC clients that expect config to be fully configured after the Update method returns.

The current behavior is often confusing to users, because there is not anything that would clearly indicate that some part of config is not configured completely. Also there is currently no way to change this behavior in the agent or for the request.

Details

This happens in cases where transaction succeeds, but some part config values will have PENDING state. For example this can occur for VPP AF_PACKET interfaces which depend on event from dataplane (southband notification) for the Linux VETH interface they attach to.

Here is log for such case: https://gist.githubusercontent.com/edwarnicke/b864d45d1bd7e0ce216ab0d2f4505e2a/raw/074851781a0ae31b03bef8e3547f428d7e93a95c/gistfile1.txt

Solution

The solution for this problem should add a way to set the gRPC request (or perhaps even set this as default behavior by in some agent configuration) so it waits until all config values created by committing the transaction are in non-PENDING state or until request times out. For some configs, this can actually make the Update requests to "get stuck" forever if user inputs such configuration that is incomplete in way that requires another Update call instead of some dataplane event, but it will give user power to control this, so enough documentation for this option should suffice to avoid confusion.

Implementation

  • Add field bool wait_done to UpdateRequest to control this behavior from client side.
  • Check the field value in the ConfiguratorService and if set to true, after committing the transaction, watch statuses of all values from the transaction until all of them are in non-PENDING state.

CC @milanlenco @edwarnicke

@ondrej-fabry ondrej-fabry self-assigned this Sep 30, 2020
ondrej-fabry added a commit to ondrej-fabry/vpp-agent that referenced this issue Oct 2, 2020
This introduces new field WaitDone for UpdateRequest in Configurator service,
which when enabled will wait until config update is non-pending state.

Fixes ligato#1732

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
ondrej-fabry added a commit that referenced this issue Oct 2, 2020
This introduces new field WaitDone for UpdateRequest in Configurator service,
which when enabled will wait until config update is non-pending state.

Fixes #1732

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant