::
- ceph orch ps
- ceph orch service ls [--host host] [--svc_type type] [--refresh]
+ ceph orch ls [--service_type type] [--service_name name] [--export] [--format f] [--refresh]
Discover the status of a particular service or daemons::
- ceph orch service ls --svc_type type --svc_id <name> [--refresh]
+ ceph orch ls --service_type type --service_name <name> [--refresh]
+
+Export the service specs known to the orchestrator as yaml in format
+that is compatible to ``ceph orch apply -i``::
+
+ ceph orch ls --export
+
+Daemon Status
+=============
+Print a list of all daemons known to the orchestrator::
+
+ ceph orch ps [--hostname host] [--daemon_type type] [--service_name name] [--daemon_id id] [--format f] [--refresh]
+
Query the status of a particular service instance (mon, osd, mds, rgw). For OSDs
the id is the numeric OSD ID, for MDS services it is the file system name::
- ceph orch daemon status <type> <instance-name> [--refresh]
+ ceph orch ps --daemon_type osd --daemon_id 0
.. _orchestrator-cli-cephfs:
'orch ls',
"name=service_type,type=CephString,req=false "
"name=service_name,type=CephString,req=false "
+ "name=export,type=CephBool,req=false "
"name=format,type=CephChoices,strings=plain|json|json-pretty|yaml,req=false "
"name=refresh,type=CephBool,req=false",
'List services known to orchestrator')
- def _list_services(self, host=None, service_type=None, service_name=None, format='plain', refresh=False):
+ def _list_services(self, host=None, service_type=None, service_name=None, export=False, format='plain', refresh=False):
+
+ if export and format == 'plain':
+ format = 'yaml'
+
completion = self.describe_service(service_type,
service_name,
refresh=refresh)
if len(services) == 0:
return HandleCommandResult(stdout="No services reported")
elif format != 'plain':
- data = [s.to_json() for s in services]
+ if export:
+ data = [s.spec.to_json() for s in services]
+ else:
+ data = [s.to_json() for s in services]
return HandleCommandResult(stdout=to_format(data, format))
else:
now = datetime.datetime.utcnow()