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:
Colin Walters 2018-05-02 14:44:54 +00:00 committed by Atomic Bot
parent 506910d930
commit 0dfe0de0e0
2 changed files with 11 additions and 2 deletions

View File

@ -450,7 +450,10 @@ handle_reload (RPMOSTreeSysroot *object,
out: out:
if (local_error) if (local_error)
{
g_prefix_error (&local_error, "Handling reload: ");
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error)); g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
}
return TRUE; return TRUE;
} }
@ -482,7 +485,10 @@ handle_reload_config (RPMOSTreeSysroot *object,
rpmostree_sysroot_complete_reload_config (object, invocation); rpmostree_sysroot_complete_reload_config (object, invocation);
out: out:
if (local_error) if (local_error)
{
g_prefix_error (&local_error, "Handling config reload: ");
g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error)); g_dbus_method_invocation_take_error (invocation, g_steal_pointer (&local_error));
}
return TRUE; return TRUE;
} }
@ -746,6 +752,7 @@ sysroot_reload_ostree_configs_and_deployments (RpmostreedSysroot *self,
gboolean gboolean
rpmostreed_sysroot_reload (RpmostreedSysroot *self, GError **error) rpmostreed_sysroot_reload (RpmostreedSysroot *self, GError **error)
{ {
GLNX_AUTO_PREFIX_ERROR ("Sysroot reload", error);
return sysroot_reload_ostree_configs_and_deployments (self, NULL, error); return sysroot_reload_ostree_configs_and_deployments (self, NULL, error);
} }

View File

@ -331,6 +331,8 @@ transaction_execute_done_cb (GObject *source_object,
const char *error_message = NULL; const char *error_message = NULL;
gboolean success; gboolean success;
GError *local_error = NULL; 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); success = g_task_propagate_boolean (G_TASK (result), &local_error);
if (success) if (success)