-
Notifications
You must be signed in to change notification settings - Fork 138
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
[Config restore] Failure to restore pool scrub task when pool ID has changed #2508
Comments
We currently use the pool ID for a scrub scheduled task in a config backup file as is. If this pool now has a different ID in the target system (the one where the config backup file is being restored), this will lead to a failure in restoring the pool scrub task. This commit thus implements a simple conversion logic in which we fetch the pool ID for the given pool name from the target system's database.
A simple conversion logic was added in cffa735 as proof of concept. With this commit applied, pool scrub tasks are restored without errors. |
We currently use the pool ID for a scrub scheduled task in a config backup file as is. If this pool now has a different ID in the target system (the one where the config backup file is being restored), this will lead to a failure in restoring the pool scrub task. This commit thus implements a simple conversion logic in which we fetch the pool ID for the given pool name from the target system's database. Update unit tests accordingly.
@FroggyFlox Nice. I did wonder about this while testing your latest pull request that is now merged. Fancy popping in a pr with your referenced fix for this one. As always much appreciated. I'll try and get our publishing back-end ready for our next rpm release give the recent repo changes, as I think this would be a good addition along with what I've just merged of yours. |
Thanks @phillxnet ! I'll prepare the PR as soon as I have some time. It should (hopefully) all be ready to submit. |
…rrect_pool Convert pool ID in backup file to the one in the database #2508
Closing as Fixed by #2513 |
This issue is identical to #2355 but concerns the scheduled tasks of type pool scrub.
Reproducer
rockpool_scrub
rockpool2_scrub
rock-pool2
thus now has a different pool ID than before.Error:
While the first scrub task was restored successfully, the second one failed:
Contrary to tasks of type snapshot, it seems we have both the pool ID and the pool name in the json_meta. Based on
git
history, this is on purpose and for display of the pool name in UI elements (#1760):rockstor-core/src/rockstor/smart_manager/views/task_scheduler.py
Lines 52 to 54 in 578c53e
The fix for this issue should be similar to #2507: validate the pool ID in the config backup to ensure it reflects the correct pool in the target system.
The text was updated successfully, but these errors were encountered: