Skip to content

Commit

Permalink
Convert CSI listener socket back to non-blocking mode (#47)
Browse files Browse the repository at this point in the history
## Description

Fixes #45

This was a regression in #26, causing both slow shutdowns and general thread
starvation that could cause the operator to hang entirely in single-core environments.

## Review Checklist
- [ ] Code contains useful comments
- [ ] (Integration-)Test cases added (or not applicable)
- [ ] Documentation added (or not applicable)
- [ ] Changelog updated (or not applicable)
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment `bors r+` (or `bors merge`) to merge. [Further information](https://bors.tech/documentation/getting-started/#reviewing-pull-requests)
  • Loading branch information
nightkr committed Feb 8, 2022
1 parent 7ce9ff9 commit 6d51df8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ All notable changes to this project will be documented in this file.
- Store secrets on tmpfs ([#37]).
- Locked down secret permissions by default ([#37]).

### Bugfixes
- Fixed thread starvation and slow shutdowns ([#47]).

[#37]: https://github.com/stackabletech/secret-operator/pull/37
[#47]: https://github.com/stackabletech/secret-operator/pull/47

## [0.1.0] - 2022-02-03

Expand Down
1 change: 1 addition & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ pub fn uds_bind_private(path: impl AsRef<Path>) -> Result<UnixListener, std::io:
}
socket.bind(&socket2::SockAddr::unix(path)?)?;
socket.listen(1024)?;
socket.set_nonblocking(true)?;
UnixListener::from_std(socket.into())
}

0 comments on commit 6d51df8

Please sign in to comment.