-
Notifications
You must be signed in to change notification settings - Fork 58
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
spread: add LXD VM backend #185
base: master
Are you sure you want to change the base?
Conversation
spread/lxd.go
Outdated
for ifacename, ifaceconf := range sjson.State.Network { | ||
if ifacename == "lo" { | ||
// ignore loopback interface | ||
continue | ||
} | ||
for _, addr := range ifaceconf.Addresses { | ||
if addr.Family == "inet" && addr.Address != "" { | ||
return addr.Address, nil | ||
} | ||
} |
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.
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.
yup, I think I mentioned somewhere that I had exact same change :) I will rebase as needed
Add a new backend named lxd-vm, which is essentially VMs orchestrated through LXD. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
LXD VMs, especially when running in GCP take quite long to have IP addresses assigned to them. Use a longer timeout in this case. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
… and lxd-vm backends Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
11aef7b
to
77fbb21
Compare
tests/lxd-vm/spread.yaml
Outdated
backends: | ||
lxd-vm: | ||
systems: | ||
- ubuntu-20.04 |
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.
This should probably also test 16.04, 18.04 and 22.04 as per #182 (assuming there are VM images for all old releases as well)
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.
16.04 and 18.04 don't work in a VM, lxd-agent does not come start, so I've limited this to 20.04 and 22.04 for now. Another issue I ran into, is that tests need to be run one by one, otherwise the host runs out of disk space.
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.
Eh, and 22.04 will only work when #184 or other similar fix lands.
Prepare the test to run on multiple systems and mention why Ubuntu 16.04, 18.04, and 22.04 are not currently working. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
I'm seeing this message on execution using the lxd-vm backend, it can also be adjusted to mention virtual machine instead of container:
|
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
…bboozzoo/lxd-vm-backend
Like LXD but with a twist, as instead of containers, it's using VMs. This is an improvement over the qemu backend, as LXD --vm generally runs with a virtio focused configuration ensuring that we're using hardware efficiently.
Another upside is that one does not need to build a special VM image anymore, LXD handles everything through cloud-init or the agent.