Bug 1163902 - fix replicate_now instructions
Summary: fix replicate_now instructions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: Doc-administration-guide
Version: 10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Marc Muehlfeld
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-13 16:39 UTC by Rich Megginson
Modified: 2017-01-17 08:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 08:24:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rich Megginson 2014-11-13 16:39:14 UTC
Description of problem:
https://access.redhat.com/documentation/en-US/Red_Hat_Directory_Server/9.0/html/Administration_Guide/Managing_Replication-Forcing_Replication_Updates.html#Forcing_Replication_Updates-Forcing_Replication_Updates_from_the_Command_Line

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

The instructions need to be updated to use openldap ldapsearch:

ldapsearch -x -LLL -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \
    -w ${SUP_MGRPW} -b "cn=mapping tree,cn=config" \
    "(&(objectclass=nsds5replicationagreement)(nsDS5ReplicaHost=${MY_HOST})(nsDS5ReplicaPort=${MY_PORT}))" \
    dn > /tmp/$$.dn

cp /tmp/$$.dn /tmp/$$.off
cp /tmp/$$.dn /tmp/$$.on

cat >> /tmp/$$.off <<EOF
changetype: modify
replace: nsds5ReplicaEnabled
nsds5ReplicaEnabled: off
EOF

cat >> /tmp/$$.on <<EOF
changetype: modify
replace: nsds5ReplicaEnabled
nsds5ReplicaEnabled: on
EOF

ldapmodify -x -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \
    -w ${SUP_MGRPW} -f /tmp/$$.off

sleep 1

ldapmodify -x -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \
    -w ${SUP_MGRPW} -f /tmp/$$.on

rm -f /tmp/$$.*

Comment 2 Viktor Ashirov 2017-01-10 10:46:26 UTC
Hi Marc,

script doesn't work. 
Openldap ldapsearch outputs empty line after search, unlike mozldap version, so this part:

ldapsearch -x -LLL -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \
    -w ${SUP_MGRPW} -b "cn=mapping tree,cn=config" \
    "(&(objectclass=nsds5replicationagreement) \
       (nsDS5ReplicaHost=${MY_HOST}) \
       (nsDS5ReplicaPort=${MY_PORT}))" \
    dn > /tmp/$$.dn

Should be changed to:
ldapsearch -x -LLL -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \
    -w ${SUP_MGRPW} -b "cn=mapping tree,cn=config" \
    "(&(objectclass=nsds5replicationagreement) \
       (nsDS5ReplicaHost=${MY_HOST}) \
       (nsDS5ReplicaPort=${MY_PORT}))" \
    -o ldif-wrap=no dn | grep "^dn: " > /tmp/$$.dn

Line 
cat >gt; /tmp/$$.on<lt;EOF

should be
cat >> /tmp/$$.on <<EOF


With above changes script does work.

Comment 6 Marc Muehlfeld 2017-01-17 08:24:24 UTC
The update is now available on the Customer Portal.


Note You need to log in before you can comment on or make changes to this bug.