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

Set instance_uid by Server on conflict or request for generation #63

Merged
merged 4 commits into from
Mar 22, 2022

Conversation

pmm-sumo
Copy link
Contributor

This is a first approach towards #56

It assumes that Agent's instance_uid can always be updated by Server (since resolving potential issues with conflicts is important).

There's a gap with multiplexed websocket connections which perhaps could be handled by adding Agent capability flag indicating if overrides can be accepted or not

@tigrannajaryan
Copy link
Member

There's a gap with multiplexed websocket connections

Yeah, this is unfortunate. To avoid this problem perhaps we can do slightly differently. Instead of using empty instance_uid field in AgentToServer message as an indication of a request to assign a new instance_uid we can have an explicit flag in AgentToServer to indicate it. In that case the instance_uid field in AgentToServer message may still be set to some temporary value by the Agent until it gets the new instance_uid value from the Server.

Another approach is for the terminating proxy to NOT multiplex connections with empty incoming instance_uid field with other connections. So the initial assignment of instance_uid will require a dedicated outgoing connection from the proxy to the Server. After the assignment of the instance_uid the dedicated connection can be dropped and the multiplexing can start.

which perhaps could be handled by adding Agent capability flag indicating if overrides can be accepted or not

I am not sure how this will solve the problem. Can you expand?

specification.md Outdated Show resolved Hide resolved
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
@pmm-sumo
Copy link
Contributor Author

pmm-sumo commented Mar 8, 2022

There's a gap with multiplexed websocket connections

Yeah, this is unfortunate. To avoid this problem perhaps we can do slightly differently. Instead of using empty instance_uid field in AgentToServer message as an indication of a request to assign a new instance_uid we can have an explicit flag in AgentToServer to indicate it. In that case the instance_uid field in AgentToServer message may still be set to some temporary value by the Agent until it gets the new instance_uid value from the Server.

I thought about it and I am leaning towards that approach. Will update the PR

which perhaps could be handled by adding Agent capability flag indicating if overrides can be accepted or not

I am not sure how this will solve the problem. Can you expand?

This would merely inform that it is not possible to override the agent instance_id. I think the idea proposed above (temporary id's and explicit flag) is a better one

@pmm-sumo pmm-sumo marked this pull request as ready for review March 9, 2022 00:38
@pmm-sumo pmm-sumo requested a review from a team March 9, 2022 00:38
specification.md Outdated Show resolved Hide resolved
@@ -357,6 +383,17 @@ enum ServerCapabilities {
}
```

#### agent_identification
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that "new_instance_uid" would be too specific field and wanted something with a bit broader scope so I thought about "AgentIdentification", though also wondering about "AgentIdentifcationOverride", "AgentIdentificationOffer" or so. If you had anything else in mind @tigrannajaryan I will gladly accept it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything else that we may want to add to AgentIdentification message in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything else that we may want to add to AgentIdentification message in the future?

I don't have anything on my mind right now though I'm actually wondering if instead creating AgentIdentification, a model used in AgentDescription could be followed (so repeated KeyValue). I don't really have a strong use case but wondering if this would give an opportunity for the server to send some attributes back (both identifying and non-identifying) that would be persisted by the agent. Not sure if it makes much sense though (since server could always attach them later itself if needed)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add keyvalue list as an additional field later if needed. I think what we have for now is fine.

@tigrannajaryan tigrannajaryan merged commit b0f7c5a into open-telemetry:main Mar 22, 2022
@tigrannajaryan
Copy link
Member

@pmm-sumo will you be able to submit a corresponding change in opamp-go client and server implementations?

@pmm-sumo
Copy link
Contributor Author

@pmm-sumo will you be able to submit a corresponding change in opamp-go client and server implementations?

@tigrannajaryan sure thing, will have it later today

dsvanlani added a commit to observIQ/opamp-spec that referenced this pull request Mar 22, 2022
* Add support for detached signatures (open-telemetry#69)

Resolves open-telemetry#65

- Added signature field to DownloadableFile message.
- Added a short explanation about how the signature field can be used
  for detached signatures.

* Set instance_uid by Server on conflict or request for generation (open-telemetry#63)

This is a first approach towards open-telemetry#56 

It assumes that Agent's `instance_uid` can always be updated by Server (since resolving potential issues with conflicts is important).

There's a gap with multiplexed websocket connections which perhaps could be handled by adding Agent capability flag indicating if overrides can be accepted or not

Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Przemek Maciolek <58699843+pmm-sumo@users.noreply.github.com>
pmm-sumo added a commit to pmm-sumo/opamp-go that referenced this pull request Mar 22, 2022
pmm-sumo added a commit to pmm-sumo/opamp-go that referenced this pull request Mar 29, 2022
tigrannajaryan pushed a commit to open-telemetry/opamp-go that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants