- # what arch should be used for this node
- utils.breakpoint("Getting the arch tag on node")
- pldistro="planetlab"
- default_arch="i386"
- try:
- arch = BootAPI.call_api_function(vars, "GetNodeArch", ([NODE_ID]))
- except:
- log.write("WARNING : Failed to query node arch - using %(default_arch)s\n"%locals())
- arch = default_arch
+ log.write("WARNING : Failed to parse /etc/planetlab/nodefamily\n")
+ (etc_pldistro,etc_arch)=(None,None)
+ default_pldistro="planetlab"
+ default_arch="i386"
+
+ if api_pldistro:
+ pldistro = api_pldistro
+ log.write ("Using pldistro from pldistro API tag\n")
+ elif etc_pldistro:
+ pldistro = etc_pldistro
+ log.write ("Using pldistro from /etc/planetlab/nodefamily\n")
+ else:
+ pldistro = default_pldistro
+ log.write ("Using default pldistro\n")
+
+ if api_arch:
+ arch = api_arch
+ log.write ("Using arch from arch API tag\n")
+ elif etc_arch:
+ arch = etc_arch
+ log.write ("Using arch from /etc/planetlab/nodefamily\n")
+ else:
+ arch = default_arch
+ log.write ("Using default arch\n")
+
+ log.write ("Using nodefamily=%s-%s\n"%(pldistro,arch))