Skip to content

Commit 1cf7f53

Browse files
committed
Merge branch 'ords_bugs' into 'master'
Ords Github bugs See merge request rac-docker-dev/oracle-database-operator!248
2 parents 915dfb2 + c763f2e commit 1cf7f53

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

apis/database/v1alpha1/oraclerestdataservice_webhook.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ func (r *OracleRestDataService) ValidateCreate() error {
112112
}
113113
}
114114

115+
// Validating databaseRef and ORDS kind name not to be same
116+
if r.Spec.DatabaseRef == r.Name {
117+
allErrs = append(allErrs,
118+
field.Forbidden(field.NewPath("Name"),
119+
"cannot be same as DatabaseRef: " + r.Spec.DatabaseRef))
120+
121+
}
122+
115123
if len(allErrs) == 0 {
116124
return nil
117125
}

commons/database/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ const UninstallORDSCMD string = "\numask 177" +
364364

365365
const GetORDSStatus string = "curl -sSkv -k -X GET https://localhost:8443/ords/_/db-api/stable/metadata-catalog/"
366366

367-
const ValidateAdminPassword string = "conn sys/%s@${ORACLE_SID} as sysdba\nshow user"
367+
const ValidateAdminPassword string = "conn sys/\\\"%s\\\"@${ORACLE_SID} as sysdba\nshow user"
368368

369369
const ReconcileError string = "ReconcileError"
370370

controllers/database/oraclerestdataservice_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ func (r *OracleRestDataServiceReconciler) validateSIDBReadiness(m *dbapi.OracleR
370370
log.Info(eventMsg)
371371
return requeueY, sidbReadyPod
372372
} else {
373+
eventMsg := "login attempt failed for database admin password in secret " + m.Spec.AdminPassword.SecretName
374+
log.Info(eventMsg)
373375
return requeueY, sidbReadyPod
374376
}
375377

0 commit comments

Comments
 (0)