Scheduled Scrub not running

@magicalyak by way of addition to my last post I’ve finally managed to duplicate your issue as per my last post details.
I essentially jury rigged the url string to contain a name rather than a number and:

(Cron Daemon) to rockstor

18:15
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/handlers.py", line 76, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.7/logging/handlers.py", line 154, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 324, in getMessage
    msg = str(self.msg)
TypeError: __str__ returned non-string (type list)
Logged from file pool_scrub.py, line 83
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/handlers.py", line 76, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.7/logging/handlers.py", line 154, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 324, in getMessage
    msg = str(self.msg)
TypeError: __str__ returned non-string (type list)
Logged from file pool_scrub.py, line 44

(Line numbers are a little different as this code is post code additions in the prior indicated pending pull request.)

with the equivalent log entries to the last ones posted by you:

[21/Aug/2017 18:15:01] DEBUG [scripts.scheduled_tasks.pool_scrub:92] task(7) finished with state(error).
[21/Aug/2017 18:20:02] ERROR [scripts.scheduled_tasks.pool_scrub:81] Failed to start scrub at pools/fakename/scrub
[21/Aug/2017 18:20:02] DEBUG [scripts.scheduled_tasks.pool_scrub:37] update_state constructs url=pools/fakename/scrub/status
[21/Aug/2017 18:20:02] ERROR [scripts.scheduled_tasks.pool_scrub:42] Failed to get scrub status at pools/fakename/scrub/status
[21/Aug/2017 18:20:02] DEBUG [scripts.scheduled_tasks.pool_scrub:92] task(7) finished with state(error).

So finally we got there.

Thanks @peter and @magicalyak and @Dragon2611 for sticking with this one.

I have now closed the following issue which was opened to track the development on the now solved:

“… returned non-string (type list)” mistery.

Thanks folks. We got there in the end.

@peter

and

Yes I noticed that, thanks for bringing it up. Wasn’t ignoring it just trying to get the more functional issues resolved first. Turns out as you suspected it’s just a bug in end time update logic.

Re 2 second task timing !!:

and the consequent fix in a pending pull request:

There may be delays as the last 2 pull requests indicated here make changes to the same file for different reasons but hopefully review and merge will proceed smoothly and the relevant fixes should be out in due cause.

Thanks for your assistance and feedback in this area.

@magicalyak

Not as far as I know, fancy making one in the GitHub issues; you could include an idea of how you think it might be implemented, ie from the UI perspective: maybe a link with a dialog response explaining the action that is about to happen type thing? Nice.

Cheers and thanks again for helping to get this scheduled scrub thing a little more sorted.

Yeah I didn’t realize I needed the experimental builds enabled, I thought you meant latest stable.

For anyone else with this issue, you’ll need to enable testing for the feature to work at the moment and delete and re-add the scrub jobs.

1 Like

@Dragon2611, @magicalyak, and @peter.

Notification that the last 2 fixes referenced in and related to this thread have now been merged in the latest testing channel update:

Thanks again folks for your contributions here.

Scrub is now working but something must have happened to my rockons. Now have a starting… for plex and even a reboot didn’t fix it. I’m sure it’s completely unrelated but might be related to the testing updates? If you’re on the testing updates can you verify a rockon update doesn’t generate an error message?