-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename ring buffer to com.canonical.lxd #12548
Conversation
Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Din Music <din.music@canonical.com>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Din Music <din.music@canonical.com>
Signed-off-by: Din Music <din.music@canonical.com>
Looks good to me! And also thanks for adding a great explanatory comments. |
We still need to test this very-very carefully to be 100% that nothing was missed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some tiny nitpicks.
@simondeziel @MusicDin would we be able to add some tests to lxd-ci that would check that the agent is working on an older image (e.g. jammy assuming the SRU won't go through) is working with the newer LXD? And also that the agent is working in an image for a newer version of Ubuntu (once our changes land in lxd-agent-loader package) on an older (5.0/stable) LXD? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
What was the outcome of the test to statefully restore a VM running an older lxd-agent that talks to the older serial device?
…unit, and serial devices Signed-off-by: Din Music <din.music@canonical.com>
f334375
886820c
to
f334375
Compare
Steps that I did (Also see the spec where I tried to document this https://discourse.ubuntu.com/t/rename-lxd-ring-buffer-to-com-canonical-lxd/40499): $ lxc launch ubuntu:22.04 v1 --vm
$ lxc snapshot v1 mysnap --stateful
# >> Upgrade LXD
# This will work, because VM state is not recovered.
$ lxc restore v1 mysnap
$ lxc start v1
# This will NOT work, because old LXD agent is restored as well and it is not able
# to communicate with the LXD server through a common ring buffer.
$ lxc restore v1 mysnap --stateful
Error: Failed restoring state from "/var/snap/lxd/common/lxd/virtual-machines/v1/state": Monitor is disconnected |
Hrm, are you sure the failure to restore the snapshot was due to the ring buffer? Did you get an error from the qemu logs? |
Good point, need to verify that |
You were right Tom, my assumption was wrong. According to @mihalicyn, the issue is related to non-existing state of the new serial device. Here is the instance log:
|
Signed-off-by: Din Music <din.music@canonical.com>
OK thats fine then as we wont need to consider restoring an actively running older agent. |
This PR updates the name of ring buffer from
org.linuxcontainers.lxd
tocom.canonical.lxd
.With this change in place, restart of existing VMs will be required. Otherwise, (old) lxd-agent will write data to the
org.linuxcontainers.lxd
qemu serial device that is not connected to the new ring buffer from which lxd server will try to read. After VM is restarted, new lxd-agent will be copied from the shared host filesystem to the VM.Fixes #12149