Skip to content

storagepool_size division by zero with empty PDs/pools #2

Open
@infernix

Description

@infernix

For empty PDs and/or storage pools (no SDSes), this happens when: stats = cluster.storagepool_size(pd, pool)

  File "/usr/lib/python2.7/site-packages/siolib/scaleio.py", line 767, in storagepool_size
    'capacityLimitInKb') / sds_count
ZeroDivisionError: integer division or modulo by zero

Obviously not a common scenario but some sanity checks should be put in place; iteration over just newly created empty PDs and/or storage pools may trip over this and break execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions