{"action":"created","issue":{"url":"https://api.github.com/repos/rockstor/rockstor-core/issues/752","labels_url":"https://api.github.com/repos/rockstor/rockstor-core/issues/752/labels{/name}","comments_url":"https://api.github.com/repos/rockstor/rockstor-core/issues/752/comments","events_url":"https://api.github.com/repos/rockstor/rockstor-core/issues/752/events","html_url":"https://github.com/rockstor/rockstor-core/issues/752","id":95903218,"number":752,"title":"scrub status parsing error on pools page \"invalid literal for int() ...\"","user":{"login":"phillxnet","id":2521585,"avatar_url":"https://avatars.githubusercontent.com/u/2521585?v=3","gravatar_id":"","url":"https://api.github.com/users/phillxnet","html_url":"https://github.com/phillxnet","followers_url":"https://api.github.com/users/phillxnet/followers","following_url":"https://api.github.com/users/phillxnet/following{/other_user}","gists_url":"https://api.github.com/users/phillxnet/gists{/gist_id}","starred_url":"https://api.github.com/users/phillxnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillxnet/subscriptions","organizations_url":"https://api.github.com/users/phillxnet/orgs","repos_url":"https://api.github.com/users/phillxnet/repos","events_url":"https://api.github.com/users/phillxnet/events{/privacy}","received_events_url":"https://api.github.com/users/phillxnet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-19T10:06:42Z","updated_at":"2015-07-22T08:55:30Z","closed_at":null,"body":"As reported by sirhcjw in forum post:- http://forum.rockstor.com/t/error-when-clicking-on-pool/225/3\r\nand assisted by @gkadillak \r\n\r\nPools page showing:-\r\nError!\r\ninvalid literal for int() with base 10: 'after'\"\r\n\r\n```\r\n[18/Jul/2015 17:10:37] ERROR [storageadmin.util:38] request path: /api/pools/pool01/scrub method: GET data:\r\n[18/Jul/2015 17:10:37] ERROR [storageadmin.util:39] exception: invalid literal for int() with base 10: 'after'\r\nTraceback (most recent call last):\r\nFile \"/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py\", line 40, in handleexception\r\nyield\r\nFile \"/opt/rockstor/src/rockstor/storageadmin/views/pool_scrub.py\", line 46, in get_queryset\r\nself.scrubstatus(pool, disk)\r\nFile \"/opt/rockstor/eggs/Django-1.6.2-py2.7.egg/django/db/transaction.py\", line 399, in inner\r\nreturn func(*args, **kwargs)\r\nFile \"/opt/rockstor/src/rockstor/storageadmin/views/pool_scrub.py\", line 56, in scrubstatus\r\ncur_status = scrub_status(pool, disk.name)\r\nFile \"/opt/rockstor/src/rockstor/fs/btrfs.py\", line 627, in scrub_status\r\nstats['duration'] = int(out[1].split()[-2])\r\nValueError: invalid literal for int() with base 10: 'after'\r\n```\r\n\r\nsirhcjw diagnosed as scrub status related:-\r\n```\r\nbtrfs scrub status /mnt2/pool01\r\nscrub status for cdc962b5-f6f6-45b4-bfc0-17316b3c1d7f\r\nscrub started at Mon Jul 13 22:03:23 2015 and finished after 01:03:48\r\ntotal bytes scrubbed: 1.30TiB with 1632 errors\r\nerror details: read=4 csum=1628\r\ncorrected errors: 1632, uncorrectable errors: 0, unverified errors: 0\r\n\r\nReturns this.\r\n\r\nI kicked off another scrub as from looking at the code and the error I figured it was not handling what was being returned and presto fixed.\r\n\r\nSo there is a bug.\r\n\r\nCan this please be looked at and addressed.\r\n\r\nThanks\r\n\r\nChris\r\n```"},"comment":{"url":"https://api.github.com/repos/rockstor/rockstor-core/issues/comments/123626365","html_url":"https://github.com/rockstor/rockstor-core/issues/752#issuecomment-123626365","issue_url":"https://api.github.com/repos/rockstor/rockstor-core/issues/752","id":123626365,"user":{"login":"phillxnet","id":2521585,"avatar_url":"https://avatars.githubusercontent.com/u/2521585?v=3","gravatar_id":"","url":"https://api.github.com/users/phillxnet","html_url":"https://github.com/phillxnet","followers_url":"https://api.github.com/users/phillxnet/followers","following_url":"https://api.github.com/users/phillxnet/following{/other_user}","gists_url":"https://api.github.com/users/phillxnet/gists{/gist_id}","starred_url":"https://api.github.com/users/phillxnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillxnet/subscriptions","organizations_url":"https://api.github.com/users/phillxnet/orgs","repos_url":"https://api.github.com/users/phillxnet/repos","events_url":"https://api.github.com/users/phillxnet/events{/privacy}","received_events_url":"https://api.github.com/users/phillxnet/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T08:55:30Z","updated_at":"2015-07-22T08:55:30Z","body":"Additional info and finding from KarstenV on the same forum thread:- http://forum.rockstor.com/t/error-when-clicking-on-pool/225/10\r\n\r\n\"... The command was \"btrfs scrub start -B -d /dev/sdx\".\r\nThe -B tells the btrfs scrub, to not run in the background. Then you can exit out by doing Ctrl-c.\r\nAfter having run a partial scrub and exiting out this way, the pool was accessible in the web interface again.\r\nThis is not a fix to the original problem, but it does make it possible to access the pool, and add/remove disks / do other maintenance. ...\"\r\n\r\nCopying here to add to the know examples of triggers and workarounds.\r\nThanks to KarstenV for this find.\r\n"}}