commit cb91d46e65af89484bf1f017e39730594fed836e
Author: Iustin Pop <iustin@google.com>
Date:   Wed Jul 25 11:46:06 2007 +0000

    Since the watcher can run on all nodes, let's get rid of the cron file
    handling, as it can be static and outside of ganeti.
    
    This also means we can get rid of a lot of infrastructure too:
      - the master/node config files checkers
      - one rpc function

diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded
index ede5e79..f9016e3 100755
--- a/daemons/ganeti-noded
+++ b/daemons/ganeti-noded
@@ -243,9 +243,6 @@ class ServerObject(pb.Avatar):
   def perspective_version(self, params):
     return constants.PROTOCOL_VERSION
 
-  def perspective_configfile_list(self, params):
-    return backend.ListConfigFiles()
-
   def perspective_upload_file(self, params):
     return backend.UploadFile(*params)
 
diff --git a/lib/backend.py b/lib/backend.py
index 3064f21..46b1047 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -43,23 +43,6 @@ from ganeti import objects
 from ganeti import ssconf
 
 
-def ListConfigFiles():
-  """Return a list of the config files present on the local node.
-  """
-
-  configfiles = []
-
-  for testfile in constants.MASTER_CONFIGFILES:
-    if os.path.exists(testfile):
-      configfiles.append(testfile)
-
-  for testfile in constants.NODE_CONFIGFILES:
-    if os.path.exists(testfile):
-      configfiles.append(testfile)
-
-  return configfiles
-
-
 def StartMaster():
   """Activate local node as master node.
 
@@ -75,8 +58,6 @@ def StartMaster():
                  " error: '%s'" % (result.cmd, result.output))
     return False
 
-  utils.RemoveFile(constants.MASTER_CRON_LINK)
-  os.symlink(constants.MASTER_CRON_FILE, constants.MASTER_CRON_LINK)
   return True
 
 
@@ -95,8 +76,6 @@ def StopMaster():
                  " error: '%s'" % (result.cmd, result.output))
     return False
 
-  utils.RemoveFile(constants.MASTER_CRON_LINK)
-
   return True
 
 
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 618998b..b9cf898 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -738,7 +738,6 @@ class LUVerifyCluster(NoHooksLU):
           bad = True
     return bad
 
-
   def _VerifyOrphanInstances(self, instancelist, node_instance, feedback_fn):
     """Verify the list of running instances.
 
@@ -754,28 +753,6 @@ class LUVerifyCluster(NoHooksLU):
           bad = True
     return bad
 
-  def _VerifyNodeConfigFiles(self, ismaster, node, file_list, feedback_fn):
-    """Verify the list of node config files"""
-
-    bad = False
-    for file_name in constants.MASTER_CONFIGFILES:
-      if ismaster and file_name not in file_list:
-        feedback_fn("  - ERROR: master config file %s missing from master"
-                    " node %s" % (file_name, node))
-        bad = True
-      elif not ismaster and file_name in file_list:
-        feedback_fn("  - ERROR: master config file %s should not exist"
-                    " on non-master node %s" % (file_name, node))
-        bad = True
-
-    for file_name in constants.NODE_CONFIGFILES:
-      if file_name not in file_list:
-        feedback_fn("  - ERROR: config file %s missing from node %s" %
-                    (file_name, node))
-        bad = True
-
-    return bad
-
   def CheckPrereq(self):
     """Check prerequisites.
 
@@ -801,11 +778,12 @@ class LUVerifyCluster(NoHooksLU):
 
     # FIXME: verify OS list
     # do local checksums
-    file_names = constants.CLUSTER_CONF_FILES
+    file_names = list(self.sstore.GetFileList())
+    file_names.append(constants.SSL_CERT_FILE)
+    file_names.append(constants.CLUSTER_CONF_FILE)
     local_checksums = utils.FingerprintFiles(file_names)
 
     feedback_fn("* Gathering data (%d nodes)" % len(nodelist))
-    all_configfile = rpc.call_configfile_list(nodelist)
     all_volumeinfo = rpc.call_volume_list(nodelist, vg_name)
     all_instanceinfo = rpc.call_instance_list(nodelist)
     all_vglist = rpc.call_vg_list(nodelist)
@@ -823,16 +801,6 @@ class LUVerifyCluster(NoHooksLU):
                                 all_vglist[node], all_nvinfo[node],
                                 all_rversion[node], feedback_fn)
       bad = bad or result
-      # node_configfile
-      nodeconfigfile = all_configfile[node]
-
-      if not nodeconfigfile:
-        feedback_fn("  - ERROR: connection to %s failed" % (node))
-        bad = True
-        continue
-
-      bad = bad or self._VerifyNodeConfigFiles(node==master, node,
-                                               nodeconfigfile, feedback_fn)
 
       # node_volume
       volumeinfo = all_volumeinfo[node]
@@ -1452,8 +1420,7 @@ class LUAddNode(LogicalUnit):
           logger.Error("copy of file %s to node %s failed" %
                        (fname, to_node))
 
-    to_copy = [constants.MASTER_CRON_FILE]
-    to_copy.extend(ss.GetFileList())
+    to_copy = ss.GetFileList()
     for fname in to_copy:
       if not ssh.CopyFileToNode(node, fname):
         logger.Error("could not copy file %s to node %s" % (fname, node))
diff --git a/lib/constants.py b/lib/constants.py
index c68506b..4477a43 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -33,15 +33,9 @@ EXPORT_VERSION = 0
 DATA_DIR = "/var/lib/ganeti"
 CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
 SSL_CERT_FILE = DATA_DIR + "/server.pem"
-HYPERCONF_FILE = DATA_DIR + "/hypervisor"
 WATCHER_STATEFILE = DATA_DIR + "/restart_state"
 
-ETC_DIR = "/etc/ganeti"
-
-MASTER_CRON_FILE = ETC_DIR + "/master-cron"
-MASTER_CRON_LINK = "/etc/cron.d/ganeti-master-cron"
 NODE_INITD_SCRIPT = "/etc/init.d/ganeti"
-NODE_INITD_NAME = "ganeti"
 DEFAULT_NODED_PORT = 1811
 FIRST_DRBD_PORT = 11000
 LAST_DRBD_PORT = 14999
@@ -84,27 +78,6 @@ INSTANCE_IMPORT = "import"
 DISK_TEMPLATES = frozenset([DT_DISKLESS, DT_PLAIN,
                             DT_LOCAL_RAID1, DT_REMOTE_RAID1])
 
-# file groups
-CLUSTER_CONF_FILES = ["/etc/hosts",
-                      "/etc/ssh/ssh_known_hosts",
-                      "/etc/ssh/ssh_host_dsa_key",
-                      "/etc/ssh/ssh_host_dsa_key.pub",
-                      "/etc/ssh/ssh_host_rsa_key",
-                      "/etc/ssh/ssh_host_rsa_key.pub",
-                      "/root/.ssh/authorized_keys",
-                      "/root/.ssh/id_dsa",
-                      "/root/.ssh/id_dsa.pub",
-                      CLUSTER_CONF_FILE,
-                      SSL_CERT_FILE,
-                      MASTER_CRON_FILE,
-                      ]
-
-MASTER_CONFIGFILES = [MASTER_CRON_LINK,]
-
-NODE_CONFIGFILES = [NODE_INITD_SCRIPT,
-                    "/etc/rc2.d/S20%s" % NODE_INITD_NAME,
-                    "/etc/rc0.d/K80%s" % NODE_INITD_NAME]
-
 # import/export config options
 INISECT_EXP = "export"
 INISECT_INS = "instance"
diff --git a/lib/rpc.py b/lib/rpc.py
index ce4d787..e632e49 100644
--- a/lib/rpc.py
+++ b/lib/rpc.py
@@ -451,17 +451,6 @@ def call_version(node_list):
   return c.getresult()
 
 
-def call_configfile_list(node_list):
-  """Return list of existing configuration files.
-
-  This is a multi-node call.
-
-  """
-  c = Client("configfile_list", [])
-  c.connect_list(node_list)
-  c.run()
-  return c.getresult()
-
 def call_blockdev_create(node, bdev, size, on_primary):
   """Request creation of a given block device.
 
