Revision 5949c31c qa/qa_instance.py

b/qa/qa_instance.py
136 136
    for node in info["nodes"]:
137 137
      AssertCommand(["lvremove", "-f"] + vols, node=node)
138 138
  elif info["storage-type"] == constants.ST_FILE:
139
    # FIXME: file storage dir not configurable in qa
140 139
    # Note that this works for both file and sharedfile, and this is intended.
141
    filestorage = pathutils.DEFAULT_FILE_STORAGE_DIR
142
    idir = os.path.join(filestorage, instance.name)
140
    storage_dir = qa_config.get("file-storage-dir",
141
                                pathutils.DEFAULT_FILE_STORAGE_DIR)
142
    idir = os.path.join(storage_dir, instance.name)
143 143
    for node in info["nodes"]:
144 144
      AssertCommand(["rm", "-rf", idir], node=node)
145 145
  elif info["storage-type"] == constants.ST_DISKLESS:
......
558 558
  current = currentnode.primary
559 559
  other = othernode.primary
560 560

  
561
  # FIXME: the qa doesn't have a customizable file storage dir parameter. As
562
  # such for now we use the default.
563
  filestorage = pathutils.DEFAULT_FILE_STORAGE_DIR
561
  filestorage = qa_config.get("file-storage-dir",
562
                              pathutils.DEFAULT_FILE_STORAGE_DIR)
564 563
  disk = os.path.join(filestorage, name)
565 564

  
566 565
  AssertCommand(["gnt-instance", "modify", "--new-primary=%s" % other, name],
......
997 996
        AssertCommand(drbd_shutdown_cmd, node=snode)
998 997
      AssertCommand(["lvremove", "-f"] + info["volumes"], node=snode)
999 998
    elif info["storage-type"] == constants.ST_FILE:
1000
      filestorage = pathutils.DEFAULT_FILE_STORAGE_DIR
999
      filestorage = qa_config.get("file-storage-dir",
1000
                                  pathutils.DEFAULT_FILE_STORAGE_DIR)
1001 1001
      disk = os.path.join(filestorage, instance.name)
1002 1002
      AssertCommand(["rm", "-rf", disk], node=snode)
1003 1003

  

Also available in: Unified diff