зеркало из https://github.com/Azure/azurehpc.git
Only create mount script when ANF is present
This commit is contained in:
Родитель
9280125096
Коммит
0343bb3736
|
@ -198,6 +198,12 @@ mount -a
|
||||||
os.chmod(scriptfile, 0o755)
|
os.chmod(scriptfile, 0o755)
|
||||||
f.write(script)
|
f.write(script)
|
||||||
|
|
||||||
|
def __config_has_netapp(cfg):
|
||||||
|
for r in cfg.get("storage", {}).keys():
|
||||||
|
if cfg["storage"][r].get("type", "") == "anf":
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def generate_install(cfg, tmpdir, adminuser, sshprivkey, sshpubkey):
|
def generate_install(cfg, tmpdir, adminuser, sshprivkey, sshpubkey):
|
||||||
jb = cfg.get("install_from", None)
|
jb = cfg.get("install_from", None)
|
||||||
os.makedirs(tmpdir+"/install")
|
os.makedirs(tmpdir+"/install")
|
||||||
|
@ -205,8 +211,9 @@ def generate_install(cfg, tmpdir, adminuser, sshprivkey, sshpubkey):
|
||||||
shutil.copy(sshpubkey, tmpdir)
|
shutil.copy(sshpubkey, tmpdir)
|
||||||
shutil.copy(sshprivkey, tmpdir)
|
shutil.copy(sshprivkey, tmpdir)
|
||||||
|
|
||||||
os.makedirs("scripts", exist_ok=True)
|
if __config_has_netapp(cfg):
|
||||||
_create_anf_mount_scripts(cfg, "scripts/auto_netappfiles_mount.sh")
|
os.makedirs("scripts", exist_ok=True)
|
||||||
|
_create_anf_mount_scripts(cfg, "scripts/auto_netappfiles_mount.sh")
|
||||||
|
|
||||||
if jb:
|
if jb:
|
||||||
inst = cfg.get("install", [])
|
inst = cfg.get("install", [])
|
||||||
|
|
Загрузка…
Ссылка в новой задаче