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

initial proxy service implementation #168

Merged
merged 7 commits into from
Mar 22, 2023
Merged

initial proxy service implementation #168

merged 7 commits into from
Mar 22, 2023

Conversation

engelmi
Copy link
Member

@engelmi engelmi commented Feb 27, 2023

This PR addresses #95 by

  • implementing the proxy binary called by the systemd unit to request a service on a remote node
  • adding a public API for the agent which the proxy binary calls
    • CreateProxy: Creates and tracks a proxy within the agent and emits the ProxyNewsignal on the internal bus
    • RemoveProxy: Currently a dummy
  • adding a ProxyMonitor which uses the existing Monitor implementation and calls the Ready method on the agents proxy object

src/agent/agent.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
Copy link
Contributor

@sdunnagan sdunnagan left a comment

Choose a reason for hiding this comment

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

Nice work! Splitting the proxy service support into multiple stages seems a good idea.

@engelmi engelmi requested a review from sdunnagan March 4, 2023 17:23
@engelmi engelmi marked this pull request as ready for review March 4, 2023 17:23
src/proxy/main.c Outdated Show resolved Hide resolved
src/agent/agent.c Outdated Show resolved Hide resolved
src/agent/agent.c Outdated Show resolved Hide resolved
src/agent/agent.c Outdated Show resolved Hide resolved
src/agent/agent.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
@alexlarsson
Copy link
Contributor

On re-connect you should also re-emit the "new proxy" events.

@alexlarsson
Copy link
Contributor

and on agent disconnect the manager should remove outstanding proxies.

src/proxy/main.c Outdated Show resolved Hide resolved
src/proxy/main.c Outdated Show resolved Hide resolved
src/proxy/main.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
src/manager/node.c Outdated Show resolved Hide resolved
doc/dbus-interfaces.md Outdated Show resolved Hide resolved
doc/man/hirte-proxy.1.md Outdated Show resolved Hide resolved
src/proxy/main.c Outdated Show resolved Hide resolved
src/proxy/main.c Outdated Show resolved Hide resolved
src/agent/proxy.c Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Outdated Show resolved Hide resolved
src/agent/proxy.c Show resolved Hide resolved
src/agent/agent.c Show resolved Hide resolved
src/agent/agent.c Show resolved Hide resolved
alexlarsson and others added 7 commits March 22, 2023 15:09
Signed-off-by: Alexander Larsson <alexl@redhat.com>
We initialize the unit state for new unit infos to inactive(dead) which
is the default state for systemd services. This way we don't report
an initial change to dead whenever some property changes.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
We want to user monitors for proxies, so they need to be useful
without being dbus objects.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This binary (and the template callin git) connects to the local agent
to create the requrested proxy service.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This listens to connections on the local bus from the hirte-proxy
app and creates proxy objects which the hirte manager
will handle.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Implements proxy monitor to start and monitor requested proxy service
units as well as update the state of requesting agent

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Alexander Larsson <alexl@redhat.com>
@alexlarsson alexlarsson self-requested a review March 22, 2023 15:44
@alexlarsson alexlarsson merged commit 4c7ebcc into eclipse-bluechi:main Mar 22, 2023
@engelmi engelmi mentioned this pull request Mar 27, 2023
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