Skip to content

Commit 1173c03

Browse files
authored
k8s extension fix for NFS (#2407)
* Added sync and check for the database create checkpoint file in the swapLocks.sh Signed-off-by: abhisbyk <abhishek.by.kumar@oracle.com> * Add currect date in the database checkpoint file Signed-off-by: abhisbyk <abhishek.by.kumar@oracle.com> * Added echo, simple command is not working Signed-off-by: abhisbyk <abhishek.by.kumar@oracle.com> * Added echo, simple command is not working Signed-off-by: abhisbyk <abhishek.by.kumar@oracle.com>
1 parent b1b3ca6 commit 1173c03

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

OracleDatabase/SingleInstance/dockerfiles/19.3.0/runOracle.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ else
264264
# Check whether database is successfully created
265265
if "$ORACLE_BASE"/"$CHECK_DB_FILE"; then
266266
# Create a checkpoint file if database is successfully created
267-
touch "$ORACLE_BASE"/oradata/.${ORACLE_SID}"${CHECKPOINT_FILE_EXTN}"
267+
# Populate the checkpoint file with the current date to avoid timing issue when using NFS persistence in multi-replica mode
268+
echo "$(date -Iseconds)" > "$ORACLE_BASE"/oradata/.${ORACLE_SID}"${CHECKPOINT_FILE_EXTN}"
268269
fi
269270

270271
# Move database operational files to oradata

OracleDatabase/SingleInstance/dockerfiles/21.3.0/runOracle.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ else
282282
# Check whether database is successfully created
283283
if "$ORACLE_BASE"/"$CHECK_DB_FILE"; then
284284
# Create a checkpoint file if database is successfully created
285-
touch "$ORACLE_BASE"/oradata/.${ORACLE_SID}"${CHECKPOINT_FILE_EXTN}"
285+
# Populate the checkpoint file with the current date to avoid timing issue when using NFS persistence in multi-replica mode
286+
echo "$(date -Iseconds)" > "$ORACLE_BASE"/oradata/.${ORACLE_SID}"${CHECKPOINT_FILE_EXTN}"
286287
fi
287288

288289
# Move database operational files to oradata

0 commit comments

Comments
 (0)