From: Juan Quintela <quintela@redhat.com>
To: Tejus GK <tejus.gk@nutanix.com>
Cc: qemu-devel@nongnu.org, peterx@redhat.com, leobras@redhat.com,
farosas@suse.de
Subject: Re: [PATCH v5 2/2] migration: Update error description outside migration.c
Date: Wed, 04 Oct 2023 14:43:44 +0200 [thread overview]
Message-ID: <87leci36db.fsf@secure.mitica> (raw)
In-Reply-To: <68db0be7-694a-44da-8513-e761109d5902@nutanix.com> (Tejus GK's message of "Wed, 4 Oct 2023 17:45:06 +0530")
Tejus GK <tejus.gk@nutanix.com> wrote:
> On 04/10/23 1:53 pm, Juan Quintela wrote:
>> Tejus GK <tejus.gk@nutanix.com> wrote:
>>> On 03/10/23 6:14 pm, Juan Quintela wrote:
>>>> Tejus GK <tejus.gk@nutanix.com> wrote:
>>>>> A few code paths exist in the source code,where a migration is
>>>>> marked as failed via MIGRATION_STATUS_FAILED, but the failure happens
>>>>> outside of migration.c
>>>>>
>>>>> In such cases, an error_report() call is made, however the current
>>>>> MigrationState is never updated with the error description, and hence
>>>>> clients like libvirt never know the actual reason for the failure.
>>>>>
>>>>> This patch covers such cases outside of migration.c and updates the
>>>>> error description at the appropriate places.
>>>>>
>>>>> Acked-by: Peter Xu <peterx@redhat.com>
>>>>> Signed-off-by: Tejus GK <tejus.gk@nutanix.com>
>>>> Reviewed-by: Juan Quintela <quintela@redhat.com>
>>>> Queued.
>>> Thanks, will be sending out a patch with the "Reviewed by" trailer added.
>> Send the other one. This one is already queued.
>> I think that the error_report() thing, you need to review more
>> things
>> than the one in this patch.
>
> Not sure what you mean here? The only other patch I have on the list
> apart from this one is
> https://lists.gnu.org/archive/html/qemu-devel/2023-10/msg00280.html ,
> which you marked as reviewed as well.
>>
>>>>
>>>>> return ret;
>>>>> }
>>>>> }
>>>>> @@ -389,8 +390,8 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
>>>>> vmdesc_loop);
>>>>> }
>>>>> if (ret) {
>>>>> - error_report("Save of field %s/%s failed",
>>>>> - vmsd->name, field->name);
>>>>> + error_setg(errp, "Save of field %s/%s failed",
>>>>> + vmsd->name, field->name);
>>>> Same here.
>>> You're right, I'm only setting it here and reporting it eventually in
>>> savevm.c. The trivial solution for this would have been directly doing
>>> a migrate_set_error() here, but that ended up breaking the build for
>>> the unit test test-vmstate.c
>> What was the error? Because the problem could be on the test.
> This is what I keep getting.
>
> FAILED: tests/unit/test-vmstate
> cc -m64 -mcx16 -o tests/unit/test-vmstate
> tests/unit/test-vmstate.p/test-vmstate.c.o -Wl,--as-needed
> -Wl,--no-undefined -pie -Wl,--whole-archive -Wl,--start-group
> libevent-loop-base.a libqom.fa libio.fa libcrypto.fa libauthz.fa
> -Wl,--no-whole-archive -fstack-protector-strong -Wl,-z,relro
> -Wl,-z,now -Wl,--warn-common libqemuutil.a
> subprojects/libvhost-user/libvhost-user-glib.a
> subprojects/libvhost-user/libvhost-user.a libmigration.fa libqom.fa
> libio.fa libcrypto.fa libauthz.fa /usr/lib64/libz.so
> /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so
> /usr/lib64/libglib-2.0.so /usr/lib64/libgmodule-2.0.so -pthread -lm
> /usr/lib64/libpixman-1.so -Wl,--end-group
> libmigration.fa.p/migration_vmstate.c.o: In function `vmstate_save_state_v':
> /rpmbuild/SOURCES/qemu/build/../migration/vmstate.c:333: undefined
> reference to `migrate_get_current'
> /rpmbuild/SOURCES/qemu/build/../migration/vmstate.c:344: undefined
> reference to `migrate_set_error'
> collect2: error: ld returned 1 exit status
>
> I tried to figure out how the dependencies work out for unit test, but
> found no luck with that.
Ouch, that again.
I think that I know how to fix that.
Will take a look.
Later, Juan.
next prev parent reply other threads:[~2023-10-04 12:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 6:55 [PATCH v5 0/2] migration: Update error description outside migration.c Tejus GK
2023-10-03 6:55 ` [PATCH v5 1/2] migration/vmstate: Introduce vmstate_save_state_with_err Tejus GK
2023-10-03 12:39 ` Juan Quintela
2023-10-03 6:55 ` [PATCH v5 2/2] migration: Update error description outside migration.c Tejus GK
2023-10-03 12:44 ` Juan Quintela
2023-10-04 4:28 ` Tejus GK
2023-10-04 8:23 ` Juan Quintela
2023-10-04 12:15 ` Tejus GK
2023-10-04 12:43 ` Juan Quintela [this message]
2023-10-04 13:37 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87leci36db.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=farosas@suse.de \
--cc=leobras@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tejus.gk@nutanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).