SDP-797

clouie (Catherine Louie)
Catherine Louie created this job , modified by C. Thomas Tyler
Closed
sync_replica.sh to maintain offline_db on a 'ham' replica.

The sdp_sync.sh script maintains the offline_db on a regular
an HA that uses the first form of the journalPrefix (per
the journalPrefix standard).  That form is: /p4/N/checkpoints/p4_N

Minor adjustment is needed for this script to maintain the
offline_db on a 'ham' replica, a metadata-only HA relpica
with lbr.replication=shared that shares /hxdepots over NFS
with its P4TARGET server. replica that uses the second form of
the journaPrefix.  That form is:

/p4/N/checkpoints.<ShortServerID>/p4_N.<ShortServerID>

Adjustments needed:
* On a ham replica, we don't need the rsync, due to the NFS
sharing. So if lbr.replication=1, skip the rsync.
* Load the latest checkpoint taken on the master (and in the
first form of the checkpoints direcotry) into the local
offline_db of the standby.

See also: SDP-676
29520Enhanced sync_replica.sh to support operation on a 'ham'
type replica (HA, Metadata-only). A 'ham' type replica
replicates only metadata, and shares the /hxdepots volume
(via NFS) with its target server.

In this configuration, the SHAREDDATA=TRUE value is set,
and this corresponds to a p4d configuration setting for
the replica of lbr.replication=shared.

In this configuration, the journalPrefix value of the
replica server will differ from that of its target
server.  For example, the commit server will may have
the First Form jour the journalPrefix, while an HA
of the commit will have the Second Form.  See
'The journalPrefix Standard':

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/doc/SDP_Guide.Unix.html#_the_journalprefix_standard

As another example, for an edge server and HA of that
edge, both servers will use the Second Form of the
journalPrefix, the form which incorporates a shortened
form of the ServerID into the journalPrefix value. But
since the ServerIDs are different, the actual journalPrefix
values will be different, even though both are of the
Second Form.

The common pattern is that, when configured for NFS sharing,
the sync_replica.sh script should use the journalPrefix
of its target server when determining where to look for
a checkpoint and numbered journal to load into the offline_db.

#review @mark_zinthefer @robert_cowham
29576Enhanced sync_replica.sh to support operation on a 'ham'
type replica (HA, Metadata-only). A 'ham' type replica
replicates only metadata, and shares the /hxdepots volume
(via NFS) with its target server.

In this configuration, the SHAREDDATA=TRUE value is set,
and this corresponds to a p4d configuration setting for
the replica of lbr.replication=shared.

In this configuration, the journalPrefix value of the
replica server will differ from that of its target
server.  For example, the commit server will may have
the First Form jour the journalPrefix, while an HA
of the commit will have the Second Form.  See
'The journalPrefix Standard':

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/doc/SDP_Guide.Unix.html#_the_journalprefix_standard

As another example, for an edge server and HA of that
edge, both servers will use the Second Form of the
journalPrefix, the form which incorporates a shortened
form of the ServerID into the journalPrefix value. But
since the ServerIDs are different, the actual journalPrefix
values will be different, even though both are of the
Second Form.

The common pattern is that, when configured for NFS sharing,
the sync_replica.sh script should use the journalPrefix
of its target server when determining where to look for
a checkpoint and numbered journal to load into the offline_db.

#review @mark_zinthefer @robert_cowham
29518Enhanced sync_replica.sh to support operation on a 'ham'
type replica (HA, Metadata-only). A 'ham' type replica
replicates only metadata, and shares the /hxdepots volume
(via NFS) with its target server.

In this configuration, the SHAREDDATA=TRUE value is set,
and this corresponds to a p4d configuration setting for
the replica of lbr.replication=shared.

In this configuration, the journalPrefix value of the
replica server will differ from that of its target
server.  For example, the commit server will may have
the First Form jour the journalPrefix, while an HA
of the commit will have the Second Form.  See
'The journalPrefix Standard':

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/doc/SDP_Guide.Unix.html#_the_journalprefix_standard

As another example, for an edge server and HA of that
edge, both servers will use the Second Form of the
journalPrefix, the form which incorporates a shortened
form of the ServerID into the journalPrefix value. But
since the ServerIDs are different, the actual journalPrefix
values will be different, even though both are of the
Second Form.

The common pattern is that, when configured for NFS sharing,
the sync_replica.sh script should use the journalPrefix
of its target server when determining where to look for
a checkpoint and numbered journal to load into the offline_db.

#review-29520 @mark_zinthefer @robert_cowham
  • Details
  • Comments -
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
Catherine Louie
Reported Date
Modified By
C. Thomas Tyler
Modified Date
Owned By
tom_tyler
Component
core-unix
Type
Feature