[libvirt] [PATCH 0/2] Add support of SASL authentication for QEMU migration

Sahid Orentino Ferdjaoui sahid.ferdjaoui at gmail.com
Sun Apr 13 11:52:46 UTC 2014


This is a first contribution, I have tried to follow the most as possible rules
marked in HACKING. I hope this commit will be conform with the specifications.

  make check              OK
  make syntax-check       OK
  make -C tests valgrind  OK

Currently with peer to peer migration provided by virDomainMigrateToURI, QEMU
migration code uses virConnectOpen() which means that all authentication
callbacks are disabled. Since no auth callback is present, SASL doesn't find
any mechanisms and thus auth fails with the error:

  "authentication failed: Failed to start SASL negotiation: -4 (SASL(-4):
   no mechanism available: No worthy mechs found)"

The PATCH 1/2 adds a new example to illustrate how to use peer to peer
migration. This patch is not necessary to fix the problem and can be removed.
It is provided to help reviewers by avoiding the necessary to create code
that use this feature. Also as it demonstrates the performance of libvirt I have
thought it could be interesting to keep it for new users.

The PATCH 2/2 fixes the problem by configuring QEMU migration code to
use virConnectOpenAuth instead of virConnectOpen. Indeed this function will call
if necessary a callback responsible to fetching credentials.

Sahid Orentino Ferdjaoui (2):
  Add a new example to illustrate domain migration
  Add support for QEMU migration to use SASL authentication

 .gitignore                       |  1 +
 Makefile.am                      |  2 +-
 configure.ac                     |  1 +
 examples/dommigrate/Makefile.am  | 26 ++++++++++++++
 examples/dommigrate/dommigrate.c | 78 ++++++++++++++++++++++++++++++++++++++++
 libvirt.spec.in                  |  3 +-
 src/qemu/qemu_migration.c        | 14 +++++++-
 7 files changed, 122 insertions(+), 3 deletions(-)
 create mode 100644 examples/dommigrate/Makefile.am
 create mode 100644 examples/dommigrate/dommigrate.c

-- 
1.9.0




More information about the libvir-list mailing list