Skip to content

Conversation

@vyasgun
Copy link
Member

@vyasgun vyasgun commented Oct 29, 2025

Introduces a channel-based notification sender that sends JSON messages over Unix sockets for VM lifecycle events:

  • Ready: gvproxy is ready to accept connections
  • ConnectionEstablished: VM has connected and sent its first packet (MAC address learned -- helps distinguish between different VMs)
  • ConnectionClosed: VM has disconnected

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vyasgun
Once this PR has been reviewed and has the lgtm label, please assign cfergeau for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vyasgun vyasgun force-pushed the pr/network-ready-notifications branch 2 times, most recently from 81d46df to 40ef47c Compare October 30, 2025 08:15
Introduces a channel-based notification sender that sends JSON messages
over Unix domain sockets for key events:
- Ready: network stack is ready for connections
- ConnectionEstablished: VM connection accepted
- HypervisorError: error during VM connection setup

Signed-off-by: Gunjan Vyas <[email protected]>
@vyasgun vyasgun force-pushed the pr/network-ready-notifications branch from 40ef47c to 6e003ff Compare October 30, 2025 08:19
}
log.Info("waiting for clients...")

notificationSender := notification.NewNotificationSender(config.NotificationSocket)
Copy link
Member Author

Choose a reason for hiding this comment

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

Initializing notificationSender here because NewNotificationSender always returns a valid object (a no-op sender when socket is empty), removing the need for nil checks at every Send() call.

@vyasgun vyasgun force-pushed the pr/network-ready-notifications branch 3 times, most recently from 7d21c39 to 1bb5281 Compare November 7, 2025 08:43
Send connection_established and connection_closed directly from the switch when MAC is learned or connection with the VM closes.

Assisted-by: Claude (Anthropic AI)
Signed-off-by: Gunjan Vyas <[email protected]>
@vyasgun vyasgun force-pushed the pr/network-ready-notifications branch from 1bb5281 to 93258e9 Compare November 7, 2025 08:55
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.

1 participant