After lxd2Incus migration of VM with agent.nic_config: true nics are missingn in the nics/ subdir of config fs

We are migrating from lxd to incus. After migration of some CentOS based images, Incus no longer setup the network as we need.
We define networks with specific names that is configured from the network setup of the instance. This depends on the names being the same no matter how many nics we happen to define on our hosts. So we enabled agnet.nic_config: true on our virtual machines. With Incus this does not work anymore. The NIC name change from enp5s0 to our defined name (in this case ethext) never happens… Looking at the content of the config filesystem (/run/lxd-agent and /run/incus-agent) for the instance I can see that on LXD there are one file for each defined network under the nics/ subdir. But on Incus the nics/ directory is empty.

Is this intended? Or did something go wrong during the migration? Everything else seems OK.

Instance config:

architecture: x86_64
config:
  agent.nic_config: "true"
  image.architecture: amd64
  image.description: Rockylinux 8 amd64 (20230810_02:06)
  image.os: Rockylinux
  image.release: "8"
  image.serial: "20230810_02:06"
  image.type: disk-kvm.img
  image.variant: cloud
  volatile.base_image: 4f7304dcc4fdeed67f9bd6e2b0fe8d2bbbc8b77ceb6906a8779c05e14aea7278
  volatile.cloud-init.instance-id: 4912b5d9-5d48-411a-85bb-3c51fc689f88
  volatile.ethext.host_name: tap427b30ed
  volatile.ethext.hwaddr: 00:16:3e:b0:37:44
  volatile.ethint.host_name: tap629d9732
  volatile.ethint.hwaddr: 00:16:3e:58:68:9b
  volatile.last_state.power: RUNNING
  volatile.last_state.ready: "false"
  volatile.uuid: 671aa66a-6c6a-4176-a973-b21aa6e0be1c
  volatile.uuid.generation: 671aa66a-6c6a-4176-a973-b21aa6e0be1c
  volatile.vsock_id: "6"
devices:
  agent:
    source: agent:config
    type: disk
ephemeral: false
profiles:
- ethint
- ethext
- cae_medium
- vm-agent
stateful: false
description: ""

Used profiles:

profiles:
  - config:
      cloud-init.network-config: |
        version: 2
        ethernets:
          ethint:
            dhcp4: true
    description: New Internal network interface ethint on brint
    devices:
      ethint:
        name: ethint
        nictype: bridged
        parent: brint
        type: nic
    name: ethint
  - config: {}
    description: New External network interface ethext on brext
    devices:
      ethext:
        name: ethext
        nictype: bridged
        parent: brext
        type: nic
    name: ethext
  - config:
      limits.cpu: "4"
      limits.memory: 8GB
    description: CAE medium profile
    devices:
      root:
        path: /
        pool: default
        size: 150GB
        type: disk
    name: cae_medium
  - config: {}
    description: Agent config device for images lacking 9p filesystem (CentOS)
    devices:
      agent:
        source: agent:config
        type: disk
    name: vm-agent

Incus version: 0.5.1-202401301901-ubuntu22.04
OS version: Ubuntu 22.04.3 LTS

Sounds like a bug in the new agent driver logic, I’m looking at that one now.

VM agent tweaks by stgraber · Pull Request #489 · lxc/incus · GitHub will fix that issue

1 Like

Thanks for the quick response.

I updated the two files in your patch on my VM and re-ran the install.sh and restarted the VM. But it behaves the same as before. the nics/ subdir is still empty and there is no re-naming of nics during boot. Perhaps there is something more that I’m missing with my version of Incus? (0.5.1-202401301901-ubuntu22.04) that is needed for the above fix to work? I’ll switch to daily repos and try again.

Tested with daily. Same result. After downgrade to daily and restart of VM it looks like this:

cae@cs9-h1:/etc/apt/sources.list.d$ incus shell caeipa5
Last login: Tue Feb 13 07:42:20 UTC 2024 on pts/0
[root@caeipa5 ~]# grep -A3 SELinux /usr/lib/systemd/incus-agent-setup
# Attempt to restore SELinux labels.
restorecon -R "${PREFIX}" >/dev/null 2>&1 || true

exit 0
[root@caeipa5 ~]# cd /run/incus_agent/
[root@caeipa5 incus_agent]# ls -la
total 17520
drwx------  6 root root      280 Feb 13 07:41 .
drwxr-xr-x 38 root root     1100 Feb 13 07:42 ..
-rw-r--r--  1 root root      831 Feb 13 07:41 agent.conf
-r--------  1 root root      733 Feb 13 07:41 agent.crt
-r--------  1 root root      288 Feb 13 07:41 agent.key
-r--------  1 root root        2 Feb 13 07:11 agent-mounts.json
dr-x------  2 root root       60 Feb 13 07:41 files
-r-x------  1 root root 17912044 Feb 13 07:41 incus-agent
-rwx------  1 root root      593 Feb 13 07:41 install.sh
lrwxrwxrwx  1 root root       11 Feb 13 07:41 lxd-agent -> incus-agent
dr-x------  2 root root       40 Feb 13 07:41 nics
-r--------  1 root root      700 Feb 13 07:41 server.crt
dr-x------  2 root root      120 Feb  9 09:56 systemd
dr-x------  2 root root       80 Feb  9 09:56 udev
[root@caeipa5 incus_agent]# ls -l nics/
total 0
[root@caeipa5 incus_agent]# grep -A3  SELinux systemd/incus-agent-setup
[root@caeipa5 incus_agent]# logout
cae@cs9-h1:/etc/apt/sources.list.d$ dpkg -l incus
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                    Architecture Description
+++-==============-==========================-============-=============================================================
ii  incus          0~202402121730-ubuntu22.04 amd64        Incus -  Container and virtualization daemon (container-only)

I’ll wait for todays build and try again when it’s ready. (Assuming your patch will be shipped with it…)

Try again now, the daily should have built about 4 hours ago.

Upgraded to 0~202402131046-ubuntu22.04. Restarted our VM. Same issue, but now the nics/ dir is populated, but nics are still not renamed.

cae@cs9-h1:~$ incus stop caeipa5
cae@cs9-h1:~$ incus start caeipa5
cae@cs9-h1:~$ incus shell caeipa5
Last login: Wed Feb 14 08:08:46 UTC 2024 on pts/0
[root@caeipa5 ~]# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:b0:37:44 brd ff:ff:ff:ff:ff:ff
3: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:58:68:9b brd ff:ff:ff:ff:ff:ff
[root@caeipa5 ~]# journalctl  -u incus-agent -S today
-- Logs begin at Wed 2024-02-14 08:13:13 UTC, end at Wed 2024-02-14 08:14:02 UTC. --
Feb 14 08:13:16 caeipa5.cae.volvocars.net systemd[1]: Started Incus - agent.
Feb 14 08:13:20 caeipa5.cae.volvocars.net su[793]: (to root) root on pts/0
Feb 14 08:13:45 caeipa5.cae.volvocars.net su[793]: pam_systemd(su-l:session): Failed to create session: Connection timed out
Feb 14 08:13:45 caeipa5.cae.volvocars.net su[793]: pam_unix(su-l:session): session opened for user root by (uid=0)
[root@caeipa5 ~]# cd /run/incus_agent/
[root@caeipa5 incus_agent]# ls -la
total 17520
drwx------  6 root root      280 Feb 14 08:13 .
drwxr-xr-x 38 root root     1100 Feb 14 08:14 ..
-rw-r--r--  1 root root      830 Feb 14 08:13 agent.conf
-r--------  1 root root      733 Feb 14 08:13 agent.crt
-r--------  1 root root      288 Feb 14 08:13 agent.key
-r--------  1 root root        2 Feb 14 08:05 agent-mounts.json
dr-x------  2 root root       60 Feb 14 08:13 files
-r-x------  1 root root 17912044 Feb 14 08:13 incus-agent
-rwx------  1 root root      720 Feb 14 08:13 install.sh
lrwxrwxrwx  1 root root       11 Feb 14 08:13 lxd-agent -> incus-agent
dr-x------  2 root root       80 Feb 14 08:13 nics
-r--------  1 root root      700 Feb 14 08:13 server.crt
dr-x------  2 root root      120 Feb  9 09:56 systemd
dr-x------  2 root root       80 Feb  9 09:56 udev
[root@caeipa5 incus_agent]# ls -l nics/
total 8
-rwx------ 1 root root 86 Feb 14 08:13 ethext.json
-rwx------ 1 root root 86 Feb 14 08:13 ethint.json
[root@caeipa5 incus_agent]# cat nics/ethext.json
{"device_name":"ethext","nic_name":"ethext","mac_address":"00:16:3e:b0:37:44","mtu":0}[root@caeipa5 incus_agent]#
[root@caeipa5 incus_agent]#

I tested with a complete clean new vm and have the same issue… Nics are not renamed as configured via agent.nic_config: true config option:

cae@cs9-h1:~$ incus launch images:rockylinux/9/cloud  rockylinux9-cloud-2 -c agent.nic_config=true -p cae_small -p ethint -p ethext -p vm-agent --vm
Launching rockylinux9-cloud-2
cae@cs9-h1:~$ incus list
+---------------------+---------+------------------------+------+-----------------+-----------+
|        NAME         |  STATE  |          IPV4          | IPV6 |      TYPE       | SNAPSHOTS |
+---------------------+---------+------------------------+------+-----------------+-----------+
| caeipa5             | RUNNING |                        |      | VIRTUAL-MACHINE | 0         |
+---------------------+---------+------------------------+------+-----------------+-----------+
| jammy-new           | RUNNING | 192.168.1.104 (ethint) |      | VIRTUAL-MACHINE | 0         |
+---------------------+---------+------------------------+------+-----------------+-----------+
| rockylinux8-cloud   | RUNNING | 192.168.1.245 (ethint) |      | VIRTUAL-MACHINE | 0         |
+---------------------+---------+------------------------+------+-----------------+-----------+
| rockylinux9-cloud   | RUNNING | 192.168.1.70 (ethint)  |      | VIRTUAL-MACHINE | 0         |
+---------------------+---------+------------------------+------+-----------------+-----------+
| rockylinux9-cloud-2 | RUNNING | 192.168.1.176 (enp6s0) |      | VIRTUAL-MACHINE | 0         |
+---------------------+---------+------------------------+------+-----------------+-----------+
cae@cs9-h1:~$ incus shell rockylinux9-cloud-2
[root@rockylinux9-cloud-2 ~]# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:02:fa:0a brd ff:ff:ff:ff:ff:ff
3: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:fb:60:9e brd ff:ff:ff:ff:ff:ff
[root@rockylinux9-cloud-2 ~]# journalctl  -u incus-agent
Feb 15 11:29:44 localhost systemd[1]: Starting Incus - agent...
Feb 15 11:29:44 localhost systemd[1]: Started Incus - agent.
Feb 15 11:39:14 rockylinux9-cloud-2 su[716]: (to root) root on pts/0
Feb 15 11:39:14 rockylinux9-cloud-2 su[716]: pam_unix(su-l:session): session opened for user root(uid=0) by (uid=0)
[root@rockylinux9-cloud-2 ~]# cd /run/incus_agent/
[root@rockylinux9-cloud-2 incus_agent]# ls
agent.conf  agent.crt  agent.key  agent-mounts.json  files  incus-agent  install.sh  lxd-agent  nics  server.crt  systemd  udev
[root@rockylinux9-cloud-2 incus_agent]# ls -l nics/
total 8
-rwx------ 1 root root 86 Feb 15 11:29 ethext.json
-rwx------ 1 root root 86 Feb 15 11:29 ethint.json
[root@rockylinux9-cloud-2 incus_agent]# grep '.*' nics/*.json;echo
nics/ethext.json:{"device_name":"ethext","nic_name":"ethext","mac_address":"00:16:3e:02:fa:0a","mtu":0}
nics/ethint.json:{"device_name":"ethint","nic_name":"ethint","mac_address":"00:16:3e:fb:60:9e","mtu":0}

[root@rockylinux9-cloud-2 incus_agent]#
logout
cae@cs9-h1:~$ incus config show rockylinux9-cloud-2
architecture: x86_64
config:
  agent.nic_config: "true"
  image.architecture: amd64
  image.description: Rockylinux 9 amd64 (20240215_02:06)
  image.os: Rockylinux
  image.release: "9"
  image.serial: "20240215_02:06"
  image.type: disk-kvm.img
  image.variant: cloud
  volatile.base_image: 548833006d50d0685a947ec1f4ca2cc031eb7b9797f3f916f42283f553425cda
  volatile.cloud-init.instance-id: fb8f894d-2db5-4208-8f0d-f27ee29cff25
  volatile.ethext.host_name: tapdba5d74d
  volatile.ethext.hwaddr: 00:16:3e:02:fa:0a
  volatile.ethint.host_name: tap068a8a5c
  volatile.ethint.hwaddr: 00:16:3e:fb:60:9e
  volatile.last_state.power: RUNNING
  volatile.last_state.ready: "false"
  volatile.uuid: 1393dba7-4159-4fe8-a74c-9e8717cb362a
  volatile.uuid.generation: 1393dba7-4159-4fe8-a74c-9e8717cb362a
  volatile.vsock_id: "4047690071"
devices: {}
ephemeral: false
profiles:
- cae_small
- ethint
- ethext
- vm-agent
stateful: false
description: ""
cae@cs9-h1:~$ incus profile show ethext
config: {}
description: New External network interface ethext on brext
devices:
  ethext:
    name: ethext
    nictype: bridged
    parent: brext
    type: nic
name: ethext
used_by:
- /1.0/instances/caeipa5
- /1.0/instances/jammy-new
- /1.0/instances/rockylinux8-cloud
- /1.0/instances/rockylinux9-cloud
- /1.0/instances/rockylinux9-cloud-2
cae@cs9-h1:~$ incus profile show vm-agnet
Error: Fetch profile: Profile not found
cae@cs9-h1:~$ incus profile show vm-agent
config: {}
description: Agent config device for images lacking virtiofs (CentOS)
devices:
  agent:
    source: agent:config
    type: disk
name: vm-agent
used_by:
- /1.0/instances/caeipa5
- /1.0/instances/rockylinux8-cloud
- /1.0/instances/rockylinux9-cloud
- /1.0/instances/rockylinux9-cloud-2

Added --debug to the incus-agent… This is the output:

ot@rockylinux9-cloud-2 incus_agent]# journalctl  -u incus-agent --no-pager
Feb 15 12:51:36 rockylinux9-cloud-2 systemd[1]: Starting Incus - agent...
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=info msg=Starting
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=info msg="Started vsock listener"
Feb 15 12:51:36 rockylinux9-cloud-2 systemd[1]: Started Incus - agent.
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="API Request\n\t{\n\t\t\"cid\": 2,\n\t\t\"port\": 7597,\n\t\t\"certificate\": \"-----BEGIN CERTIFICATE-----\\nMIICBDCCAYqgAwIBAgIRAIaMm8qqroXD0cHLq05KH+owCgYIKoZIzj0EAwMwNDEc\\nMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzEUMBIGA1UEAwwLcm9vdEBjczkt\\naDEwHhcNMjMwNjIxMTE0OTAxWhcNMzMwNjE4MTE0OTAxWjA0MRwwGgYDVQQKExNs\\naW51eGNvbnRhaW5lcnMub3JnMRQwEgYDVQQDDAtyb290QGNzOS1oMTB2MBAGByqG\\nSM49AgEGBSuBBAAiA2IABHmxQiQNkIHEIqeii9wz6gkNNLGpyBLh5CWlEBqLMVGt\\nIUOcapcYcfm17epUje3Ob/bX/lritM5KcmrDSTHEkMeYDFuqy8CjFfiZZqNLfZCu\\nxmhL7nfEKlZbSoqg9qR7JqNgMF4wDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoG\\nCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwKQYDVR0RBCIwIIIGY3M5LWgxhwR/AAAB\\nhxAAAAAAAAAAAAAAAAAAAAABMAoGCCqGSM49BAMDA2gAMGUCMFevv3co+opHhp45\\n9eUz5t0NFOoTi+EjYVXteEWKH1yEvexVNLFO4feDCBANp3kOJQIxAMNYPuZcQwcc\\nUWJG9n62+ecOhYcygL3ah/UXGpiyGeoCDfizN0h6cU0jgdjRlU0ZFw==\\n-----END CERTIFICATE-----\\n\",\n\t\t\"dev_incus\": true\n\t}"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="Connecting to a VM agent over a VM socket"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="Sending request to Incus" etag= method=GET url="https://custom.socket/1.0"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="Got response struct from Incus"
Feb 15 12:51:36 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:36Z" level=debug msg="\n\t{\n\t\t\"config\": null,\n\t\t\"api_extensions\": null,\n\t\t\"api_status\": \"\",\n\t\t\"api_version\": \"1.0\",\n\t\t\"auth\": \"\",\n\t\t\"public\": false,\n\t\t\"auth_methods\": null,\n\t\t\"auth_user_name\": \"\",\n\t\t\"auth_user_method\": \"\",\n\t\t\"environment\": {\n\t\t\t\"addresses\": null,\n\t\t\t\"architectures\": null,\n\t\t\t\"certificate\": \"\",\n\t\t\t\"certificate_fingerprint\": \"\",\n\t\t\t\"driver\": \"\",\n\t\t\t\"driver_version\": \"\",\n\t\t\t\"firewall\": \"\",\n\t\t\t\"kernel\": \"\",\n\t\t\t\"kernel_architecture\": \"\",\n\t\t\t\"kernel_features\": null,\n\t\t\t\"kernel_version\": \"\",\n\t\t\t\"lxc_features\": null,\n\t\t\t\"os_name\": \"\",\n\t\t\t\"os_version\": \"\",\n\t\t\t\"project\": \"\",\n\t\t\t\"server\": \"\",\n\t\t\t\"server_clustered\": false,\n\t\t\t\"server_event_mode\": \"\",\n\t\t\t\"server_name\": \"\",\n\t\t\t\"server_pid\": 0,\n\t\t\t\"server_version\": \"\",\n\t\t\t\"storage\": \"\",\n\t\t\t\"storage_version\": \"\",\n\t\t\t\"storage_supported_drivers\": null\n\t\t}\n\t}"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="API Request\n\t{\n\t\t\"command\": [\n\t\t\t\"su\",\n\t\t\t\"-l\"\n\t\t],\n\t\t\"wait-for-websocket\": true,\n\t\t\"interactive\": true,\n\t\t\"environment\": {\n\t\t\t\"HOME\": \"/root\",\n\t\t\t\"LANG\": \"C.UTF-8\",\n\t\t\t\"PATH\": \"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\n\t\t\t\"TERM\": \"xterm-256color\",\n\t\t\t\"USER\": \"root\"\n\t\t},\n\t\t\"width\": 141,\n\t\t\"height\": 67,\n\t\t\"record-output\": false,\n\t\t\"user\": 0,\n\t\t\"group\": 0,\n\t\t\"cwd\": \"\"\n\t}"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="New operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Started operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Waiting for exec websockets to connect"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Connecting to operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Connected to operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Connecting to operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Connected to operation" class=websocket description="Executing command" operation=ed866ac3-dddc-4237-a4c8-0d39e495692f project=
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Instance process started" PID=590 interactive=true
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Exec mirror websocket started" PID=590 interactive=true number=0
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Websocket: Started read mirror" address="host(2):3820755447"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Websocket: Started write mirror" address="host(2):3820755447"
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Exec control handler started" PID=590 interactive=true
Feb 15 12:51:41 rockylinux9-cloud-2 incus-agent[513]: time="2024-02-15T12:51:41Z" level=debug msg="Matched trusted cert" fingerprint=0 subject="CN=root@cs9-h1,O=Linux Containers"
Feb 15 12:51:41 rockylinux9-cloud-2 su[590]: (to root) root on pts/0
Feb 15 12:51:41 rockylinux9-cloud-2 su[590]: pam_unix(su-l:session): session opened for user root(uid=0) by (uid=0)

Not sure it this is expected, but I see no output from any of the logger calls in the reconfigureNetworkInterfaces() function. Reading the code, I can only assume that if for some reason does not find the nics/ dir. (Guessing… I don’t know go, and the deviceConfig definition is incomprehensible to me)

I need to spend some time to look into this. I had it working here but I’ll try again with the current daily build.

I reproduced the issue, though it’s a bit odd. If I restart incus-agent after startup, then the NIC gets renamed correctly.

That suggests that the agent may have initially run prior to the NIC showing up on the system.
I’ll add some debugging to try and figure out why it couldn’t do the renaming at boot time.

Yep, debugging shows that at the time incus-agent first runs, the only network interface available is lo

Just tested and it now works again with latest nighlty…

Thanks! /Martin

1 Like