Fixed invalid hast name
This commit is contained in:
parent
2d137f3849
commit
25e5185970
4
PKGBUILD
4
PKGBUILD
@ -1,6 +1,6 @@
|
|||||||
pkgname=saturn-discover
|
pkgname=saturn-discover
|
||||||
pkgver=1.7
|
pkgver=1.9
|
||||||
pkgrel=8
|
pkgrel=10
|
||||||
arch=('any')
|
arch=('any')
|
||||||
source=('saturnDiscoverDeamon.py' 'saturnDiscover.service' 'saturnDiscover')
|
source=('saturnDiscoverDeamon.py' 'saturnDiscover.service' 'saturnDiscover')
|
||||||
md5sums=('SKIP' 'SKIP' 'SKIP')
|
md5sums=('SKIP' 'SKIP' 'SKIP')
|
||||||
|
@ -133,7 +133,7 @@ elif (sys.argv[1] == "list"):
|
|||||||
if (sys.argv[2] == "nodes"):
|
if (sys.argv[2] == "nodes"):
|
||||||
nodes = loadHosts()
|
nodes = loadHosts()
|
||||||
|
|
||||||
print("NAME MASTER IP MAC CPUs RAM[GB] VERSION GRES")
|
print("NAME MASTER IP MAC CPUs RAM[GB] VERSION GRES")
|
||||||
print("SELF")
|
print("SELF")
|
||||||
|
|
||||||
for node in nodes.values():
|
for node in nodes.values():
|
||||||
@ -141,7 +141,7 @@ elif (sys.argv[1] == "list"):
|
|||||||
if node["type"] == "master":
|
if node["type"] == "master":
|
||||||
isMaster = "YES"
|
isMaster = "YES"
|
||||||
|
|
||||||
print(f'{node["name"]: <8}{isMaster: <10}{node["ip"]: <18}{node["mac"]: <19}{node["cpus"]: <8}{node["rams"]: <11}{node["version"]: <11}{",".join(node["res"])}')
|
print(f'{node["name"]: <10}{isMaster: <10}{node["ip"]: <18}{node["mac"]: <19}{node["cpus"]: <8}{int(node["rams"] / (1024.**2) / 1000): <11}{node["version"]: <11}{",".join(node["res"])}')
|
||||||
|
|
||||||
elif (sys.argv[1] == "get"):
|
elif (sys.argv[1] == "get"):
|
||||||
if (argc != 3):
|
if (argc != 3):
|
||||||
|
@ -103,7 +103,7 @@ def generateSlurmConfig(source, target):
|
|||||||
noMasterHosts += f"{host["name"]},"
|
noMasterHosts += f"{host["name"]},"
|
||||||
|
|
||||||
if len(noMasterHosts) > 0:
|
if len(noMasterHosts) > 0:
|
||||||
noMasterHosts = noMasterHosts[:-2]
|
noMasterHosts = noMasterHosts[:-1]
|
||||||
|
|
||||||
with open(source) as f:
|
with open(source) as f:
|
||||||
newText=f.read().replace('{%hosts%}', hosts).replace('{%noMasterHosts%}', noMasterHosts).replace('{%masterName%}', MASTER["name"]).replace('{%masterIP%}', MASTER["ip"])
|
newText=f.read().replace('{%hosts%}', hosts).replace('{%noMasterHosts%}', noMasterHosts).replace('{%masterName%}', MASTER["name"]).replace('{%masterIP%}', MASTER["ip"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user