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

Test agent connect via ControllerAddress #741

Conversation

ArtiomDivak
Copy link
Contributor

@ArtiomDivak ArtiomDivak commented Feb 14, 2024

Added a test for agent to test if it connectes via ControllerAddress. This test will run an agent and change its configuration to use localhost instead of the real valid IP address in ControllerAddress and expect the agent to be failed because the controller is not listening on this IP.

Related: #668

@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch from 08e478a to 1e88c8f Compare February 14, 2024 07:29
@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch from 1e88c8f to dae2e84 Compare February 14, 2024 09:07
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

coveralls commented Feb 14, 2024

Coverage Status

coverage: 77.905% (+0.07%) from 77.831%
when pulling bebca9a on ArtiomDivak:bluechi-agent-connect-via-manager-address
into d64837b on eclipse-bluechi:main.

@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch 2 times, most recently from a8c9320 to 15a53f9 Compare February 14, 2024 13:24
Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

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

This test doesn't really test that an agent can connect via the ControllerAddress option as it is suggested in the summary of main.fmf. It tests that it fails, but doesn't verify the reason.
I'd suggest setting up a bluechi-agent and bluechi-controller on the same machine/container and try to make this work. The ControllerAddress was intended to work with systemd sockets, so unix sockets, for example. You can have a look at how it is used in the getting started guide:
https://bluechi.readthedocs.io/en/latest/getting_started/securing_multi_node/#haproxy-as-a-reverse-proxy

@engelmi engelmi closed this Feb 16, 2024
@engelmi engelmi reopened this Feb 16, 2024
@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch 3 times, most recently from 83af363 to 10533ad Compare February 20, 2024 13:26
@mwperina mwperina changed the title Test agent connect via ManagerAddress Test agent connect via ControllerAddress Feb 21, 2024
@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch 2 times, most recently from 697aec7 to 5544fa9 Compare February 21, 2024 09:40
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

Minor comments, but other than that LGTM

@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch 2 times, most recently from 7980550 to c4519b7 Compare February 21, 2024 11:20
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

LGTM

@ArtiomDivak ArtiomDivak requested a review from engelmi February 21, 2024 19:12
Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

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

LGTM

Small NIT. As soon as you update the branch we can merge @ArtiomDivak

@ArtiomDivak ArtiomDivak force-pushed the bluechi-agent-connect-via-manager-address branch from c4519b7 to 4f39e65 Compare February 28, 2024 07:16
@mwperina mwperina force-pushed the bluechi-agent-connect-via-manager-address branch from 4f39e65 to 205dcd7 Compare February 28, 2024 07:35
Added a test for agent to test if it connectes via ControllerAddress.
This test will run an agent and controller. The agent configuration will
be change to invalid ControllerAdress and then to valid one. The valid
configuration will get an IP the the controller is listenning to and the
invalid one will get an unlistened IP.

Related: eclipse-bluechi#668
Signed-off-by: Artiom Divak <adivak@redhat.com>
@mwperina mwperina force-pushed the bluechi-agent-connect-via-manager-address branch from 205dcd7 to bebca9a Compare February 28, 2024 08:01
@mwperina mwperina merged commit 7789995 into eclipse-bluechi:main Feb 28, 2024
20 checks passed
@engelmi engelmi mentioned this pull request Mar 6, 2024
10 tasks
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.

4 participants