kwargs['check_status'] = False
return self.run_cluster_cmd(**kwargs).exitstatus
- def run_ceph_w(self, watch_channel=None):
+ # XXX: Setting "shell" to True for LocalCephManager.run_ceph_w(), doesn't
+ # work with vstart_runner.py; see https://tracker.ceph.com/issues/49644.
+ # shell=False as default parameter is just to maintain compatibility
+ # between interfaces of CephManager.run_ceph_w() and
+ # LocalCephManager.run_ceph_w(). This doesn't affect how "ceph -w" process
+ # is launched by this method since this parameters remains unused in
+ # this method.
+ def run_ceph_w(self, watch_channel=None, shell=False):
"""
Execute "ceph -w" in the background with stdout connected to a BytesIO,
and return the RemoteProcess.
return found
def __enter__(self):
- self.watcher_process = ceph_manager.run_ceph_w(watch_channel)
+ # XXX: For reason behind setting "shell" to False, see
+ # https://tracker.ceph.com/issues/49644.
+ self.watcher_process = ceph_manager.run_ceph_w(watch_channel,
+ shell=False)
def __exit__(self, exc_type, exc_val, exc_tb):
if not self.watcher_process.finished:
"""
return LocalRemote()
- def run_ceph_w(self, watch_channel=None):
+ # XXX: For reason behind setting "shell" to False, see
+ # https://tracker.ceph.com/issues/49644.
+ def run_ceph_w(self, watch_channel=None, shell=False):
"""
:param watch_channel: Specifies the channel to be watched.
This can be 'cluster', 'audit', ...
if watch_channel is not None:
args.append("--watch-channel")
args.append(watch_channel)
- proc = self.controller.run(args=args, wait=False, stdout=StringIO())
+ proc = self.controller.run(args=args, wait=False, stdout=StringIO(),
+ shell=shell)
return proc
def run_cluster_cmd(self, **kwargs):