]> 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>
Wed, 27 May 2015 04:20:46 +0000 (12:20 +0800)
commitcc7f7441c1d0457e840bfdc3413f9bc6d5f5134a
treede5d569fb70fd5546e157f929fb29e66337f2e62
parenteb26388cb985456e8f6e07a52a20fa912cf4efaa
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>
(cherry picked from commit da9d2b4077ab1dceeed979ab71f0d9ed59b14266)
qa/workunits/cephtool/test.sh
src/ceph.in