Bug 1354459 - 2.0: rbd commands via API: few commands hang when used from browser
Summary: 2.0: rbd commands via API: few commands hang when used from browser
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Calamari
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 2.1
Assignee: Boris Ranto
QA Contact: Vasishta
Bara Ancincova
URL:
Whiteboard:
Depends On:
Blocks: 1322504 1383917
TreeView+ depends on / blocked
 
Reported: 2016-07-11 11:31 UTC by Harish NV Rao
Modified: 2022-02-21 18:03 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-11-22 19:28:29 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2815 0 normal SHIPPED_LIVE Moderate: Red Hat Ceph Storage security, bug fix, and enhancement update 2017-03-22 02:06:33 UTC

Description Harish NV Rao 2016-07-11 11:31:01 UTC
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 Christina Meno 2016-07-11 22:37:43 UTC
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 10:17:07 UTC
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 Christina Meno 2016-08-17 16:35:52 UTC
Looks good

Comment 7 Harish NV Rao 2016-10-03 10:00:24 UTC
@Gregory, will this be fixed in 2.1? If so, please let me know the fix.

Comment 8 Boris Ranto 2016-10-03 17:58:48 UTC
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 19:16:38 UTC
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 19:39:06 UTC
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 12:58:52 UTC
PR for 1.4 branch (applied cleanly):

https://github.com/ceph/calamari/pull/495

Comment 20 errata-xmlrpc 2016-11-22 19:28:29 UTC
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.