| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
cloudstack-setup-agent sets up live migration on Debian and Ubuntu by writing libvirtd_opts='-l' to /etc/default/libvirtd and masking the libvirtd sockets. The libvirtd.service unit on current releases reads LIBVIRTD_ARGS from that file instead (Debian 12 and 13 run "libvirtd $LIBVIRTD_ARGS" with "--timeout 120" as the default), so after adding a host libvirtd runs without --listen, nothing listens on the migration ports and live migration fails with "unable to connect to server". Also set LIBVIRTD_ARGS="--listen", and keep libvirtd_opts for older units that still read it.
There was a problem hiding this comment.
code lgtm
we have not faced this issue in Trillian tests, as we have already applied it via ansible
- name: Update /etc/default/libvirtd in Ubuntu 22.04
lineinfile:
dest: "/etc/default/libvirtd"
regexp: '^LIBVIRTD_ARGS=*'
line: 'LIBVIRTD_ARGS="-l"'
when: ansible_distribution_version is version('22.04','>=')
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## 4.20 #14153 +/- ##
============================================
- Coverage 16.38% 16.38% -0.01%
+ Complexity 13615 13614 -1
============================================
Files 5669 5669
Lines 501561 501561
Branches 60922 60922
============================================
- Hits 82168 82167 -1
- Misses 410185 410186 +1
Partials 9208 9208
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Thanks @weizhouapache for the review. This needs a second review and a package and smoke test run. The red Simulator CI job stopped at a Maven lock timeout during the build, before any tests ran. |
Sorry, something went wrong.
There was a problem hiding this comment.
clgtm
Sorry, something went wrong.
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
@weizhouapache mentioned, a smoke test run would not prove anything here as the ansible example he gave is in place. Would be nioce if someone else could test it. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19805 |
Sorry, something went wrong.
Good call @DaanHoogland, did exactly that on a Debian 12 (bookworm) KVM host without the ansible workaround. On stock Debian systemd, libvirtd.service runs ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS sourced from /etc/default/libvirtd, with libvirtd.socket masked. So only LIBVIRTD_ARGS takes effect and libvirtd_opts is ignored by systemd.
These hosts have listen_tls=1, so it binds 16514 rather than 16509, but it's the same mechanism. Host restored afterwards. So on a Debian/Ubuntu host without that ansible workaround, this is the line that actually gets libvirtd listening for live migration. |
Sorry, something went wrong.
|
@rootnomad , could you submit an ICLA with the ASF? you are contributing a lot of code in a short time, which is very much appreciated. Submitting an ICLA would help with legal matters a lot. |
Sorry, something went wrong.
Thanks @DaanHoogland , that genuinely means a lot. Happy to, I'll get the ICLA filed with the ASF. |
Sorry, something went wrong.
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian Build Failed (tid-17521) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
cloudstack-setup-agent sets up live migration on Debian and Ubuntu by writing libvirtd_opts='-l' to /etc/default/libvirtd and masking the libvirtd sockets. The libvirtd.service unit on current releases reads LIBVIRTD_ARGS from that file instead (Debian 12 and 13: ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS with --timeout 120 as the default), so after adding a host libvirtd runs without --listen, nothing listens on 16509/16514 and live migration fails. This also sets LIBVIRTD_ARGS="--listen", and keeps libvirtd_opts for older units that still read it.
Related: #9802 and #12374.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
N/A
How Has This Been Tested?
Live tested on two fresh Debian 13 KVM hosts (libvirt 11.3, QEMU 10.0) added to a cluster with addHost, with NFS primary storage, and a VM live migrated between them with migrateVirtualMachine.
Before this change, right after addHost:
With this change, same hosts reset to the distro defaults and added again:
/etc/default/libvirtd libvirtd_opts='-l' LIBVIRTD_ARGS="--listen" libvirtd process /usr/sbin/libvirtd --listen port 16514 listening 15:58:25 GET command=migrateVirtualMachine&virtualmachineid=...&hostid=... 15:58:28 Complete async job-1653, jobStatus: SUCCEEDEDDebian 12 (libvirt 9.0) uses the same unit layout.
How did you try to break this feature and the system with this change?
Older units that read libvirtd_opts still get it. replace_or_add_line replaces an existing or commented LIBVIRTD_ARGS line, so adding a host again does not duplicate it. The RHEL and SUSE paths are unchanged.