You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all agent coroutines are launched almost simultaneously during startup. This creates a high probability of executing queries to the server before having requested a token, leading to race conditions.
Additionally, an agent that has not been registered always attempts to authenticate during startup. This behavior is unnecessary and illogical, as the agent should not request a token if it has not been registered.
Expected Behavior
Agent Registration Validation:
At startup, the agent must validate whether it is registered.
If the agent is not registered, it should log an appropriate error message and immediately terminate execution.
Behavior on Authentication Errors:
If the authentication process fails because the agent is not registered, the agent must stop functioning and log the corresponding error.
Synchronization During Startup:
The agent must ensure that no queries are sent to the server until it has successfully obtained a valid token.
The text was updated successfully, but these errors were encountered:
The proposed solution is to validate whether the key, name and uuid are configured when starting the agent. Otherwise, the agent throws an exception and exits execution.
It remains to be implemented what happens when the authentication request returns error 400, i.e. the agent is not recognized by the server.
Parent Issue: #241
Description
Currently, all agent coroutines are launched almost simultaneously during startup. This creates a high probability of executing queries to the server before having requested a token, leading to race conditions.
Example logs:
Additionally, an agent that has not been registered always attempts to authenticate during startup. This behavior is unnecessary and illogical, as the agent should not request a token if it has not been registered.
Expected Behavior
The text was updated successfully, but these errors were encountered: