U 优化获取主机扩展性兼容性

pull/410/head
vapao 2021-11-24 14:49:05 +08:00
parent 3a9929005c
commit 282f785928
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ def fetch_host_extend(ssh):
code, out = ssh.exec_command_raw('lsblk -dbn -o SIZE -e 11 2> /dev/null')
if code == 0:
for item in out.strip().splitlines():
for item in out.strip().splitlines()[:10]:
item = item.strip()
response['disk'].append(math.ceil(int(item) / 1024 / 1024 / 1024))