manager: raise level of notices about failed deserialization

This is something that shouldn't happen. If it does, we want to
know about it.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-06-23 19:17:40 -04:00
parent a462478539
commit 62c460c6e2

View file

@ -2610,7 +2610,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
uint32_t id;
if (safe_atou32(val, &id) < 0)
log_debug("Failed to parse current job id value %s", val);
log_notice("Failed to parse current job id value %s", val);
else
m->current_job_id = MAX(m->current_job_id, id);
@ -2618,7 +2618,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
uint32_t n;
if (safe_atou32(val, &n) < 0)
log_debug("Failed to parse installed jobs counter %s", val);
log_notice("Failed to parse installed jobs counter %s", val);
else
m->n_installed_jobs += n;
@ -2626,7 +2626,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
uint32_t n;
if (safe_atou32(val, &n) < 0)
log_debug("Failed to parse failed jobs counter %s", val);
log_notice("Failed to parse failed jobs counter %s", val);
else
m->n_failed_jobs += n;
@ -2635,7 +2635,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
b = parse_boolean(val);
if (b < 0)
log_debug("Failed to parse taint /usr flag %s", val);
log_notice("Failed to parse taint /usr flag %s", val);
else
m->taint_usr = m->taint_usr || b;
@ -2672,7 +2672,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
int fd;
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
log_debug("Failed to parse notify fd: %s", val);
log_notice("Failed to parse notify fd: \"%s\"", val);
else {
m->notify_event_source = sd_event_source_unref(m->notify_event_source);
safe_close(m->notify_fd);
@ -2695,7 +2695,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
int fd;
if (safe_atoi(val, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
log_debug("Failed to parse cgroups agent fd: %s", val);
log_notice("Failed to parse cgroups agent fd: %s", val);
else {
m->cgroups_agent_event_source = sd_event_source_unref(m->cgroups_agent_event_source);
safe_close(m->cgroups_agent_fd);
@ -2706,7 +2706,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
int fd0, fd1;
if (sscanf(val, "%i %i", &fd0, &fd1) != 2 || fd0 < 0 || fd1 < 0 || fd0 == fd1 || !fdset_contains(fds, fd0) || !fdset_contains(fds, fd1))
log_debug("Failed to parse user lookup fd: %s", val);
log_notice("Failed to parse user lookup fd: %s", val);
else {
m->user_lookup_event_source = sd_event_source_unref(m->user_lookup_event_source);
safe_close_pair(m->user_lookup_fds);
@ -2726,7 +2726,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
log_oom();
} else if (!startswith(l, "kdbus-fd=")) /* ignore this one */
log_debug("Unknown serialization item '%s'", l);
log_notice("Unknown serialization item '%s'", l);
}
for (;;) {