Skip to content

Commit

Permalink
Fix: cib: Increased paranoia when peer updates fail to apply in compa…
Browse files Browse the repository at this point in the history
…tability mode

This is caused by either:
- fingerprint mismatches between the actual and expected results, or
- attrd (the new one) doing some local writes which bumped the local
  version past the DC's (which is running the old cib).

Solution is to grab a new copy from the DC each time.
  • Loading branch information
beekhof committed Oct 13, 2015
1 parent 7906df9 commit a3afaef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cib/messages.c
Expand Up @@ -369,6 +369,7 @@ cib_server_process_diff(const char *op, int options, const char *section, xmlNod
}

rc = cib_process_diff(op, options, section, req, input, existing_cib, result_cib, answer);
crm_trace("result: %s (%d), %s", pcmk_strerror(rc), rc, cib_is_master?"master":"slave");

if (rc == -pcmk_err_diff_resync && cib_is_master == FALSE) {
free_xml(*result_cib);
Expand All @@ -380,6 +381,13 @@ cib_server_process_diff(const char *op, int options, const char *section, xmlNod
if (options & cib_force_diff) {
crm_warn("Not requesting full refresh in R/W mode");
}

} else if(rc != pcmk_ok && cib_legacy_mode()) {
crm_warn("Something went wrong in compatibility mode, requesting full refresh");
xml_log_patchset(LOG_INFO, __FUNCTION__, input);
free_xml(*result_cib);
*result_cib = NULL;
send_sync_request(NULL);
}

return rc;
Expand Down

0 comments on commit a3afaef

Please sign in to comment.