amphora-agent package, its init script and configuration file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
1)
At present the ``amphora-agent`` package has a init script that points the amphora-agent at ``/etc/
Upstream reference:
https:/
Config-drive contents:
root@amphora-
mount: /mnt: WARNING: device write-protected, mounted read-only.
root@amphora-
root@amphora-
total 4
dr-xr-xr-x 4 root root 2048 Jun 4 13:03 ec2
dr-xr-xr-x 12 root root 2048 Jun 4 13:03 openstack
root@amphora-
root@amphora-
total 20
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2012-08-10
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2013-04-04
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2013-10-17
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2015-10-15
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2016-06-30
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2016-10-06
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2017-02-22
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 2018-08-27
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 content
dr-xr-xr-x 2 root root 2048 Jun 4 13:03 latest
root@amphora-
root@amphora-
total 4
-r--r--r-- 1 root root 2136 Jun 4 13:03 meta_data.json
-r--r--r-- 1 root root 506 Jun 4 13:03 network_data.json
-r--r--r-- 1 root root 2 Jun 4 13:03 vendor_data.json
-r--r--r-- 1 root root 14 Jun 4 13:03 vendor_data2.json
root@amphora-
{"uuid": "0aedb1b1-
root@amphora-
root@amphora-
total 6
-r--r--r-- 1 root root 727 Jun 4 13:03 0000
-r--r--r-- 1 root root 1135 Jun 4 13:03 0001
-r--r--r-- 1 root root 2875 Jun 4 13:03 0002
root@amphora-
[DEFAULT]
debug = True
[haproxy_amphora]
base_cert_dir = /var/lib/
base_path = /var/lib/octavia
bind_host = ::
bind_port = 9443
haproxy_cmd = /usr/sbin/haproxy
respawn_count = 2
respawn_interval = 2
use_upstart = True
[health_manager]
controller_
heartbeat_interval = 10
heartbeat_key = e211b7a6-
[amphora_agent]
agent_server_ca = /etc/octavia/
agent_server_cert = /etc/octavia/
agent_request_
amphora_id = 82c4877a-
amphora_udp_driver = keepalived_
root@amphora-
total 84
-rw-rw---- 1 root root 727 Jun 4 13:03 amphora-agent.conf
drwxr-xr-x 2 root root 4096 Jun 4 13:03 certs
-rw-r----- 1 root octavia 68324 Jun 4 12:05 octavia.conf
-rw-r----- 1 root octavia 5290 Jun 4 12:05 policy.json
Due to how the init script is laid out it is not simple to override this through ``/etc/
Can we either fix the location of the configuration file in the init script or expose the ``CONFIG_FILE`` variable from ``/etc/
2)
The package creates the ``/etc/octavia`` directory with 0o750 permissions, subsequently when cloud-init writes out the ``/etc/
Given the file is owned by root:root the amphora-agent service does not have access to read this configuration file.
Could we either make ``/etc/octavia`` mode 0o755 or 2o750 (group sticky bit) to alleviate this?
3)
For some reason the amphora-agent attempts to write to ``/var/
Still investigating this, some bits:
# systemctl status amphora-agent
● amphora-
Loaded: loaded (/lib/systemd/
Active: active (running) since Tue 2019-06-04 16:26:53 UTC; 324ms ago
Main PID: 1591 (/usr/bin/python)
Tasks: 1 (limit: 614)
CGroup: /system.
└─1591 /usr/bin/python3.6 /usr/bin/
-- The start-up result is RESULT.
Jun 04 16:26:56 amphora-
Jun 04 16:26:56 amphora-
Jun 04 16:26:56 amphora-
Jun 04 16:26:56 amphora-
Jun 04 16:26:56 amphora-
For some of these we have limited control over how the Octavia service instructs the amphora instance to run things as it is in full control over config-drive contents etc. If not change our defaults, we should at least make it easily configurable so a Octavia Amphora can be built using packages from UCA.
I'll keep investigating this and put forward a patch as soon as all the pieces necessary for a working amphora from packages is in place.
summary: |
- amphora-agent package and configuration file + amphora-agent package, it's init script and configuration file |
summary: |
- amphora-agent package, it's init script and configuration file + amphora-agent package, its init script and configuration file |
For 3) the upstream project has the ``/var/ log/amphora- agent.log` ` path hard-coded, ref: https:/ /opendev. org/openstack/ octavia/ src/branch/ master/ octavia/ cmd/agent. py#L80