def _update_ceph_conf_into_db(self, content): cluster_id = self._cluster_id_accessor.get_cluster_id() if not cluster_id: LOG.debug('Can not get cluster_id; unable to save ceph.conf to db') return db.cluster_update_ceph_conf(self._context, cluster_id, content)
def _update_ceph_conf_into_db(self, content): if not self.cluster_id: if not self._get_cluster_id(): return db.cluster_update_ceph_conf(self.context, self.cluster_id, content) server_list = db.init_node_get_all(self.context) for ser in server_list: self._agent_rpcapi.update_ceph_conf(self.context, ser['host'])
def _write_ceph_conf_to_db(self, content): """ Write specified content to db. 'content' is stripped before write so empty content will match an empty file's md5 check sum. :param content: the ceph configuration file content to be written to the database """ cluster_id = self._cluster_id_accessor.get_cluster_id() if not cluster_id: LOG.debug('Can not get cluster_id; unable to save ceph.conf to db') return db.cluster_update_ceph_conf(self._context, cluster_id, content.strip())