Revision 72b35807

b/lib/backend.py
801 801
                                    for bridge in what[constants.NV_BRIDGES]
802 802
                                    if not utils.BridgeExists(bridge)]
803 803

  
804
  if what.get(constants.NV_FILE_STORAGE_PATHS) == my_name:
805
    result[constants.NV_FILE_STORAGE_PATHS] = \
806
      bdev.ComputeWrongFileStoragePaths()
807

  
804 808
  return result
805 809

  
806 810

  
b/lib/cmdlib.py
2784 2784
             "OSes present on reference node %s but missing on this node: %s",
2785 2785
             base.name, utils.CommaJoin(missing))
2786 2786

  
2787
  def _VerifyFileStoragePaths(self, ninfo, nresult, is_master):
2788
    """Verifies paths in L{pathutils.FILE_STORAGE_PATHS_FILE}.
2789

  
2790
    @type ninfo: L{objects.Node}
2791
    @param ninfo: the node to check
2792
    @param nresult: the remote results for the node
2793
    @type is_master: bool
2794
    @param is_master: Whether node is the master node
2795

  
2796
    """
2797
    node = ninfo.name
2798

  
2799
    if (is_master and
2800
        (constants.ENABLE_FILE_STORAGE or
2801
         constants.ENABLE_SHARED_FILE_STORAGE)):
2802
      try:
2803
        fspaths = nresult[constants.NV_FILE_STORAGE_PATHS]
2804
      except KeyError:
2805
        # This should never happen
2806
        self._ErrorIf(True, constants.CV_ENODEFILESTORAGEPATHS, node,
2807
                      "Node did not return forbidden file storage paths")
2808
      else:
2809
        self._ErrorIf(fspaths, constants.CV_ENODEFILESTORAGEPATHS, node,
2810
                      "Found forbidden file storage paths: %s",
2811
                      utils.CommaJoin(fspaths))
2812
    else:
2813
      self._ErrorIf(constants.NV_FILE_STORAGE_PATHS in nresult,
2814
                    constants.CV_ENODEFILESTORAGEPATHS, node,
2815
                    "Node should not have returned forbidden file storage"
2816
                    " paths")
2817

  
2787 2818
  def _VerifyOob(self, ninfo, nresult):
2788 2819
    """Verifies out of band functionality of a node.
2789 2820

  
......
3126 3157
      node_verify_param[constants.NV_DRBDLIST] = None
3127 3158
      node_verify_param[constants.NV_DRBDHELPER] = drbd_helper
3128 3159

  
3160
    if constants.ENABLE_FILE_STORAGE or constants.ENABLE_SHARED_FILE_STORAGE:
3161
      # Load file storage paths only from master node
3162
      node_verify_param[constants.NV_FILE_STORAGE_PATHS] = master_node
3163

  
3129 3164
    # bridge checks
3130 3165
    # FIXME: this needs to be changed per node-group, not cluster-wide
3131 3166
    bridges = set()
......
3279 3314
      self._VerifyNodeNetwork(node_i, nresult)
3280 3315
      self._VerifyNodeUserScripts(node_i, nresult)
3281 3316
      self._VerifyOob(node_i, nresult)
3317
      self._VerifyFileStoragePaths(node_i, nresult,
3318
                                   node == master_node)
3282 3319

  
3283 3320
      if nimg.vm_capable:
3284 3321
        self._VerifyNodeLVM(node_i, nresult, vg_name)
b/lib/constants.py
1330 1330
  (CV_TNODE, "ENODEOOBPATH", "Invalid Out Of Band path")
1331 1331
CV_ENODEUSERSCRIPTS = \
1332 1332
  (CV_TNODE, "ENODEUSERSCRIPTS", "User scripts not present or not executable")
1333
CV_ENODEFILESTORAGEPATHS = \
1334
  (CV_TNODE, "ENODEFILESTORAGEPATHS", "Detected bad file storage paths")
1333 1335

  
1334 1336
CV_ALL_ECODES = frozenset([
1335 1337
  CV_ECLUSTERCFG,
......
1363 1365
  CV_ENODETIME,
1364 1366
  CV_ENODEOOBPATH,
1365 1367
  CV_ENODEUSERSCRIPTS,
1368
  CV_ENODEFILESTORAGEPATHS,
1366 1369
  ])
1367 1370

  
1368 1371
CV_ALL_ECODES_STRINGS = frozenset(estr for (_, estr, _) in CV_ALL_ECODES)
......
1389 1392
NV_OOB_PATHS = "oob-paths"
1390 1393
NV_BRIDGES = "bridges"
1391 1394
NV_USERSCRIPTS = "user-scripts"
1395
NV_FILE_STORAGE_PATHS = "file-storage-paths"
1392 1396

  
1393 1397
# Instance status
1394 1398
INSTST_RUNNING = "running"

Also available in: Unified diff