MCPcopy Create free account
hub / github.com/saltstack/salt / _is_master_running

Method _is_master_running

salt/netapi/__init__.py:112–128  ·  view source on GitHub ↗

Perform a lightweight check to see if the master daemon is running Note, this will return an invalid success if the master crashed or was not shut down cleanly.

(self)

Source from the content-addressed store, hash-verified

110 self.destroy()
111
112 def _is_master_running(self):
113 """
114 Perform a lightweight check to see if the master daemon is running
115
116 Note, this will return an invalid success if the master crashed or was
117 not shut down cleanly.
118 """
119 # Windows doesn't have IPC. Assume the master is running.
120 # At worse, it will error 500.
121 if salt.utils.platform.is_windows():
122 return True
123
124 if self.opts["transport"] == "tcp":
125 ipc_file = "publish_pull.ipc"
126 else:
127 ipc_file = "workers.ipc"
128 return os.path.exists(os.path.join(self.opts["sock_dir"], ipc_file))
129
130 def _prep_auth_info(self, clear_load):
131 sensitive_load_keys = []

Callers 3

mk_tokenFunction · 0.95
runMethod · 0.95
POSTMethod · 0.45

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected