TRITON-1928: port config-agent to Linux

Details

Issue Type:New Feature
Priority:4 - Normal
Status:Resolved
Created at:2019-10-04T23:17:18.396Z
Updated at:2020-09-22T14:40:41.360Z

People

Created by:Former user
Reported by:Former user
Assigned to:Pedro Palazón Candel

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2020-09-22T14:19:56.411Z)

Related Issues

Labels

linuxcn

Description

config-agent needs to work on Linux CNs.

Comments

Comment by Pedro Palazón Candel
Created at 2020-09-22T14:19:56.427Z

linuxcn branch of this repo is successfully updating configuration for Compute Nodes. It's still unable to update configuration of VMs on Linux but, given nowadays every triton core service needing this feature is running on SmartOS, we can move forward.

Those problems should be fixed too when metadata-agent is also available for linux, but might not be needed for config-agent.


Comment by Pedro Palazón Candel
Created at 2020-09-22T14:40:41.360Z

Installer using config-agent to successfully setup cn-agent and net-agent:

root@linux01:~# bash /usr/share/initramfs-tools/scripts/live-bottom/install-agents
Creating dir /opt/smartdc/agents/etc/config-agent.d
Creating dir /opt/smartdc/agents/lib/node_modules
Creating dir /opt/smartdc/agents/bin
Copying config-agent from /usr/triton/sdc-config-agent
Generating uuid for config-agent image
Copying cn-agent from /usr/triton/sdc-cn-agent
Generating uuid for cn-agent image
Copying net-agent from /usr/triton/sdc-net-agent
Generating uuid for net-agent image
Creating symlink to config-agent binary in /opt/smartdc/agents/bin
Running config-agent installer
Created symlink /etc/systemd/system/multi-user.target.wants/triton-config-agent.service -> /lib/systemd/system/triton-config-agent.service.
{"mode":"full","storType":"MorayLocalStorage","storAvailable":true}  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1872  100  1872    0     0  41600      0 --:--:-- --:--:-- --:--:-- 42545
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   683  100   683    0     0   2869      0 --:--:-- --:--:-- --:--:--  2869
cat: /opt/smartdc/agents/etc/config-agent: No such file or directory
Adopted service config-agent to instance 73446997-0911-441f-ad31-66e6eccd845d
Creating symlink to cn-agent binary in /opt/smartdc/agents/bin
Running cn-agent installer
Created symlink /etc/systemd/system/multi-user.target.wants/triton-cn-agent.service -> /lib/systemd/system/triton-cn-agent.service.
Created symlink /etc/systemd/system/multi-user.target.wants/triton-cn-agent-update.service -> /lib/systemd/system/triton-cn-agent-update.service.
New agent instance.  Generating new UUID.
Agent UUID: 773cf55f-dc2b-4930-aa54-f24f19f61181
This is not the headnode.
SAPI expected to be available.  Adopting agent instance.
{"uuid":"773cf55f-dc2b-4930-aa54-f24f19f61181","service_uuid":"1eaa3351-6de9-4c2a-8446-c52cb5c874d6","params":{"server_uuid":"564df69b-8c03-e569-0fe9-6a830b3f1084","image_uuid":"bd930c37-1c6a-4d53-9dc4-98119d218e82"}}Agent successfully adopted into SAPI.
Creating symlink to net-agent binary in /opt/smartdc/agents/bin
Running net-agent installer
Created symlink /etc/systemd/system/multi-user.target.wants/triton-net-agent.service -> /lib/systemd/system/triton-net-agent.service.
New agent instance.  Generating new UUID.
Agent UUID: 0ad52976-8890-4948-9dd2-92acc79ed243
This is not the headnode.
SAPI expected to be available.  Adopting agent instance.
{"uuid":"0ad52976-8890-4948-9dd2-92acc79ed243","service_uuid":"60dd3ca7-5744-4ca4-b52b-e95b10c42df7"}Agent successfully adopted into SAPI.