phillxnet
(Philip Guyton)
September 21, 2017, 4:47pm
2
@magicalyak Hello again.
Not sure quite whats going on but re Rockstor version there was a know ‘corner case’ behaviour, which also related to quotas, that existed in the last stable and was fixed in the following release:
Hello Everyone!
3.9.1-3 is now available! And this is another one from @phillxnet ’s contributions. First is a bugfix in Share mounting mechanism. The other is a really nice enhancement to tracking mount status. Thank you Phil!
Which included the following:
opened 02:29PM - 25 Jul 17 UTC
closed 02:14AM - 31 Jul 17 UTC
bug
Originally reported by KarstenV in the following forum thread, with the trigger … unidentified at the time; in very specific (and potentially pathological) db state instances all shares (subvols) fail to mount as share_helpers.py import_shares() throws a programmatic error when volume_usage() fails to behave as expected. Having now established at least one possible trigger (specific db state) for the indicated behaviour, this issue is opened to address the robustness of the share mounting mechanism in this scenario. An attempt should be made to track the cause of the db field 'pathology' however in any case all mounts should not fail in this scenario so that is the focus of this issue.
Observed error:
```
File "/opt/rockstor/src/rockstor/storageadmin/views/command.py", line 271, in post
import_shares(p, request)
File "/opt/rockstor/src/rockstor/storageadmin/views/share_helpers.py", line 83, in import_shares
volume_usage(pool, share.qgroup, share.pqgroup)
ValueError: need more than 2 values to unpack
```
Resulting in all shares failing to import.
A trigger for this behaviour appears to be a share.pqgroup db value of "-1/-1" which results in volume_usage returning only 2 values when import_shares, as it employs volume_usage's 3 parameter personality, expects 4 values.
Issue authors intended approach to improve robustness in this scenario:
- [x] Extend fs/tests/test_btrfs.py test_volume_usage() unit test to reproduce the observed behaviour.
- [x] Modify volume_usage to guarantee 'actual parameter count' to 'return value count' mapping and verify this mapping via the extended unit test.
- [x] Establish if the trigger db value is 'self healing', ie overwritten, with sane values there after.
Please update to the following forum thread with this issues resolution:
https://forum.rockstor.com/t/after-upgrading-to-3-8-16-11-rock-on-wont-start/2842
and that could cause some shares to have a mount failure.
Try looking at:
journalctl -xe
for clues as something is tripping up the rockstor-botstrap service.