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

Web-UI initiated balance status not updated during execution #1405

Closed
phillxnet opened this Issue Jul 23, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@phillxnet
Member

phillxnet commented Jul 23, 2016

Thanks to @grebnek in the following forum thread for bringing attention to this matter. In an effort to reproduce @grebnek's raid level change update issue I noticed that the balance status fails to update in the Web-UI.
https://forum.rockstor.com/t/finally-build-my-own-nas/1811

Steps to reproduce (Rockstor version 3.8-14.07):-

Had a single disk pool with single raid level.

Resize Pool - Add Disk - Yes to change RAID level - selected raid1 from drop down and ticked additional disk - Next

Refreshed Web-UI to find Pools - "rock-pool" - Balances tab to read:
ID=2, Status=started, Start Time=July 23rd 2016, 5:36:39 pm, Percent finished=0, Errors=(blank)

Expected it to reflect a status of "running" and the relevant percentage done.

The command we use to track this progress executed on the command line gave:

btrfs balance status /mnt2/rock-pool/
Balance on '/mnt2/rock-pool/' is running
73 out of about 117 chunks balanced (74 considered),  38% left

Once completed the Web-UI correctly indicates status=finished, Percent finished=100.

Related function fs/btrfs.py balance_status(pool)

Note that this issue differs from #1062 in that this balance was initiated from the Web-UI, not manually from the command line.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Jul 23, 2016

Member

Please update the indicated forum thread with significant development on this issue.

Member

phillxnet commented Jul 23, 2016

Please update the indicated forum thread with significant development on this issue.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Jul 31, 2016

Member

Having a quick look at this now by way of writing a unit test (against #1022) for /fs/btrfs.py/balance_status() which I suspect is not working as intended.

Member

phillxnet commented Jul 31, 2016

Having a quick look at this now by way of writing a unit test (against #1022) for /fs/btrfs.py/balance_status() which I suspect is not working as intended.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Jul 31, 2016

Member

The problem is not with /fs/btrfs.py/balance_status() but with it's caller:
storageadmin/views/pool_balance.py _balance_status(pool)
I am experimenting with modifications there as part of the #1022.

Member

phillxnet commented Jul 31, 2016

The problem is not with /fs/btrfs.py/balance_status() but with it's caller:
storageadmin/views/pool_balance.py _balance_status(pool)
I am experimenting with modifications there as part of the #1022.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Aug 1, 2016

Member

This issue is now addressed / resolved in pending commits under a different issue ie in #1022.
I will update this issue upon the relevant commits being merged as part of the referenced testing issue.

Member

phillxnet commented Aug 1, 2016

This issue is now addressed / resolved in pending commits under a different issue ie in #1022.
I will update this issue upon the relevant commits being merged as part of the referenced testing issue.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Aug 1, 2016

Member

@schakrava It was easier for me to mend this while I was looking into and developing the tests for balance_status() as I found several balance states that we could easily cater for and report via this existing Web-UI mechanism.

Member

phillxnet commented Aug 1, 2016

@schakrava It was easier for me to mend this while I was looking into and developing the tests for balance_status() as I found several balance states that we could easily cater for and report via this existing Web-UI mechanism.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Aug 3, 2016

Member

Please update the following forum thread when the pending commits are merged.
https://forum.rockstor.com/t/finally-build-my-own-nas/1811
They should be available shortly in a pull request that should be linked to this issue.

Member

phillxnet commented Aug 3, 2016

Please update the following forum thread when the pending commits are merged.
https://forum.rockstor.com/t/finally-build-my-own-nas/1811
They should be available shortly in a pull request that should be linked to this issue.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Sep 23, 2016

Member

The outstanding pr #1418 which addresses this issue has integrated fs unittest commits / enhancements (see my comments in this issue dated 1st Aug), this was intended but as this pr now has conflicts with master I am going to split pr #1418 into 2 pr's freshly based on current master, one specifically addressing this issue and another targeting the fs unittest commits: as requested by @schakrava to aid the merging process. Upon successfully splitting pr #1418 it will be closed and I will reference the relevant new pr for this issue. I am about to open a fresh issue and associated pr for the fs unittest commits / enhancements.

Member

phillxnet commented Sep 23, 2016

The outstanding pr #1418 which addresses this issue has integrated fs unittest commits / enhancements (see my comments in this issue dated 1st Aug), this was intended but as this pr now has conflicts with master I am going to split pr #1418 into 2 pr's freshly based on current master, one specifically addressing this issue and another targeting the fs unittest commits: as requested by @schakrava to aid the merging process. Upon successfully splitting pr #1418 it will be closed and I will reference the relevant new pr for this issue. I am about to open a fresh issue and associated pr for the fs unittest commits / enhancements.

This was referenced Sep 23, 2016

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

add warning to unfiltered balance button tooltip rockstor#1405
Akin to the command line equivalent our button tooltip
should warn of the intensity and potentially long lived
nature of this operation.

(cherry picked from commit 3345dfe)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

add "or Notes" to errors column in balance table rockstor#1405
As this column is used for both errors and general messages
we should have the column title reflect this. An example of a
non error use is 'cancelled at x%' but we still want a status of
finished overall.
Also minor format changes (ie removal of tab char)

(cherry picked from commit eb8ec2d)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

extend balance_status() reporting resolution rockstor#1405
Rename recently added 'aborting' to 'cancelling' and add
the following states as those reported; 'pausing', and,
'paused'.

(cherry picked from commit b7942ad)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

run no filter balances using --full-balance rockstor#1405
This is required to avoid a problematic 10 second pause
where no balance is reported as running during this period.
Simply removes the 'hidden from Web-UI' command line
warning that indicate this to be an intense and length
operation and avoids the 10 second pause.

(cherry picked from commit 24bfa48)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

include 'cancelling', 'pausing' and 'paused' as blocker states rockst…
…or#1405

Previously we only blocked raid changes on pools during balance
states of 'started' and 'running'. Due to recent changes we also need
to block on these additional balance states as seen in the db.
The 'paused' state may not strictly be a blocker but is probably
good practice to block in this state anyway.

(cherry picked from commit 2e3b15b)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 23, 2016

enhance balance status reporting in Web-UI rockstor#1405
Allows for reporting in Web-UI of current state of
progress for a running balance task. Also caters
for future capabilities to report on additional balance
states that will result from the addition of a cancel
/ pause button.

(cherry picked from commit 1abd3da)

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 24, 2016

remove debug logging for issue rockstor#1405
Repair missed commit in git cherry pick / merge procedure
during pr split prior to merge.

schakrava added a commit that referenced this issue Sep 30, 2016

Merge pull request #1445 from phillxnet/1405_Web-UI_initiated_balance…
…_status_enhancement

Web-UI initiated balance status enhancement. Fixes #1405

@schakrava schakrava added this to the Looney Bean milestone Sep 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment