Description of problem: "rbd watch <image>" when issued from browser using POST method, hangs forever. The same command when executed from CLI, prints "press enter to exit..." and when enter is pressed it returns to command prompt. It looks like the api is waiting forever on enter to be pressed. Version-Release number of selected component (if applicable): ceph version 10.2.2-15 calamari-server-1.4.4-1.el7cp.x86_64 How reproducible: always Steps to Reproduce: Actual results: Expected results: Additional info:
This is of course not going to work. It might be good to filter out these interactive commands. I think it's 2.1 for sure.
The following commands have an option ("-") to specify the input from stdin. When "-" is used from browser API window, the commands hang. 1) rbd import 2) rbd import-diff 3) rbd journal import 4) rbd merge-diff Example: {"command":"rbd import - --dest-pool test_rbd --dest importedG"}
Looks good
@Gregory, will this be fixed in 2.1? If so, please let me know the fix.
It might help if we redirect the stdin to /dev/null when we communicate with Popen in the sources, otherwise it gets attached to the running tty afaik.
A sample test on my test cluster shows that it would help in the case described above as $ rbd watch test < /dev/null exits immediately. I'll create an upstream PR.
Patch was pushed to the following PR since it ~requires the bits from the first patch in the PR: https://github.com/ceph/calamari/pull/490
PR for 1.4 branch (applied cleanly): https://github.com/ceph/calamari/pull/495
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2815.html