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

regression in dashboard disk activity widget. Fixes #1978 #1979

Conversation

phillxnet
Copy link
Member

Recent improvements / bug fixes in the non dashboard by-id name selection has lead to a deviation in algorithms for by-id name resolution leading to a failure in the disk activity widget due to unknown by-id name selection within that widget. This only happens if all by-id names for a given device are of the same length.

Summary:

  • Move dashboard 'temp name -> by-id' map generation to reverse lexicographical to normalise on by-id name selection across the system.
  • Add TODO on potential dashboard code simplification in this area: has performance test pre-requisite.
  • Add unit tests for both prior and current behaviour of get_byid_name_map() to ensure nature of change is understood.

Fixes #1978
See issue text for further context.

@schakrava Ready for review

Testing:
The included additional unit tests indicate prior and proposed behaviour of the changed code with prior behaviour consistent with the observed/reported issue.

./bin/test --settings=test-settings -v 3 -p test_osi*
test_get_byid_name_map (system.tests.test_osi.OSITests) ... ok                                                                                                              
test_get_byid_name_map_prior_command_mock (system.tests.test_osi.OSITests) ... ok  
...

Caveat:
There is currently a failure to build issue in the master branch, db migration / creation related, that was worked around for the development of this issue. It may be pertinent to address this db initialisation / build issue prior to this pr's merge (I believe them to be unrelated). I will open another issue detailing my findings to date and further diagnose it's cause: looks to be related to recent db additions in master that break or surface prior hidden issues associated with clean db creation, as in a fresh build from source.

Recent improvements / bug fixes in the non dashboard by-id name
selection has lead to a deviation in algorithms for by-id name
resolution leading to a failure in the disk activity widget due to
unknown by-id name selection within that widget. This only happens if
all by-id names for a given device are of the same length.

Summary:

- Move dashboard 'temp name -> by-id' map generation to reverse
lexicographical to normalise on by-id name selection across the system.
- Add TODO on potential dashboard code simplification in this area: has
performance test pre-requisite.
- Add unit tests for both prior and current behaviour of
get_byid_name_map() to ensure nature of change is understood.
@schakrava
Copy link
Member

Thanks @phillxnet

@schakrava schakrava merged commit 8ceef40 into rockstor:master Nov 1, 2018
@phillxnet phillxnet deleted the 1978_regression_in_dashboard_disk_activity_widge branch November 4, 2018 11:31
@phillxnet
Copy link
Member Author

@schakrava Cheers.

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

Successfully merging this pull request may close these issues.

regression in dashboard disk activity widget
2 participants