-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Proposed Feature
Add a temporary change to the existing send-inventory/send-heartbeat client scripts so they also POST the inventory and heartbeat in the new "phonehome" format to the migration proxy endpoints on the current my server:
This request should be executed only for enterprise machines and must use the same system credentials (LK / secret) so existing systems do not need to recreate credentials.
Purpose and Motivation
Why:
- We need to automate the migration of reseller systems to the new my service without forcing systems to recreate LK and secrets.
- Doing this temporarily from the clients ensures inventories/heartbeats reach the new my via the proxy and lets us maintain a mapping of old->new system IDs during the migration.
Importance:
- Minimizes manual work and disruptions for resellers and endpoints.
- Enables realistic load/functional testing of the new inventory engine.
- Allows a staged migration while preserving credentials and continuity.
Proposed Solution
Modify the existing client scripts that send inventory and heartbeat (the current send-inventory scripts) to perform an additional POST to the migration proxy endpoints in the new "phonehome" format. Key points:
Behavior:
- Keep existing behaviour (no breaking changes).
- After the current inventory/heartbeat send, duplicate the request to the proxy endpoints:
- POST https://my.nethesis.it/proxy/inventory
- Content-Type: application/json
- Basic auth: -u "SYSTEM_KEY:SYSTEM_SECRET"
- Body: inventory in the new phonehome JSON format (e.g., @inventory.json)
- POST https://my.nethesis.it/proxy/heartbeat
- Basic auth: -u "SYSTEM_KEY:SYSTEM_SECRET"
- Body: empty
- POST https://my.nethesis.it/proxy/inventory
Only send these additional requests for systems detected as "enterprise".
Also send the following info under the facts field:
- fqdn: "host.firewall.net",
- default_ipv4: "1.2.3.4",
- default_ipv6: "2a03:b0c0:3:f0:0:1:dbfe:3000",
- kernel_version: "5.14.0-284.11.1.el9_2.x86_64",
- uptime_seconds: 29966,
- timezone: "UTC",
- package_updates_available: true
- image_updates_available: false
If the same info must be sent also for community, make sure data are anonymized.
Additional Context
Only enterprise machines should send the extra requests. This is a temporary measure until the migration completes and systems are fully associated to organizations on the new my.
Example curl commands for the proxy endpoints (for reference):
Heartbeat:
curl -X POST https://my.nethesis.it/proxy/heartbeat \
-u "SYSTEM_KEY:SYSTEM_SECRET"
Inventory (phonehome JSON):
curl -X POST https://my.nethesis.it/proxy/inventory \
-H "Content-Type: application/json" \
-u "SYSTEM_KEY:SYSTEM_SECRET" \
-d @inventory.json
Metadata
Metadata
Assignees
Labels
Type
Projects
Status