mgr/dashboard: vstart: Fix /dev/tty No such device or address #31195
mgr/dashboard: vstart: Fix /dev/tty No such device or address #31195batrick merged 1 commit intoceph:masterfrom
Conversation
7c21f4b to
b74cef6
Compare
|
@callithea Can you run a Dashboard E2E test including this patch to validate if it fixes the issue? |
|
jenkins test dashboard |
|
jenkins test dashboard |
d2f911d to
18777c0
Compare
19a5df0 to
f4a3757
Compare
f4a3757 to
ef51615
Compare
src/vstart.sh
Outdated
| debug() { | ||
| if [ -w /dev/tty -a ! -t 2 ]; then | ||
| "$@" | tee /dev/tty >&2 | ||
| if [ -w /dev/stderr -a ! -t 2 ]; then |
There was a problem hiding this comment.
I tried again and now it really works (although I'm not sure if the resulting behaviour is the same as what @batrick expected when he made this change):
| if [ -w /dev/stderr -a ! -t 2 ]; then | |
| if [ -w /dev/tty -a -t 1 ]; then |
There was a problem hiding this comment.
You're right, the ! -t 2 does not make sense when using /dev/stderr. Our problem is that Jenkins does not have a /dev/tty device when our tests scripts are executed.
Don't know whether your changes let the thing work as wanted by @batrick. Maybe he needs to adapt the code.
There was a problem hiding this comment.
The -t 1 basically skips tty in non-interactive shells (my suggestion was to change just that, and leave the remaining tty stuff).
|
@batrick Can you please review this PR. This issue is blocking the Dashboard team from running E2E tests and merging PR's. |
src/vstart.sh
Outdated
| "$@" | tee /dev/tty >&2 | ||
| if [ -w /dev/stderr -a ! -t 2 ]; then | ||
| "$@" | tee /dev/stderr | ||
| else |
There was a problem hiding this comment.
I'm not sure what jenkins is doing here to make /dev/tty visible but not writeable. In any case, to unblock your testing, just make debug() unconditionally call "$@" > &2
There was a problem hiding this comment.
Not only Jenkins. With bash running in a detached container (docker daemon) it fails in the same way.
Running on Jenkins slave or as a daemon there will be no writable console. Fixes: https://tracker.ceph.com/issues/42487 Signed-off-by: Volker Theile <vtheile@suse.com>
ef51615 to
4385ce4
Compare
* refs/pull/31195/head: vstart: Fix /dev/tty No such device or address Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Running on Jenkins slave or as a daemon there will be no writable console.
Fixes: https://tracker.ceph.com/issues/42487
Signed-off-by: Volker Theile vtheile@suse.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docs