MCPcopy Create free account
hub / github.com/ceph/ceph / connect

Method connect

src/pybind/mgr/mgr_util.py:236–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234 return (self.ops_in_progress == 0 and ((time.time() - self.last_used) >= timeout))
235
236 def connect(self) -> None:
237 assert self.ops_in_progress == 0
238 logger.debug("Connecting to cephfs '{0}'".format(self.fs_name))
239 self.fs = cephfs.LibCephFS(rados_inst=self.mgr.rados)
240 logger.debug("Setting user ID and group ID of CephFS mount as root...")
241 self.fs.conf_set("client_mount_uid", "0")
242 self.fs.conf_set("client_mount_gid", "0")
243 self.fs.conf_set("client_check_pool_perm", "false")
244 self.fs.conf_set("client_quota", "false")
245 self.fs.conf_set("client_respect_subvolume_snapshot_visibility",
246 "false")
247 self.fs.conf_set("client_fscrypt_as", "false")
248 logger.debug("CephFS initializing...")
249 self.fs.init()
250 logger.debug("CephFS mounting...")
251 self.fs.mount(filesystem_name=self.fs_name.encode('utf-8'))
252 logger.debug("Connection to cephfs '{0}' complete".format(self.fs_name))
253 self.mgr._ceph_register_client(None, self.fs.get_addrs(), False)
254
255 def disconnect(self) -> None:
256 try:

Callers 1

get_fs_handleMethod · 0.95

Calls 7

debugMethod · 0.45
formatMethod · 0.45
conf_setMethod · 0.45
initMethod · 0.45
mountMethod · 0.45
encodeMethod · 0.45
get_addrsMethod · 0.45

Tested by

no test coverage detected