[09:18] <Nunosav84> Hi, good morning everyone.
[09:18] <Nunosav84> Following up the suggestion given by danilogondolfo yesterday of using netplan-dbus i was able to establish communication successfully. Now, however, i get an error when writing new configuration.
[09:18] <Nunosav84> command: WRITE=$(sudo busctl call io.netplan.Netplan $CONFIG io.netplan.Netplan.Config Set ss \"ethernets.enp2s0={dhcp4: false, addresses: [10.0.0.33/24], routes: [{to: default, via: 10.0.0.1}], nameservers: {addresses: [10.0.0.1]}}"}\" \"00-installer-config\" | awk '{print $2}')
[09:18] <Nunosav84> error: Too many parameters for signature.
[09:18] <Nunosav84> the yaml provided is valid and is the structure used in the config files. Any clue why the error?
[09:54] <danilogondolfo> Hi. I'm wondering if it's that " after the nameserver IP
[09:54] <danilogondolfo> the command seems to work fine
[09:58] <Nunosav84> Sorry, that was a leftover from the logs, i failed to remove it. So that's not the cause of the error
[10:00] <Nunosav84> Is it known what could trigger such error message? I searched the github.com/canonical/netplan repo for it but found nothing
[10:02] <danilogondolfo> I think the error message is from dbus itself
[10:04] <danilogondolfo> it's like it's parsing each part of the string as a separate parameter
[10:19] <Nunosav84> any advice on how to proceed?
[10:30] <danilogondolfo> how do you run this command? trying to understand why you need to escape the quotes
[10:33] <Nunosav84> that was a leftover copied from container logs
[10:33] <Nunosav84> {"level":"info","app":"api","time":"2023-03-10T10:32:37Z","caller":"/src/services/settings.go:285","message":"The new config is {dhcp4: false, addresses: [10.0.0.33/24], routes: [{to: default, via: 10.0.0.1}], nameservers: {addresses: [10.0.0.1]}}"}
[10:42] <danilogondolfo> ok, but how are you calling this command? From a script? From go code?
[10:43] <danilogondolfo> buctl is not reading the config as a single big string, but as many separated words, thus the "too many parameters" error
[12:56] <Nunosav> Just to let you know, i was successful modifying netplan *.yaml file in GO code and running only netplan-dbus CONFIG() and APPLY() commands
[12:57] <Nunosav> Thanks for your help danilogondolfo, really appreciated <3 (y)
[13:04] <danilogondolfo> you are welcome :)