canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.35k stars 931 forks source link

[Bug][6.1] : `lxc config device add <device_name> eth0 none` fails with ws error #13774

Closed Gu1nness closed 3 months ago

Gu1nness commented 3 months ago

Required information

Issue description

With lxc 6.1, running lxc config device add juju-e91cbe-25 eth0 none to simulate a network disruption used to fails (ret code 1) with

Error: websocket: close 1006 (abnormal closure): unexpected EOF

With lxc 5.21.1, the same command succeeds with Device eth0 added to juju-e91cbe-26

This has been confirmed by @shayancanonical

I tracked down a bit the error and it does not seem to fail on the client side:

This bugs happens since 6.1 got released in our CI:

Steps to reproduce

  1. Deploy a working lxc container using juju : juju deploy mongodb-operator
  2. Get the machine name with juju status
  3. Simulate network cut: lxc config device add <machine_name> eth0 none
  4. Information to attach

tomponline commented 3 months ago

Thanks for the report we will look into this as a matter of urgency.

tomponline commented 3 months ago

In the future it would be great if you could run your CI using latest/candidate channel so we can catch issues like this before the release is pushed to stable :)

Gu1nness commented 3 months ago

In the future it would be great if you could run your CI using latest/candidate channel so we can catch issues like this before the release is pushed to stable :)

This is a really good idea and I'll implement that (maybe in a daily run) in order to catch this sooner!

tomponline commented 3 months ago

@Gu1nness https://github.com/canonical/lxd/pull/13775 will fix this.

We will cherry-pick into 5.21/candidate, latest/candidate and latest/stable shortly.

tomponline commented 3 months ago

For amd64 latest/candidate is fixed now.

tomponline commented 3 months ago

This is fixed in latest/stable now too.

phvalguima commented 3 months ago

hi @tomponline, running on ubuntu 24.04 and I can still see lxd v6.1 available: https://pastebin.ubuntu.com/p/WywCrWj4vv/

Same thing on my CI (22.04): https://github.com/canonical/opensearch-operator/actions/runs/9961773913/job/27544359496?pr=369

tomponline commented 3 months ago

This is fixed now in latest/stable 6.1-0d4d89b

tomponline commented 3 months ago

@phvalguima it would be great if you could also update your CI to use latest/candidate rather than latest/stable so that issues like this are picked up before new releases head to latest/stable. Thanks :)

Gu1nness commented 3 months ago

@tomponline We are discussing this right now with the Data Platform teams and will come with a solution soon!