Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1354459 - 2.0: rbd commands via API: few commands hang when used from browser
2.0: rbd commands via API: few commands hang when used from browser
Status: CLOSED ERRATA
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Calamari (Show other bugs)
2.0
Unspecified Unspecified
medium Severity unspecified
: rc
: 2.1
Assigned To: Boris Ranto
Vasishta
Bara Ancincova
:
Depends On:
Blocks: 1322504 1383917
  Show dependency treegraph
 
Reported: 2016-07-11 07:31 EDT by Harish NV Rao
Modified: 2016-11-22 14:28 EST (History)
5 users (show)

See Also:
Fixed In Version: RHEL: calamari-server-1.4.9-1.el7cp Ubuntu: calamari-server_1.4.9-2redhat1xenial
Doc Type: Bug Fix
Doc Text:
.Calamari no longer hangs when interactive commands are issued Previously, the Calamari REST API incorrectly attached a standard input to interactive commands, such as `rbd import`. When these commands were executed from Calamari, the Calamari user interface became unresponsive because it waited for an action from the user. The underlying source code has been modified, and Calamari no longer hangs when interactive commands are issued.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-22 14:28:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2815 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage security, bug fix, and enhancement update 2017-03-21 22:06:33 EDT

  None (edit)
Description Harish NV Rao 2016-07-11 07:31:01 EDT
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:
Comment 2 Gregory Meno 2016-07-11 18:37:43 EDT
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.
Comment 4 Harish NV Rao 2016-08-01 06:17:07 EDT
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"}
Comment 6 Gregory Meno 2016-08-17 12:35:52 EDT
Looks good
Comment 7 Harish NV Rao 2016-10-03 06:00:24 EDT
@Gregory, will this be fixed in 2.1? If so, please let me know the fix.
Comment 8 Boris Ranto 2016-10-03 13:58:48 EDT
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.
Comment 9 Boris Ranto 2016-10-03 15:16:38 EDT
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.
Comment 10 Boris Ranto 2016-10-03 15:39:06 EDT
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
Comment 12 Boris Ranto 2016-10-12 08:58:52 EDT
PR for 1.4 branch (applied cleanly):

https://github.com/ceph/calamari/pull/495
Comment 20 errata-xmlrpc 2016-11-22 14:28:29 EST
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

Note You need to log in before you can comment on or make changes to this bug.