Add cpu count check to launch node
We've seen Noble nodes booting in rax legacy come up with a single vcpu even when we've requested 8. Avoid unexpected reduction in CPU counts when booting new noble nodes by explicitly checking for at least 2 CPUs. We don't want to discover a month after replacing a server that we need to replace it again because it booted on the wrong hypervisor. Change-Id: I043dc8d6eb1131d0fec49734c7959e6c123f8f8f
This commit is contained in:
parent
dbb13be886
commit
59ca749779
@ -131,9 +131,17 @@ def bootstrap_server(server, key, name, volume_device, keep,
|
||||
|
||||
ssh_client = utils.ssh_connect(ip, 'root', ssh_kwargs, timeout=timeout)
|
||||
|
||||
if "sse4_2" not in ssh_client.ssh('cat /proc/cpuinfo', quiet=True)[1]:
|
||||
cpuinfo = ssh_client.ssh('cat /proc/cpuinfo', quiet=True)[1]
|
||||
if "sse4_2" not in cpuinfo:
|
||||
raise Exception("CPU does not support x86-64-v2 (sse4_2)")
|
||||
|
||||
cpucount = 0
|
||||
for line in cpuinfo.split(\n):
|
||||
if line.startswith('processor\t:'):
|
||||
cpucount = cpucount + 1
|
||||
if cpucount < 2:
|
||||
raise Exception("Node has less than 2 CPUs")
|
||||
|
||||
if not ignore_ipv6:
|
||||
# Something up with RAX images that they have the ipv6 interface in
|
||||
# /etc/network/interfaces but eth0 hasn't noticed yet; reload it
|
||||
|
Loading…
x
Reference in New Issue
Block a user