ZFS ensure_filesystem call may race with `zfs list` and `zfs create`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- rust
- Domain
- operating-systems
Research direction
Start in illumos-utils/src/zfs.rs at ensure_filesystem and trace its use of dataset_exists before invoking ZFS commands. Confirm the ZFS create behavior described in the issue, then verify that completion is successful when the filesystem or its parents already exist without the prior existence check.
Written by the indexing model from the issue text.
Description
The utility function ensure_filesystem in the illumos-utils ZFS code has the intention of creating a ZFS fileysystem, unless it already exists. It first performs a zfs list via dataset_exists, then a zfs create. This is inherently racy. The zfs create command has a -p flag that will give us the behavior we want here:
-p Creates all the non-existing parent datasets. Datasets created in
this manner are automatically mounted according to the mountpoint
property inherited from their parent. Any property specified on
the command line using the -o option is ignored. If the target
filesystem already exists, the operation completes successfully.
We should switch to using zfs create -p here instead of listing the datasets first.
Per @smklein, this probably isn't a problem yet because we tend to have singletons controlling filesystem allocation. So probably not high priority for now.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/omicron
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
oxidecomputer/omicron#11269 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
oxidecomputer/omicron#11266 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
oxidecomputer/omicron#11260 · 1 comment ·
-
wicket's errors should be better when trying to read sensitive data from ssh without a pseudo-tty Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxidecomputer/omicron#11148 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxidecomputer/omicron#10907 ·
All issues in oxidecomputer/omicron
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100