daemon: Add some error prefixing around reloading
I was hitting an error during sysroot loading while playing with deployment staging, and it wasn't initially clear which phase was causing it (a client-initated reload versus one we do before or after deploying). Add some error prefixing. Closes: #1355 Approved by: jlebon
This commit is contained in:
parent
506910d930
commit
0dfe0de0e0
@ -450,7 +450,10 @@ handle_reload (RPMOSTreeSysroot *object,
|
||||
|
||||
out:
|
||||
if (local_error)
|
||||
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
|
||||
{
|
||||
g_prefix_error (&local_error, "Handling reload: ");
|
||||
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -482,7 +485,10 @@ handle_reload_config (RPMOSTreeSysroot *object,
|
||||
rpmostree_sysroot_complete_reload_config (object, invocation);
|
||||
out:
|
||||
if (local_error)
|
||||
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
|
||||
{
|
||||
g_prefix_error (&local_error, "Handling config reload: ");
|
||||
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -746,6 +752,7 @@ sysroot_reload_ostree_configs_and_deployments (RpmostreedSysroot *self,
|
||||
gboolean
|
||||
rpmostreed_sysroot_reload (RpmostreedSysroot *self, GError **error)
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR ("Sysroot reload", error);
|
||||
return sysroot_reload_ostree_configs_and_deployments (self, NULL, error);
|
||||
}
|
||||
|
||||
|
@ -331,6 +331,8 @@ transaction_execute_done_cb (GObject *source_object,
|
||||
const char *error_message = NULL;
|
||||
gboolean success;
|
||||
GError *local_error = NULL;
|
||||
GError **error = &local_error;
|
||||
GLNX_AUTO_PREFIX_ERROR ("During txn completion", error);
|
||||
|
||||
success = g_task_propagate_boolean (G_TASK (result), &local_error);
|
||||
if (success)
|
||||
|
Loading…
Reference in New Issue
Block a user