Complete
Details
Assignee
CalebCalebReporter
Bug ClerkBug ClerkLabels
Original estimate
Time remaining
0mComponents
Fix versions
Priority
Low
Details
Details
Assignee
Caleb
CalebReporter
Bug Clerk
Bug ClerkLabels
Original estimate
Time remaining
0m
Components
Fix versions
Priority
Katalon Platform
Katalon Platform
Katalon Platform
Created February 8, 2023 at 2:45 PM
Updated February 27, 2025 at 9:41 PM
Resolved February 13, 2023 at 6:38 PM
23.10 PR: https://github.com/truenas/middleware/pull/10662
Investigating an unrelated problem, I've found many problems with this method. I've fixed the following:
1. pool['encrypt'] logic is calling blocking I/O in the main event loop
2. os.rmdir is blocking I/O for which we were also calling in the main event loop
3. os.rmdir won't recursively remove directories that have contents by design, however, if we export a zpool and the only remaining directory at the top-level of the zpool is `ix-applications`, then we don't need to worry about it and we can recursively remove that since it gets recreated the next time apps plugin is initialized.
4. If an end-user exports a zpool and chooses the option to destroy it, (wipe all the disks associated to said zpool) then we need to wait on `disk.sync_all` since there is potential for the end-user to immediately go back and create a zpool using the same disks and if a new zpool is created using the same disks then there is potential for the webUI to show stale information (because the original `disk.sync_all` hasn't finished)
5. remove f-strings in the logger calls
I've also added some more logging statements to give the end-user a little more of an idea of what's going on when they export a zpool.