Fix iprop against legacy master with full log

When the master's log has all entries from version 1 to now, and no
uber entry (legacy master), then new slaves will not pull version 1,
because their uber record has version 1.

The fix is to force the uber version to 0 always, and avoid adding a
truncate nop when doing a full prop.  The uber record now records the
database version even in the absence of any other log entries so that
we know what to pull going forward.
This commit is contained in:
Viktor Dukhovni
2016-06-08 21:26:43 +00:00
parent 7d9fcb46b9
commit ffd0dda237
5 changed files with 110 additions and 55 deletions

View File

@@ -157,7 +157,7 @@ init(struct init_options *opt, int argc, char **argv)
krb5_warn(context, ret, "hdb_open");
return 0;
}
ret = kadm5_log_reinit(kadm_handle);
ret = kadm5_log_reinit(kadm_handle, 0);
if (ret)
krb5_err(context, 1, ret, "Failed iprop log initialization");
kadm5_log_end(kadm_handle);