Tejus GK <tejus...@nutanix.com> wrote:
> On 03/10/23 6:14 pm, Juan Quintela wrote:
>> Tejus GK <tejus...@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 <pet...@redhat.com>
>>> Signed-off-by: Tejus GK <tejus...@nutanix.com>
>> Reviewed-by: Juan Quintela <quint...@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.

>> 
>>>               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.

>> 
>>>                       if (vmsd->post_save) {
>>>                           vmsd->post_save(opaque);
>>>                       }
>> So, I am wondering if it could be better to just report the error in
>> a
>> single place for migration, and set it whenever we need it?
> Yes, that would be very convenient, for all the errors to be reported
> in lets say migration.c. Though that'd also require all the subsystems
> under migration.c to properly propagate the errors.

Yeap, it requires auditing all the entry points, but will make easier to
know when we just need to set the error, the system will do the rest.

Thanks, Juan.


Reply via email to