]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph.in: improve the interactive mode
authorKefu Chai <kchai@redhat.com>
Thu, 23 Apr 2015 17:27:44 +0000 (01:27 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 24 Apr 2015 07:25:30 +0000 (15:25 +0800)
commitda9d2b4077ab1dceeed979ab71f0d9ed59b14266
tree39b9afd1727988764d781f639eb912a0d32c1ad5
parentbc7d8c99d2e16a141a8b575281ba12c67628dac3
ceph.in: improve the interactive mode

* if ceph is not reading from a tty, expect EOF instead of "quit"
  as the end of input.
* do not panic at seeing the EOF
* update the test case test_mon_injectargs_SI(). since we disables
  "ceph injectargs <args,...>" in a458bd83, in which the arguments
  of "injectargs" are supposed to be consumed by "tell" instead.
  so "ceph injectargs ..." is taken as an incomplete command, and
  this command will bring ceph cli into the interactive mode,
  redirecting its stdin to /dev/null helps ceph cli quit the loop,
  but in a way of throwing EOFError exception. this change handles
  the EOF, so the "ceph injectargs ..." does not throws anymore.
  but the side effect is that the test fails since it expects a
  non-zero return code. so replace it with an equivalent "tell"
  command which also fails but due to the non-SI postfix.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/workunits/cephtool/test.sh
src/ceph.in