Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing name and id for items returned by get_arrays_performance(resolution=1000) #17

Open
b1-luettje opened this issue Aug 11, 2021 · 5 comments

Comments

@b1-luettje
Copy link

If get_arrays_performance of pypureclient.flasharray.FA_2_7.client.Client is called with a (valid) resolution of 1000 the items of the answer do not contain any name or id attributes. If no or any other resolution is passed the attributes are available.

In [17]: fa_client
Out[17]: <pypureclient.flasharray.FA_2_7.client.Client at 0x7f51586865b0>

In [18]: list(fa_client.get_arrays_performance().items)
Out[18]:
[{'bytes_per_mirrored_write': 0,
  'bytes_per_op': 0,
  'bytes_per_read': 0,
  'bytes_per_write': 0,
  'id': 'cc44cb2c-43bd-408d-82ff-e96f036a7dd9',
  'local_queue_usec_per_op': 0,
  'mirrored_write_bytes_per_sec': 0,
  'mirrored_writes_per_sec': 0,
  'name': 'pure-fa-m20',
  'others_per_sec': 0,
  'qos_rate_limit_usec_per_mirrored_write_op': 0,
  'qos_rate_limit_usec_per_read_op': 0,
  'qos_rate_limit_usec_per_write_op': 0,
  'queue_usec_per_mirrored_write_op': 0,
  'queue_usec_per_read_op': 0,
  'queue_usec_per_write_op': 0,
  'read_bytes_per_sec': 0,
  'reads_per_sec': 0,
  'san_usec_per_mirrored_write_op': 0,
  'san_usec_per_read_op': 0,
  'san_usec_per_write_op': 0,
  'service_usec_per_mirrored_write_op': 0,
  'service_usec_per_read_op': 0,
  'service_usec_per_write_op': 0,
  'time': 1628681120447,
  'usec_per_mirrored_write_op': 0,
  'usec_per_other_op': 0,
  'usec_per_read_op': 0,
  'usec_per_write_op': 0,
  'write_bytes_per_sec': 0,
  'writes_per_sec': 0}]

In [19]: list(fa_client.get_arrays_performance(resolution=1000).items)
Out[19]:
[{'bytes_per_mirrored_write': 0,
  'bytes_per_op': 0,
  'bytes_per_read': 0,
  'bytes_per_write': 0,
  'local_queue_usec_per_op': 0,
  'mirrored_write_bytes_per_sec': 0,
  'mirrored_writes_per_sec': 0,
  'others_per_sec': 0,
  'qos_rate_limit_usec_per_mirrored_write_op': 0,
  'qos_rate_limit_usec_per_read_op': 0,
  'qos_rate_limit_usec_per_write_op': 0,
  'queue_usec_per_mirrored_write_op': 0,
  'queue_usec_per_read_op': 0,
  'queue_usec_per_write_op': 0,
  'read_bytes_per_sec': 0,
  'reads_per_sec': 0,
  'san_usec_per_mirrored_write_op': 0,
  'san_usec_per_read_op': 0,
  'san_usec_per_write_op': 0,
  'service_usec_per_mirrored_write_op': 0,
  'service_usec_per_read_op': 0,
  'service_usec_per_write_op': 0,
  'time': 1628681134000,
  'usec_per_mirrored_write_op': 0,
  'usec_per_other_op': 0,
  'usec_per_read_op': 0,
  'usec_per_write_op': 0,
  'write_bytes_per_sec': 2097031,
  'writes_per_sec': 0}]
@purehchan
Copy link
Collaborator

This seems to happen when resolution = 1000. Can you try resolutions other than 1000? Thanks

@b1-luettje
Copy link
Author

This does not happen with any other valid resolution

In [8]: for resolution in [30000,300000,1800000,7200000,28800000,86400000,None,1000]:
   ...:     for attr in ['name', 'id']:
   ...:         assert attr in list(fa_client.get_arrays_performance(resolution=resolution).items)[0].to_dict(), f'Missing attr for {resolution}'
   ...:
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-8-4e0ff85071a3> in <module>
      1 for resolution in [30000,300000,1800000,7200000,28800000,86400000,None,1000]:
      2     for attr in ['name', 'id']:
----> 3         assert attr in list(fa_client.get_arrays_performance(resolution=resolution).items)[0].to_dict(), f'Missing attr for {resolution}'
      4

AssertionError: Missing attr for 1000

@purehchan
Copy link
Collaborator

This is not issue with py-pure-client but server side bug. It will be fixed in the next release.

@b1-luettje
Copy link
Author

I've found other methods with similar issues, should I open further issues or list them here?

Thanks for your work!

@purehchan
Copy link
Collaborator

Please open further issues. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants