As a PoC I added this to octavia lxd-profile.yaml:
$ cat lxd-profile.yaml
config:
user.vendor-data: |
#cloud-config
manage_etc_hosts: true
fqdn: juju-fb8c1c-0-lxd-7.maas
And deployed the augmented charm to a new application with placement so that I knew the hard coded fqdn would match what Juju would actually set up.
This resulted in the following on the unit:
ubuntu@juju-fb8c1c-0-lxd-7:~$ cat /var/lib/cloud/seed/nocloud-net/vendor-data
#cloud-config
manage_etc_hosts: true
fqdn: juju-fb8c1c-0-lxd-7.maas
ubuntu@juju-fb8c1c-0-lxd-7:~$ grep juju /etc/hosts
127.0.1.1 juju-fb8c1c-0-lxd-7.maas juju-fb8c1c-0-lxd-7
ubuntu@juju-fb8c1c-0-lxd-7:~$ hostname -f
juju-fb8c1c-0-lxd-7.maas
As a PoC I added this to octavia lxd-profile.yaml: etc_hosts: true 0-lxd-7. maas
$ cat lxd-profile.yaml
config:
user.vendor-data: |
#cloud-config
manage_
fqdn: juju-fb8c1c-
And deployed the augmented charm to a new application with placement so that I knew the hard coded fqdn would match what Juju would actually set up.
This resulted in the following on the unit: juju-fb8c1c- 0-lxd-7: ~$ cat /var/lib/ cloud/seed/ nocloud- net/vendor- data 0-lxd-7. maas juju-fb8c1c- 0-lxd-7: ~$ grep juju /etc/hosts 0-lxd-7. maas juju-fb8c1c-0-lxd-7 juju-fb8c1c- 0-lxd-7: ~$ hostname -f 0-lxd-7. maas
ubuntu@
#cloud-config
manage_etc_hosts: true
fqdn: juju-fb8c1c-
ubuntu@
127.0.1.1 juju-fb8c1c-
ubuntu@
juju-fb8c1c-