Absolute paths change when using Openshift Windows Client
Issue
Using Using the Windows Openshift client with Gitbash, specifying Linux paths in 'oc' comamnds change to Windows paths.
For example:
USER@MYHOST MINGW64 ~/myapp
$ oc set probe dc/${DATABASE_SVC_NAME} --readiness --failure-threshold=3 --initial-delay-seconds=5 --period-seconds=10 --success-threshold=1 --timeout-seconds=1 -- /bin/sh -i -c MYSQL_PWD="${MYSQL_PASSWORD}" mysql -u ${MYSQL_USER} -D ${MY_DB} -e 'SELECT 1'
Results in a readiness probe that contains a Windows DOS style absolute path:
USER@MYHOST MINGW64 ~/myapp
$ oc export dc <my database dc> -n myproject -o json
...
"readinessProbe": {
"exec": {
"command": [
"C:/Git/usr/bin/sh",
"-i",
"-c",
"MYSQL_PWD=Testing123###555###555###",
"mysql",
"-u",
"myuser",
"-D",
"mydb",
"-e",
"SELECT 1"
]
},
...
Environment
Server
* OCP 3.9
* RHEL 7.5
Client
* Windows Openshift Client 3.9
* Windows Gitbash shell
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.