Comment 29 for bug 1997467

Revision history for this message
Michael Vogt (mvo) wrote :

I am trying to test this on core22 with:
"""
$ git diff
diff --git a/tests/nested/manual/core20-early-config/task.yaml b/tests/nested/manual/core20-early-config/task.yaml
index 797232fa26..fbb92d4240 100644
--- a/tests/nested/manual/core20-early-config/task.yaml
+++ b/tests/nested/manual/core20-early-config/task.yaml
@@ -28,6 +28,17 @@ prepare: |

     rm -f "$SNAKEOIL_KEY" "$SNAKEOIL_CERT"

+ snap download --basename=core22 core22
+ unsquashfs -d core22 core22.snap
+ wget https://launchpad.net/ubuntu/+source/netplan.io/0.105-0ubuntu2~22.04.2/+build/25592898/+files/libnetplan0_0.105-0ubuntu2~22.04.2_amd64.deb
+ dpkg-deb -x libnetplan0_0.105-0ubuntu2~22.04.2_amd64.deb ./core22
+ wget https://launchpad.net/ubuntu/+source/netplan.io/0.105-0ubuntu2~22.04.2/+build/25592898/+files/netplan.io_0.105-0ubuntu2~22.04.2_amd64.deb
+ dpkg-deb -x netplan.io_0.105-0ubuntu2~22.04.2_amd64.deb ./netplan
+ # netplan ships stuff in /lib instead of /usr/lib, fix this
+ mv netplan/lib/ netplan/usr/
+ rsync -a ./netplan/* ./core22
+ snap pack ./core22 "$(tests.nested get extra-snaps-path)"
+
     # Note that the early config is configured to set port to 8023 instead
     # of the default 8022 (which maps to 22 on the VM).
     remote.setup config --host localhost --port 8023 --user user1 --pass ubuntu

$ spread -debug -v qemu-nested:ubuntu-22.04-64:tests/nested/manual/core20-early-config
"""

With that the "core20-early-config" test that was also used to find the original issue fails in strange ways. The netplan config itself looks fine:
"""
# remote.exec "sudo netplan get "
network:
  version: 2
  ethernets:
    ens3:
      addresses:
      - "10.0.2.15/24"
      dhcp4: false
      routes:
      - to: "default"
        via: "10.0.2.2"
  bridges:
    br54:
      dhcp4: true
"""

But netplan seems to be no longer able to give dbus results:
"""
qemu-nested:ubuntu-22.04-64 .../tests/nested/manual/core20-early-config# remote.exec 'sudo dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Config'
method return time=1677251025.338293 sender=:1.27 -> destination=:1.232 serial=65 reply_serial=2
   object path "/io/netplan/Netplan/config/Q6S201"
qemu-nested:ubuntu-22.04-64 .../tests/nested/manual/core20-early-config# remote.exec 'sudo dbus-send --system --print-reply --type=method_call --dest=io.netplan.Netplan /io/netplan/Netplan/config/Q6S201 io.netplan.Netplan.Config.Get'
method return time=1677251055.826055 sender=:1.27 -> destination=:1.237 serial=68 reply_serial=2
   string ""
"""
and the same in snapd (which uses the dbus API).

I also tried to reproduce this on my desktop system and see similar results, i.e. the dbus call for a config dbus object is now giving me an empty string on my desktop. So maybe more than just a test setup issue?