Revision 17b0b812 lib/cmdlib.py

b/lib/cmdlib.py
1941 1941
      _ErrorIf(bool(missing), constants.CV_ENODENET, node,
1942 1942
               "missing bridges: %s" % utils.CommaJoin(sorted(missing)))
1943 1943

  
1944
  def _VerifyNodeUserScripts(self, ninfo, nresult):
1945
    """Check the results of user scripts presence and executability on the node
1946

  
1947
    @type ninfo: L{objects.Node}
1948
    @param ninfo: the node to check
1949
    @param nresult: the remote results for the node
1950

  
1951
    """
1952
    node = ninfo.name
1953

  
1954
    test = not constants.NV_USERSCRIPTS in nresult
1955
    self._ErrorIf(test, constants.CV_ENODEUSERSCRIPTS, node,
1956
                  "did not return user scripts information")
1957

  
1958
    broken_scripts = nresult.get(constants.NV_USERSCRIPTS, None)
1959
    if not test:
1960
      self._ErrorIf(broken_scripts, constants.CV_ENODEUSERSCRIPTS, node,
1961
                    "user scripts not present or not executable: %s" %
1962
                    utils.CommaJoin(sorted(broken_scripts)))
1963

  
1944 1964
  def _VerifyNodeNetwork(self, ninfo, nresult):
1945 1965
    """Check the node network connectivity results.
1946 1966

  
......
2649 2669

  
2650 2670
    feedback_fn("* Gathering data (%d nodes)" % len(self.my_node_names))
2651 2671

  
2672
    user_scripts = []
2673
    if self.cfg.GetUseExternalMipScript():
2674
      user_scripts.append(constants.EXTERNAL_MASTER_SETUP_SCRIPT)
2675

  
2652 2676
    node_verify_param = {
2653 2677
      constants.NV_FILELIST:
2654 2678
        utils.UniqueSequence(filename
......
2671 2695
      constants.NV_MASTERIP: (master_node, master_ip),
2672 2696
      constants.NV_OSLIST: None,
2673 2697
      constants.NV_VMNODES: self.cfg.GetNonVmCapableNodeList(),
2698
      constants.NV_USERSCRIPTS: user_scripts,
2674 2699
      }
2675 2700

  
2676 2701
    if vg_name is not None:
......
2829 2854
      nimg.call_ok = self._VerifyNode(node_i, nresult)
2830 2855
      self._VerifyNodeTime(node_i, nresult, nvinfo_starttime, nvinfo_endtime)
2831 2856
      self._VerifyNodeNetwork(node_i, nresult)
2857
      self._VerifyNodeUserScripts(node_i, nresult)
2832 2858
      self._VerifyOob(node_i, nresult)
2833 2859

  
2834 2860
      if nimg.vm_capable:
......
3798 3824

  
3799 3825
  # Files which should only be on master candidates
3800 3826
  files_mc = set()
3827

  
3801 3828
  if not redist:
3802 3829
    files_mc.add(constants.CLUSTER_CONF_FILE)
3803 3830

  
3831
    # FIXME: this should also be replicated but Ganeti doesn't support files_mc
3832
    # replication
3833
    files_mc.add(constants.DEFAULT_MASTER_SETUP_SCRIPT)
3834

  
3804 3835
  # Files which should only be on VM-capable nodes
3805 3836
  files_vm = set(filename
3806 3837
    for hv_name in cluster.enabled_hypervisors

Also available in: Unified diff