Logo Search packages:      
Sourcecode: ganeti version File versions  Download package

def lib::config::ConfigWriter::_DistributeConfig (   self  )  [private]

Distribute the configuration to the other nodes.

Currently, this only copies the configuration file. In the future,
it could be used to encapsulate the 2/3-phase update mechanism.

Definition at line 505 of file config.py.

00505                              :
    """Distribute the configuration to the other nodes.

    Currently, this only copies the configuration file. In the future,
    it could be used to encapsulate the 2/3-phase update mechanism.

    """
    if self._offline:
      return True
    bad = False
    nodelist = self.GetNodeList()
    myhostname = self._my_hostname

    tgt_list = []
    for node in nodelist:
      nodeinfo = self.GetNodeInfo(node)
      if nodeinfo.name == myhostname:
        continue
      tgt_list.append(node)

    result = rpc.call_upload_file(tgt_list, self._cfg_file)
    for node in tgt_list:
      if not result[node]:
        logger.Error("copy of file %s to node %s failed" %
                     (self._cfg_file, node))
        bad = True
    return not bad

  def _WriteConfig(self, destination=None):


Generated by  Doxygen 1.6.0   Back to index