[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] a17ec4: tests: improve error message when sav
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] a17ec4: tests: improve error message when saving TLS PSK f... |
Date: |
Thu, 21 Apr 2022 18:53:51 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: a17ec44dba741de97e63efcda28852e73fca06dc
https://github.com/qemu/qemu/commit/a17ec44dba741de97e63efcda28852e73fca06dc
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/unit/crypto-tls-psk-helpers.c
Log Message:
-----------
tests: improve error message when saving TLS PSK file fails
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-3-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: dcd23e9cae61f3156155db93ae699d30340158d9
https://github.com/qemu/qemu/commit/dcd23e9cae61f3156155db93ae699d30340158d9
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/libqtest.c
Log Message:
-----------
tests: support QTEST_TRACE env variable
When debugging failing qtests it is useful to be able to turn on trace
output to stderr. The QTEST_TRACE env variable contents get injected
as a '-trace <str>' command line arg
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-4-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 0c2b6c85c99d8d2a957e6637c7cc0fd33f2b0540
https://github.com/qemu/qemu/commit/0c2b6c85c99d8d2a957e6637c7cc0fd33f2b0540
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/libqtest.c
Log Message:
-----------
tests: print newline after QMP response in qtest logs
The QMP commands have a trailing newline, but the response does not.
This makes the qtest logs hard to follow as the next QMP command
appears in the same line as the previous QMP response.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-5-berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 4b2bbca7a0b58475d7ffb2fea05adbe08cde57f8
https://github.com/qemu/qemu/commit/4b2bbca7a0b58475d7ffb2fea05adbe08cde57f8
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/tls.c
Log Message:
-----------
migration: fix use of TLS PSK credentials with a UNIX socket
The migration TLS code has a check mandating that a hostname be
available when starting a TLS session. This is expected when using
x509 credentials, but is bogus for PSK and anonymous credentials
as neither involve hostname validation.
The TLS crdentials object gained suitable error reporting in the
case of TLS with x509 credentials, so there is no longer any need
for the migration code to do its own (incorrect) validation.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-7-berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 19da6edfe87615462e469e77062d841c27514599
https://github.com/qemu/qemu/commit/19da6edfe87615462e469e77062d841c27514599
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests: switch MigrateStart struct to be stack allocated
There's no compelling reason why the MigrateStart struct needs to be
heap allocated. Using stack allocation and static initializers is
simpler.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-8-berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: ffed54f6e51db2685d44f34bb2437aac10314e00
https://github.com/qemu/qemu/commit/ffed54f6e51db2685d44f34bb2437aac10314e00
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests: merge code for UNIX and TCP migration pre-copy tests
The test cases differ only in the URI they provide to the migration
commands, and the ability to set the dirty_ring mode. This code is
trivially merged into a common helper.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-9-berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: b3caa7b55e1ba9d3c02d50baa425f601d091f4cb
https://github.com/qemu/qemu/commit/b3caa7b55e1ba9d3c02d50baa425f601d091f4cb
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests: introduce ability to provide hooks for migration precopy test
There are alot of different scenarios to test with migration due to the
wide number of parameters and capabilities available. To enable sharing
of the basic precopy test scenario, we need to be able to set arbitrary
parameters and capabilities before the migration is initiated, but don't
want to have all this logic in the common helper function. Solve this
by defining two hooks that can be provided by the test case, one before
migration starts and one after migration finishes.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-10-berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 243e006686f51f076536b5e61efbefa8f2e92ab6
https://github.com/qemu/qemu/commit/243e006686f51f076536b5e61efbefa8f2e92ab6
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests: switch migration FD passing test to use common precopy helper
The combination of the start and finish hooks allow the FD passing
code to use the precopy helper
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-11-berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 00fbe7f6add0ac58556e9fe3354d300294e6c3ef
https://github.com/qemu/qemu/commit/00fbe7f6add0ac58556e9fe3354d300294e6c3ef
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M tests/qtest/migration-test.c
Log Message:
-----------
tests: expand the migration precopy helper to support failures
The migration precopy testing helper function always expects the
migration to run to a completion state. There will be test scenarios
for TLS where expect either the client or server to fail the migration.
This expands the helper to cope with these scenarios.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220310171821.3724080-12-berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 83174765da3563794a56fbe24216908f3a5db194
https://github.com/qemu/qemu/commit/83174765da3563794a56fbe24216908f3a5db194
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/channel.c
M migration/migration.c
Log Message:
-----------
migration: Postpone releasing MigrationState.hostname
We used to release it right after migrate_fd_connect(). That's not good
enough when there're more than one socket pair required, because it'll be
needed to establish TLS connection for the rest channels.
One example is multifd, where we copied over the hostname for each channel
but that's actually not needed.
Keeping the hostname until the cleanup phase of migration.
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-2-peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert: Fixup checkpatch error; don't need to check for NULL
around g_free
Commit: 7f692ec79a211d187a4edefa01396bd8ea2d02ef
https://github.com/qemu/qemu/commit/7f692ec79a211d187a4edefa01396bd8ea2d02ef
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/multifd.c
M migration/multifd.h
Log Message:
-----------
migration: Drop multifd tls_hostname cache
The hostname is cached N times, N equals to the multifd channels.
Drop that cache because after previous patch we've got s->hostname
being alive for the whole lifecycle of migration procedure.
Cc: Juan Quintela <quintela@redhat.com>
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-3-peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: ea2faf0c35f0f9d1f3d7c9c88637b9014575e02b
https://github.com/qemu/qemu/commit/ea2faf0c35f0f9d1f3d7c9c88637b9014575e02b
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/ram.c
Log Message:
-----------
migration: Add pss.postcopy_requested status
This boolean flag shows whether the current page during migration is triggered
by postcopy or not. Then in ram_save_host_page() and deeper stack we'll be
able to have a reference on the priority of this page.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-4-peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: f444eeda715d2307d45890eb488f309eede99250
https://github.com/qemu/qemu/commit/f444eeda715d2307d45890eb488f309eede99250
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/migration.c
M migration/migration.h
M migration/multifd.c
M migration/multifd.h
Log Message:
-----------
migration: Move migrate_allow_multifd and helpers into migration.c
This variable, along with its helpers, is used to detect whether multiple
channel will be supported for migration. In follow up patches, there'll be
other capability that requires multi-channels. Hence move it outside multifd
specific code and make it public. Meanwhile rename it from "multifd" to
"multi_channels" to show its real meaning.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-5-peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 929068ec2f2fc1e3d8585e29709f5c5ef8f9317b
https://github.com/qemu/qemu/commit/929068ec2f2fc1e3d8585e29709f5c5ef8f9317b
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/ram.c
M migration/ram.h
Log Message:
-----------
migration: Export ram_load_postcopy()
Will be reused in postcopy fast load thread.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-6-peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: a39e933962314c9949d71c25f234e8a3dddc4b25
https://github.com/qemu/qemu/commit/a39e933962314c9949d71c25f234e8a3dddc4b25
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration: Move channel setup out of postcopy_try_recover()
We used to use postcopy_try_recover() to replace migration_incoming_setup() to
setup incoming channels. That's fine for the old world, but in the new world
there can be more than one channels that need setup. Better move the channel
setup out of it so that postcopy_try_recover() only handles the last phase of
switching to the recovery phase.
To do that in migration_fd_process_incoming(), move the postcopy_try_recover()
call to be after migration_incoming_setup(), which will setup the channels.
While in migration_ioc_process_incoming(), postpone the recover() routine right
before we'll jump into migration_incoming_process().
A side benefit is we don't need to pass in QEMUFile* to postcopy_try_recover()
anymore. Remove it.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-7-peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 08401c0426bc1a5ce4609afd1cda5dd39abbf9fa
https://github.com/qemu/qemu/commit/08401c0426bc1a5ce4609afd1cda5dd39abbf9fa
Author: Peter Xu <peterx@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/migration.c
M migration/migration.h
M migration/savevm.c
Log Message:
-----------
migration: Allow migrate-recover to run multiple times
Previously migration didn't have an easy way to cleanup the listening
transport, migrate recovery only allows to execute once. That's done with a
trick flag in postcopy_recover_triggered.
Now the facility is already there.
Drop postcopy_recover_triggered and instead allows a new migrate-recover to
release the previous listener transport.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220331150857.74406-8-peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: f912ec5b2d65644116ff496b58d7c9145c19e4c0
https://github.com/qemu/qemu/commit/f912ec5b2d65644116ff496b58d7c9145c19e4c0
Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/ram.c
Log Message:
-----------
migration: Fix operator type
Clang spotted an & that should have been an &&; fix it.
Reported by: David Binderman / https://gitlab.com/dcb
Fixes: 65dacaa04fa ("migration: introduce save_normal_page()")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220406102515.96320-1-dgilbert@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: 552de79bfdd5e9e53847eb3c6d6e4cd898a4370e
https://github.com/qemu/qemu/commit/552de79bfdd5e9e53847eb3c6d6e4cd898a4370e
Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/migration.c
Log Message:
-----------
migration: Read state once
The 'status' field for the migration is updated normally using
an atomic operation from the migration thread.
Most readers of it aren't that careful, and in most cases it doesn't
matter.
In query_migrate->fill_source_migration_info the 'state'
is read twice; the first time to decide which state fields to fill in,
and then secondly to copy the state to the status field; that can end up
with a status that's inconsistent; e.g. setting up the fields
for 'setup' and then having an 'active' status. In that case
libvirt gets upset by the lack of ram info.
The symptom is:
libvirt.libvirtError: internal error: migration was active, but no RAM info
was set
Read the state exactly once in fill_source_migration_info.
This is a possible fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=2074205
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220413113329.103696-1-dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Commit: a74782936dc6e979ce371dabda4b1c05624ea87f
https://github.com/qemu/qemu/commit/a74782936dc6e979ce371dabda4b1c05624ea87f
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2022-04-21 (Thu, 21 Apr 2022)
Changed paths:
M migration/channel.c
M migration/migration.c
M migration/migration.h
M migration/multifd.c
M migration/multifd.h
M migration/ram.c
M migration/ram.h
M migration/savevm.c
M migration/tls.c
M tests/qtest/libqtest.c
M tests/qtest/migration-test.c
M tests/unit/crypto-tls-psk-helpers.c
Log Message:
-----------
Merge tag 'pull-migration-20220421a' of https://gitlab.com/dagrh/qemu into
staging
V2: Migration pull 2022-04-21
Dan: Test fixes and improvements (TLS mostly)
Peter: Postcopy improvements
Me: Race fix for info migrate, and compilation fix
V2:
Fixed checkpatch nit of unneeded NULL check
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAmJhpLIACgkQBRYzHrxb
# /edCPQ//dITFWStcsvon8gBBRWY/ekz/EdmWd2KFUp1r/yzopXExW5Gy+MzzTEwk
# axf7s991eyjta1gU0IYCzWcuR36LE8YsZRgDlOhttZ/674ZnX5ZIJBggwDKE/bYE
# IEHd8qsHy6oV8UIFvBQ6wvIDJmH+8gOwnPUzOO9Ek2UkSgBGsptZ8d6Hi0hTzYFB
# omhgc2eO3XQUlxM+8MwlrZU84QkxnBn2g7nVgDQyRokAou46Yf8FD/bWv3CKAdO+
# Ph+4XjBiddBFYUtf4XWSTvVfi23kij1k/4bjH3zaocE86gQ6CUteImFtowwr6N95
# sJl1EXBOtz0BP5xONqkywpWi1Qqg+mecF4KrS4XAHszaUkaj3sTFOyItwlTzZErF
# /2dZRsPRs9fTcjjzpOe/CKoGr+CcyZdxY1qbCNfHaJagdxytN2qxOaneTUbKYUE5
# n4Om9zxDS2esZCnkx26e2wylJ1wzKZBbjsoKYQA4IGaQ6Qz8Zciea0tApwhgyVjs
# KHcYtvScPLxmEEKgzDap6B7fJxyaOg3KNX+0XzLLpLS1oaeqwvSIQM/QMMrnwGxs
# uA1LI2uqlQBitaJOhgLMnNH4ze27HC3DM4OWAE+iOhpD+LNAWstjWraNNXbG4sSj
# 55ndJHJxOCjPlFY4dB/ytUbUo7XBkztCR4c1+I+lSUbMTq3KuUg=
# =M5sx
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 21 Apr 2022 11:38:42 AM PDT
# gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
[full]
* tag 'pull-migration-20220421a' of https://gitlab.com/dagrh/qemu:
migration: Read state once
migration: Fix operator type
migration: Allow migrate-recover to run multiple times
migration: Move channel setup out of postcopy_try_recover()
migration: Export ram_load_postcopy()
migration: Move migrate_allow_multifd and helpers into migration.c
migration: Add pss.postcopy_requested status
migration: Drop multifd tls_hostname cache
migration: Postpone releasing MigrationState.hostname
tests: expand the migration precopy helper to support failures
tests: switch migration FD passing test to use common precopy helper
tests: introduce ability to provide hooks for migration precopy test
tests: merge code for UNIX and TCP migration pre-copy tests
tests: switch MigrateStart struct to be stack allocated
migration: fix use of TLS PSK credentials with a UNIX socket
tests: print newline after QMP response in qtest logs
tests: support QTEST_TRACE env variable
tests: improve error message when saving TLS PSK file fails
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/4ba256583168...a74782936dc6
- [Qemu-commits] [qemu/qemu] a17ec4: tests: improve error message when saving TLS PSK f...,
Richard Henderson <=