Skip to content

Commit

Permalink
Fix: attrd: properly write attributes for peers once uuid is discovered
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvossel committed Mar 4, 2015
1 parent 460fffe commit b22b1fe
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions attrd/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,12 @@ write_attribute(attribute_t *a)
crm_notice("Update error (peer not found): %s[%s]=%s failed (host=%p)",
v->nodename, a->id, v->current, peer);
continue;
} else if (peer->uuid == NULL) {
/* If the peer is found, but its uuid is unknown, defer write */
a->unknown_peer_uuids = TRUE;
crm_notice("Update error (unknown peer uuid, retry will be attempted once uuid is discovered): %s[%s]=%s failed (host=%p)",
v->nodename, a->id, v->current, peer);
continue;
}

/* If we're just learning the peer's node id, remember it */
Expand All @@ -874,13 +880,6 @@ write_attribute(attribute_t *a)
continue;
}

/* If the peer is found, but its uuid is unknown, defer write */
if (peer->uuid == NULL) {
a->unknown_peer_uuids = FALSE; /* bug? should this be TRUE? */
crm_notice("Update error (unknown peer uuid, retry will be attempted once uuid is discovered): %s[%s]=%s failed (host=%p)", v->nodename, a->id, v->current, peer);
continue;
}

/* Add this value to status update XML */
crm_debug("Update: %s[%s]=%s (%s %u %u %s)", v->nodename, a->id,
v->current, peer->uuid, peer->id, v->nodeid, peer->uname);
Expand Down

0 comments on commit b22b1fe

Please sign in to comment.