From the provided trace I'm wondered what version of ironic-lib you are using? In newton the code looks like [1]
File "/usr/lib/python2.7/dist-packages/ironic_lib/disk_utils.py", line 571, in _is_disk_larger_than_max_size disksize_mb = int(disksize_bytes) // 1024 // 1024
[1] https://github.com/openstack/ironic-lib/blob/stable/newton/ironic_lib/disk_utils.py#L599 disksize_mb = int(disksize_bytes[0].strip()) // 1024 // 1024
From the provided trace I'm wondered what version of ironic-lib you are using? In newton the code looks like [1]
File "/usr/lib/ python2. 7/dist- packages/ ironic_ lib/disk_ utils.py" , line 571, in _is_disk_ larger_ than_max_ size
disksize_mb = int(disksize_bytes) // 1024 // 1024
[1] https:/ /github. com/openstack/ ironic- lib/blob/ stable/ newton/ ironic_ lib/disk_ utils.py# L599 bytes[0] .strip( )) // 1024 // 1024
disksize_mb = int(disksize_