-
Notifications
You must be signed in to change notification settings - Fork 665
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
Watch agent metadata service #5017
Conversation
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5017 +/- ##
==========================================
- Coverage 60.99% 60.98% -0.02%
==========================================
Files 793 793
Lines 51295 51313 +18
==========================================
+ Hits 31289 31294 +5
- Misses 17125 17134 +9
- Partials 2881 2885 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this in this scenario.
It shows me that it works well.
- start the propeller (Agent server is closed)
- trigger a sensor task to print my current
agentRegistry
- start an agent server
- trigger a sensor task to print my current
agentRegistry
Print agentRegistry before the agent server started
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done some tests on it.
I think even we can use the watcher to update support_task_type
, it can't help use to update propeller's metadata.
Try this case.
agent-service:
# supportedTaskTypes:
# - sensor
defaultAgent:
endpoint: "dns:///localhost:8000"
insecure: true
timeouts:
CreateTask: 100s
GetTask: 100s
defaultTimeout: 100s
Even you start the agent server, it will still fail to execute agent task.
So here's a follow up question, is it possible to update the supportedTaskType
for propeller?
I've traced the code and found that it has conflict with current propeller's load plugin mechanism.
cc @honnix , this is the current watcher implementation.
Does it look well to you? |
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@Future-Outlier Thank you for summarizing. This approach looks good to me. However I noticed a breaking change (not introduced by this PR). For create operation, it used to be synchronous when resources is returned directly; but now all configured (in config file) agents is by default async, and that seems to break the contract because we can no longer have sync creation unless implementing the metadata endpoint. Is this correct understanding? |
Signed-off-by: Kevin Su <[email protected]>
@honnix |
@Future-Outlier Thank you for the confirmation. No it is not a problem for us, and I think in general it looks like a good change (being explicit is good). As long as it is noted in the release notes, I think it should be fine. |
@honnix , thank you, we will try to add more information in the release notes. If there's anything we can help, please leave comments, thank you! |
@Future-Outlier Thank you for the heads-up. If I understood correctly, this only matters if we deploy the agent service as a pod. |
Yes, you are right! |
I'm going to update this PR, so we're also able to reload support task type at runtime. |
Any plan to get this going? Thanks. |
Hi, sorry for the late reply, I will discuss this with Kevin and update our discussion this week, thank you for your patience! |
Hi, @honnix Kevin is busy with other issues now. |
Hi @Future-Outlier . Thank you for the update. This is not urgent so please take your time. |
Doing it, will make some variables from private to public so that we can dynamically update support task types, |
To give a real world incident: we just had a flytepropeller startup trouble due to one agent service being unavailable. This feature will be highly appreciated. |
No problem, fighting on it with Kevin. |
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is not easy, thank you for the effort!
Signed-off-by: Kevin Su <[email protected]> Signed-off-by: Kevin Su <[email protected]>
Tracking issue
#3936
Why are the changes needed?
Monitor the agent metadata service to sync the metadata (support_task_type, task_type_version, is_sync, etc.) so the Agent doesn't need to be started before Propeller.
What changes were proposed in this pull request?
Add a watcher to the agent plugin to periodically sync the metadata.
How was this patch tested?
Setup process
Screenshots
The agent is not stated. propeller sends the request to the default agent localhost:8005
Start running agent. propeller sends the request to the default
myAgent
localhost:8000Check all the applicable boxes
Related PRs
NA
Docs link
NA