Bug 690955

Summary: Mrclone fails due to the replica generation id mismatch
Product: [Retired] 389 Reporter: Noriko Hosoi <nhosoi>
Component: Replication - GeneralAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.2.8CC: amsharma, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 691486 (view as bug list) Environment:
Last Closed: 2015-12-07 17:02:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 639035, 656390, 691486    
Attachments:
Description Flags
git patch file (master) nhosoi: review?, rmeggins: review+

Description Noriko Hosoi 2011-03-25 23:14:22 UTC
Description of problem:

Mrclone (restore per instance) fails due to the replica generation id mismatch.
[..] - WARNING!!: current Instance Config is different from backed up configuration; The backup is restored.
[..] - Restore: Removing staging area /var/lib/dirsrv/slapd-test2/db/../fribak.
[..] NSMMReplicationPlugin - multimaster_be_state_change: replica dc=example,dc=com is coming online; enabling replication
[..] NSMMReplicationPlugin - replica_reload_ruv: Warning: new data for replica dc=example,dc=com does not match the data in the changelog.
 Recreating the changelog file. This could affect replication with replica's  consumers in which case the consumers should be reinitialized.
[..] - Restore finished.

This bug was introduced by this fix (389-ds-base 1.2.8).
commit d05faee48c6844d1b23d29f0770c7e1f339739e0
Author: Noriko Hosoi <nhosoi>
Date:   Thu Jan 13 14:38:39 2011 -0800

    Bug 624442 - MMR: duplicate replica ID
    
    https://bugzilla.redhat.com/show_bug.cgi?id=624442

Comment 1 Noriko Hosoi 2011-03-25 23:29:32 UTC
Created attachment 487691 [details]
git patch file (master)

Description: To fix Bug 624442 - MMR: duplicate replica ID,
_replica_configure_ruv (repl5_replica.c) checks the replica IDs
from changelog, backend, and configuration.  If the id from
config is different, recreate RUV.  

For the mrclone (restore per backend instance) case, replica ID
from the backend is the other master's one.  The value should 
not be used to check if the RUV is recreated or not.  Instead,
it does between the nsds5replicaID from config and the one 
from the changelog.

Comment 3 Noriko Hosoi 2011-03-28 16:37:36 UTC
Reviewed by Rich(Thank you!!!)

Pushed to master.

$ git merge work
Updating 6c98225..c21b037
Fast-forward
 ldap/servers/plugins/replication/repl5_replica.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

$ git push
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1002 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   6c98225..c21b037  master -> master

Cherry-picked commit c21b037b4dab44ba9c48330ce8b3e38c3dfbb656 and pushed to 389-ds-base-1.2.8:
$ git cherry-pick c21b037b4dab44ba9c48330ce8b3e38c3dfbb656
Finished one cherry-pick.
[ds128-local 429574f] Bug 690955 - Mrclone fails due to the replica generation id mismatch
 1 files changed, 3 insertions(+), 1 deletions(-)

$ git push origin ds128-local:389-ds-base-1.2.8
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1008 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   753c550..429574f  ds128-local -> 389-ds-base-1.2.8

Comment 4 Noriko Hosoi 2011-03-28 17:50:55 UTC
Pushed to redhat master and RHEL-6:

[master]
$ git cherry-pick c21b037b4dab44ba9c48330ce8b3e38c3dfbb656
Finished one cherry-pick.
[master-redhat d89a1cd] Bug 690955 - Mrclone fails due to the replica generation id mismatch
 1 files changed, 3 insertions(+), 1 deletions(-)

$ git push redhat master-redhat:master
nhosoi.redhat.com's password: 
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 26.18 KiB, done.
Total 7 (delta 4), reused 2 (delta 0)
hooks/post-receive: line 1: /home/nhosoi/git-hooks/post-receive-email: No such file or directory
error: hooks/post-receive exited with error code 1
To ssh://git.engineering.redhat.com/srv/git/users/rmeggins/ds.git
   6c98225..d89a1cd  master-redhat -> master

[RHEL-6]
$ git cherry-pick c21b037b4dab44ba9c48330ce8b3e38c3dfbb656
Finished one cherry-pick.
[RHEL-6 dee9009] Bug 690955 - Mrclone fails due to the replica generation id mismatch
 1 files changed, 3 insertions(+), 1 deletions(-)

$ git push redhat RHEL-6:RHEL-6
nhosoi.redhat.com's password: 
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 26.17 KiB, done.
Total 7 (delta 4), reused 1 (delta 0)
hooks/post-receive: line 1: /home/nhosoi/git-hooks/post-receive-email: No such file or directory
error: hooks/post-receive exited with error code 1
To ssh://git.engineering.redhat.com/srv/git/users/rmeggins/ds.git
   6b063b8..dee9009  RHEL-6 -> RHEL-6

Comment 5 Amita Sharma 2011-05-09 10:45:39 UTC
mrclone run  100% (10/10)

Hence the bug is VERIFIED.