Agent limited after CMR restart and agent re-connection

Description

Currently the re-connection of the agent works 100% correct only if the CMR was not restarted and disconnect happend due to the networks issues.

When CMR is restarted and agent re-connected we have following problems:

  • Agent is not marked as connected in the repository manager. For the CMR the status is NEVER CONNECTED as the restart is killing the correct state about the agent.

  • Agent can not perform any class analyzing by sending to the CMR, as the class cache does not exists on the CMR for the agent with the given ID (killed after restart).

  • Dynamic instrumentation does not work as class cache is missing.

This was reported as problem by Jäkel, Guido (DNB) and now by GitHub user yvbondarenko. Stack trace from the GitHub ticket:

Possible solutions/fixes:

  1. There is no reason to mark agent connected on the re-connection. That's easy.

  2. Wrt class cache, we have two options:

    1. If agent class cache does not exists, start a new one on the re-connect. Sure all the information about previously set classes will be lost.

    2. Better: periodically save class cache of the agents on the disk and load them on the start-up. This way we can continue where we left. This is only way to solve dynamic instrumentation problem as well.

Environment

None

Assignee

Tobias Angerstein

Reporter

Ivan Senic

Labels

None

Integrator

Ivan Senic

Components

Sprint

None

Fix versions

Affects versions

Priority

High
Configure