CRITICAL:报错信息为:Traceback (most recent call last):
File "/opt/HDS_volume_expand.py", line 220, in vv_expand_check
vv_size = type_conversion((vv_show_read_1[0]) * 1024)
File "/opt/HDS_volume_expand.py", line 16, in type_conversion
num = math.ceil(float(str))
ValueError: invalid literal for float(): 4.4634.4634.4634.4634.4634.4634.4634.4634.4634.4634.4634.*
CRITICAL:报错信息为:Traceback (most recent call last):
File "/opt/HDS_volume_expand.py", line 291, in
vv_expand_check()
File "/opt/HDS_volume_expand.py", line 229, in vv_expand_check
if int(vv_size) >= type_conversion(prd_volume_expand):
OverflowError: cannot convert float infinity to integer
错误的原因来自于type_conversion((vv_show_read_1[0]) * 1024) (vv_show_read_1[0])是一个字符串,本意是先进行类型转换,再进行*1024的计算,但因为括号忘记删除的原因,导致了字符串和数字相乘,产生了这2个错误, 前者是vv_show_read_1[0]转换后是一个小数,后者vv_show_read_1[0]转换后是这个整数。 这2个问题都可以归咎到inf错误。