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

Py3.6 System - Scheduled tasks - snapshot & scrub #2570

Closed
phillxnet opened this issue Jun 6, 2023 · 6 comments
Closed

Py3.6 System - Scheduled tasks - snapshot & scrub #2570

phillxnet opened this issue Jun 6, 2023 · 6 comments
Assignees

Comments

@phillxnet
Copy link
Member

Post #2567 in testing branch we have a failure within our Web-UI to reflect a successfully executed snapshot task:
Reproducer - Create a snapshot of say the "home" share, limited to 2 copies with a 5 minute schedule. The resulting task is run by crontab but we fail (via our created script and call back, to update our database on the resulting execution and associated info:

Jun 05 19:30:01 buildvm CRON[22121]: (root) CMD (/opt/rockstor/.venv/bin/st-snapshot 1 \*-*-*-*-*-*)
Jun 05 19:30:02 buildvm CRON[22119]: (root) CMDEND (/opt/rockstor/.venv/bin/st-snapshot 1 \*-*-*-*-*-*)
...
Jun 05 19:35:01 buildvm CRON[23870]: (root) CMD (/opt/rockstor/.venv/bin/st-snapshot 1 \*-*-*-*-*-*)
Jun 05 19:35:01 buildvm CRON[23869]: (root) CMDEND (/opt/rockstor/.venv/bin/st-snapshot 1 \*-*-*-*-*-*)

no-sched-snap-feedback

@phillxnet
Copy link
Member Author

phillxnet commented Jun 7, 2023

We have a potentially corresponding unit test failure as follows:

======================================================================
FAIL: test_post_requests_2 (rockstor.storageadmin.tests.test_snapshot.SnapshotTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/tests/test_snapshot.py", line 156, in test_post_requests_2
    self.assertEqual(response.data[0], e_msg)
AssertionError: "Element 'uvisible' must be a boolean, not (<class 'str'>)." != "Element 'uvisible' must be a boolean, not (<type 'unicode'>)."
- Element 'uvisible' must be a boolean, not (<class 'str'>).
?                                              ^^^^^^^^^
+ Element 'uvisible' must be a boolean, not (<type 'unicode'>).
?                                             +++++++++ ^^^

Unit test failure likely unrelated and now fixed by #2581

@phillxnet
Copy link
Member Author

Linking to related code changes having taken place since this issue was created #2579 where import fixes may have affected this issue. Re-testing now.

@phillxnet phillxnet self-assigned this Jun 7, 2023
@phillxnet
Copy link
Member Author

phillxnet commented Jun 7, 2023

We have a running schedule instantiated via Web-UI with consequent triggers from cron evident:

Jun 07 18:00:01 buildvm CRON[18867]: (root) CMD (/opt/rockstor/.venv/bin/st-snapshot 2 \*-*-*-*-*-*)
Jun 07 18:00:02 buildvm CRON[18865]: (root) CMDEND (/opt/rockstor/.venv/bin/st-snapshot 2 \*-*-*-*-*-*)

But:

buildvm:/opt/rockstor # /opt/rockstor/.venv/bin/st-snapshot 2 \*-*-*-*-*-*
Traceback (most recent call last):
  File "/opt/rockstor/.venv/bin/st-snapshot", line 2, in <module>
    from scripts.scheduled_tasks.snapshot import main
  File "/opt/rockstor/src/rockstor/scripts/scheduled_tasks/snapshot.py", line 22, in <module>
    import crontabwindow  # load crontabwindow module
ModuleNotFoundError: No module named 'crontabwindow'

Given the above we have a continuation her of: #2579

@Hooverdan96
Copy link
Member

again, unrelated to this specifically, but I think there is another instance where the crontab needs to be adjusted:

import crontabwindow # load crontabwindow module

@phillxnet
Copy link
Member Author

@Hooverdan96 Thanks. Yes I'm preparing a pr for both instances now. And have broadened the commit messages accordingly. We are getting there here I think. And these took longer as there was no test coverage !!

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jun 7, 2023
Fix missing import paths for Py3.6.
Affected snapshot & scrub tasks post the Py3.6 transition.
Copywrite date and http to https updated on changed files.
@phillxnet phillxnet changed the title Py3.6 System - Scheduled tasks - snapshot Py3.6 System - Scheduled tasks - snapshot & scrub Jun 7, 2023
Hooverdan96 pushed a commit to Hooverdan96/rockstor-core that referenced this issue Jun 7, 2023
…cheduled_tasks_-_snapshot

Py3.6 Scheduled tasks import paths fix, snapshot & scub rockstor#2570
@phillxnet
Copy link
Member Author

Closing as:
Fixed by #2585

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

No branches or pull requests

2 participants