Feature #8432
closed
Support for non-direct communication
Added by Lukas Zapletal about 10 years ago.
Updated almost 10 years ago.
Category:
Discovery plugin
|
Description
We need to make use of proxy http proxy plugin. From Greg's mail:
1) The Host registering with Foreman. This is a JSON POST to Foreman,
and generally works OK even through NAT
2) The reboot command at the end of the orchestration queue is direct
from Foreman to Host.
3) The request to refresh facts is direct from Foreman to Host
1) and 2) can be implemented as a smartproxy plugin adding
post /discovery/create
post /discovery/update (for uploading new facts on existing host)
post /discovery/reboot
as routes. The discovery image will need to be updated to try either
the proxy or core URLs, depending on the network config.
- Related to Tracker #8332: [Discovery 2.0] Usability alignment and autoprovisioning added
- Category set to Discovery plugin
- Priority changed from Normal to High
This is our top priority for the next scrum.
- Assignee set to Shlomi Zadok
Notes from todays scrum:
Foreman to Image communication:
Reboot command use BMC API "shell provider" which we will extend with possibility to forward to a different BMC API if IP/hostname is provided.
Refresh facts will be implemented as a simple proxy controller in the new proxy plugin. Let's investigate if the support can be based of prefix like /proxy/:IP/original/path so other calls can be easily added just by adding new controller/action pairs (or whole paths) into an array or something. Beware of security, unlisted actions must not be proxied (let's write a functional test for this).
Image to Foreman communication:
Although Create discovered host (JSON POST) works fine with NAT, we need to proxy that as well. We can take the same approach as for Refresh Facts call, but the direction is opposite here.
Delivery:
The "proxy plugin" needs to have a name, but everything with a proxy in it looks strange (foreman-proxy-discovery-proxy). A patch into BMC proxy shell provider will be needed too.
- Status changed from New to Assigned
- Related to Feature #8514: Add support for requests to smart proxy discovery plugin added
- Related to deleted (Feature #8514: Add support for requests to smart proxy discovery plugin)
- Blocked by Feature #8514: Add support for requests to smart proxy discovery plugin added
Initial work is done at:
https://github.com/shlomizadok/smart_proxy_discoveryCurrently supports:
- creating facts (receive facts from discovered host and post them to Foreman)
- updating facts (receive ip from foreman and get facts from discovered host)
@todo:
Tests, secured reboot action
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman_discovery/pull/107 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- Related to Tracker #8172: Isolate Client Communication through a Capsule added
- Related to deleted (Tracker #8172: Isolate Client Communication through a Capsule)
- Blocks Tracker #8172: Isolate Client Communication through a Capsule added
Also available in: Atom
PDF