Skip to content

Conversation

@b-ranto
Copy link
Contributor

@b-ranto b-ranto commented Oct 3, 2016

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

@b-ranto
Copy link
Contributor Author

b-ranto commented Oct 3, 2016

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.

@jcsp
Copy link
Contributor

jcsp commented Oct 4, 2016

Curious about what would ever use this, as the rados tool is all about access to the contents of pools rather than administration?

@b-ranto
Copy link
Contributor Author

b-ranto commented Oct 4, 2016

@jcsp we had a downstream request for this

https://bugzilla.redhat.com/show_bug.cgi?id=1347137

@jcsp
Copy link
Contributor

jcsp commented Oct 4, 2016

Please see my comments on the BZ.

@andrewschoen
Copy link

@b-ranto The BZ mentions this is a fix for 2.1, did you meant to target the 1.4 branch of calamari then?

@b-ranto
Copy link
Contributor Author

b-ranto commented Oct 11, 2016

@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:

#492

-> 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>
@b-ranto b-ranto changed the title Add rados command support for calamari Pass /dev/null as stdin when calling ceph commands Oct 11, 2016
@ChristinaMeno ChristinaMeno merged commit e0a4db1 into 1.3 Mar 24, 2017
@b-ranto b-ranto deleted the wip-rados-cli branch March 27, 2017 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants