Skip to content

ORDS CRD only accepts int64 for configuration settings of type Duration, and doesn't seem to generate valid config #188

@Thomas141100

Description

@Thomas141100

Hello all,

When trying to configure my ORDS instance, I noticed that the configuration settings of type Duration used in our traditional ORDS installations were not accepted by the ORDS CRD in Kube.

Example of refused settings : db.invalidPoolTimeout: 15m, security.jwt.allowed.age: 2h (full list of Duration settings here)

$ k apply -f output.yaml
The OrdsSrvs "default" is invalid: 
* spec.poolSettings[0].security.jwt.allowed.age: Invalid value: "string": spec.poolSettings[0].security.jwt.allowed.age in body must be of type integer: "string"
* spec.globalSettings.db.invalidPoolTimeout: Invalid value: "string": spec.globalSettings.db.invalidPoolTimeout in body must be of type integer: "string"

After looking at the code it looks like the only value accepted for duration parameters is in nanoseconds 🫤
I tried with a config similar to this example, which isn't optimal because not very readable with values in seconds, minutes, hours (sometimes days) not understandable at first glance :

apiVersion: database.oracle.com/v4
kind: OrdsSrvs
metadata:
  name: default
  namespace: default
spec:
  image: container-registry.oracle.com/database/ords:25.1.1
  forceRestart: true
  encPrivKey:
    secretName: default-prvkey
    passwordKey: privateKey
  globalSettings:
    db.invalidPoolTimeout: 900000000000 # 15min
  poolSettings:
    - poolName: default
      autoUpgradeORDS: false
      autoUpgradeAPEX: false
      restEnabledSql.active: true
      plsql.gateway.mode: direct
      db.connectionType: tns
      db.tnsAliasName: default
      tnsAdminSecret:
        secretName: tnsnames
      db.username: ords_public_user
      db.secret:
        secretName: default
        passwordKey: default
      jdbc.InactivityTimeout: 1800
      security.jwt.allowed.age: 7200000000000 # 2h

The final issue seems that even when putting a value in nanosecondes validated by the CRD, this doesn't seem to generate a correct configuration for ORDS.
This is what I find in the logs, with the configuration above : WARNING Ignoring syntactically incorrect time duration value for setting: db.invalidPoolTimeout

Full startup logs of container bellow (the same warning is visible in initContainer)

NOTE: DEBUG PORT: 8000  ,  DEBUG SUSPEND: n 
CWD=/opt/oracle/ords
ORDS_HOME=/opt/oracle/ords
java -Doracle.dbtools.cmdline.home=/opt/oracle/ords -Djava.awt.headless=true -Dnashorn.args=--no-deprecation-warning -Doracle.dbtools.cmdline.ShellCommand=ords -Duser.timezone=UTC -XX:+IgnoreUnrecognizedVMOptions -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000  -jar /opt/oracle/ords/ords.war --verbose --config /opt/oracle/sa/config serve --apex-images /opt/oracle/apex//images 
Picked up JAVA_TOOL_OPTIONS: -Doracle.ml.version_check=false
Listening for transport dt_socket at address: 8000
2025-07-16T09:10:14.025Z WARNING     Ignoring syntactically incorrect time duration value for setting: db.invalidPoolTimeout

ORDS: Release 25.1 Production on Wed Jul 16 09:10:14 2025

Copyright (c) 2010, 2025, Oracle.

Configuration:
  /opt/oracle/sa/config

2025-07-16T09:10:15.006Z INFO        HTTP and HTTP/2 cleartext listening on host: 0.0.0.0 port: 8080
2025-07-16T09:10:15.007Z INFO        HTTPS listening on host: 0.0.0.0 port: 8443
2025-07-16T09:10:15.069Z INFO        The document root is serving static resources located in: /opt/oracle/sa/config/global/doc_root/
2025-07-16T09:10:15.071Z WARNING     Cannot find the real static path of /opt/oracle/apex//images
2025-07-16T09:10:15.199Z WARNING     Ignoring syntactically incorrect time duration value for setting: db.invalidPoolTimeout
2025-07-16T09:10:17.662Z INFO        Oracle REST Data Services initialized
Oracle REST Data Services version : 25.1.1.r1411642
Oracle REST Data Services server info: jetty/12.0.18
Oracle REST Data Services java info: Java HotSpot(TM) 64-Bit Server VM GraalVM EE 21.3.10 (build: 17.0.11+7-LTS-jvmci-21.3-b51 mixed mode, sharing)

Ad here is the generated settings.xml by the ORDS controller :

oracle@int8r-5dc4dd474d-mwjgj ords]$ cd $ORDS_CONFIG
[oracle@int8r-5dc4dd474d-mwjgj config]$ ls
databases  global
[oracle@int8r-5dc4dd474d-mwjgj config]$ cd global/
[oracle@int8r-5dc4dd474d-mwjgj global]$ ls
doc_root  logging.properties  settings.xml  standalone	wallet
[oracle@int8r-5dc4dd474d-mwjgj global]$ cat settings.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
  <entry key="database.api.management.services.disabled">false</entry>
  <entry key="db.invalidPoolTimeout">15m0s</entry>
  <entry key="standalone.context.path">/ords</entry>
  <entry key="standalone.http.port">8080</entry>
  <entry key="standalone.https.port">8443</entry>
  <entry key="database.api.enabled">true</entry>
  <entry key="log.procedure">false</entry>
  <entry key="mongo.enabled">false</entry>
  <entry key="mongo.port">27017</entry>
  <entry key="security.forceHTTPS">false</entry>
  <entry key="standalone.doc.root">/opt/oracle/sa/config/global/doc_root/</entry>

Here are my two questions :

  • Would it be possible to use human readable values for Duration type settings in a latter release ? e.g. 15m instead of 900000000000
  • How can I fix my configuration for the example above, to accept my db.invalidPoolTimeout setting ?

Metadata

Metadata

Labels

OrdsSrvsOrdsSrvs controller

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions