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

Method shutdown

src/common/admin_socket.cc:1136–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1134}
1135
1136void AdminSocket::shutdown()
1137{
1138 // Under normal operation this is unlikely to occur. However for some unit
1139 // tests, some object members are not initialized and so cannot be deleted
1140 // without fault.
1141 if (m_wakeup_wr_fd < 0)
1142 return;
1143
1144 ldout(m_cct, 5) << "shutdown" << dendl;
1145 m_shutdown = true;
1146
1147 auto err = destroy_wakeup_pipe();
1148 if (!err.empty()) {
1149 lderr(m_cct) << "AdminSocket::shutdown: error: " << err << dendl;
1150 }
1151
1152 retry_sys_call(::compat_closesocket, m_sock_fd);
1153
1154 unregister_commands(version_hook.get());
1155 version_hook.reset();
1156
1157 unregister_commands(help_hook.get());
1158 help_hook.reset();
1159
1160 unregister_commands(getdescs_hook.get());
1161 getdescs_hook.reset();
1162
1163 unregister_commands(raise_hook.get());
1164 raise_hook.reset();
1165
1166 remove_cleanup_file(m_path);
1167 m_path.clear();
1168}
1169
1170void AdminSocket::wakeup()
1171{

Callers

nothing calls this directly

Calls 6

retry_sys_callFunction · 0.85
remove_cleanup_fileFunction · 0.70
emptyMethod · 0.45
getMethod · 0.45
resetMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected