Pass /dev/null as stdin when calling ceph commands#490
Conversation
|
This PR also contains patch for an issue where we can hang forever for certain commands that do expect some input from stdin since these two commits would conflict otherwise. |
|
Curious about what would ever use this, as the rados tool is all about access to the contents of pools rather than administration? |
|
@jcsp we had a downstream request for this |
|
Please see my comments on the BZ. |
|
@b-ranto The BZ mentions this is a fix for 2.1, did you meant to target the 1.4 branch of calamari then? |
|
@andrewschoen I test most of my fixes on 1.3 (it is easier for me that way at the moment) and then I "backport" them to 1.4. @jcsp I have re-worked this so that we provide the global stats and pool stats in a more standard way: -> I'll update this PR to only contain the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1354459 EDIT: Done, this is already targeted for bz1354459 only, see #492 for the other issue. |
Currently, we run these commands with default stdin which resolves to tty from which the daemon is run. For commands like 'rbd watch <img>' which wait for an input, this can result in commands being hung forever. The patch fixes it by attaching the stdin to /dev/null so the commands like that will get EOF on stdin and exit immediately. Signed-off-by: Boris Ranto <branto@redhat.com>
67f64f9 to
2fa341e
Compare
Currently, we run these commands with default stdin which resolves to
'
tty from which the daemon is run. For commands like 'rbd watch
which wait for an input, this can result in commands being hung forever.
The patch fixes this by attaching the stdin to /dev/null so the commands
like that will get EOF on stdin and exit immediately.
Signed-off-by: Boris Ranto branto@redhat.com