Description of problem: After deploy the MariaDB image, and run mysql command inside the container , get the error : "TERM environment variable not set." Version-Release number of selected component (if applicable): registry.access.redhat.com/rhscl/mariadb-100-rhel7 registry.access.redhat.com/rhscl/mariadb-101-rhel7 How reproducible: Always Steps to Reproduce: 1.Deploy the MariaDB image $oc run mariadb --image=registry.access.redhat.com/rhscl/mariadb-100-rhel7 --env=MYSQL_ROOT_PASSWORD=test 2.oc rsh to the pod and run mysql $oc rsh <pod> $mysql Actual results: TERM environment variable not set. Expected results: Should can use the mysql client to connect to the db. Additional info: export the TERM env in the console can resolve , like this: export TERM=dumb There is also some discuss here: https://github.com/dockerfile/mariadb/issues/3
I'm somewhat inclined to say this is an openshift bug that it rsh should be setting a TERM, we've discussed this before but i don't think we reached a resolution.
(I would vote for a least common denominator term like vt100, or pick the term from the oc client env)
When you 'docker run' something, it will set the value of TERM based on whether or not you run with a tty (-t). If you do, then TERM will be set to something like xterm. If you don't run with a tty, then it's either not set, or it gets set to dumb (I don't recall when it's empty vs dumb). We already have a bz to have 'oc rsh' set TERM: bug 1317778. That can be fixed after my terminal resizing PR (https://github.com/kubernetes/kubernetes/pull/25273) merges, which will be sometime after Kubernetes is accepting post-1.3 merges to master. Do you want to close this as a dupe of 1317778?
yup. thanks Andy. *** This bug has been marked as a duplicate of bug 1317778 ***