radiocosmology / alpenhorn

Alpenhorn is a service for managing an archive of scientific data.
MIT License
2 stars 1 forks source link

Revise mechanics in `client.format_transport` #116

Closed cubranic closed 5 years ago

cubranic commented 5 years ago

Using parted seems to trigger a reload of udev rules and so the device file goes missing briefly after it returns. This means that a) we should only use parted if we really have to; and b) include a short sleep after it to let udev to recreate the device files so the next process (e2label or mkfs) can find it.

Also, it's now recommended to use functions in module subprocess to run subprocesses instead of os.system and os.popen/popen3.