Skip to content

Commit ea74c4b

Browse files
mayastor-borsursotiagolobocastro
committed
Merge #1905 #1915
1905: build(nix): set clang path env var r=tiagolobocastro a=urso Sets CLANG_PATH environment variable in shell.nix to use Nix-provided clang compiler, preventing Rust tooling from falling back to potentially incompatible host system clang compiler. When clang is installed cargo might fallback to /usr/bin/clang instead of using the one setup by the shell.nix environment. Unfortunately, if the clang versions are incompatible, this might lead to errors when linking DPDK/SPDK crypto support with the io-engine. Explicitely setting CLANG_PATH ensure that the correct clang instance will be used. Note: I also did run into this problem even though PATH was set correctly and `which clang` did give me the correct path. 1915: Don't let 1 bad nexus lockup the entire nexus subsystem r=tiagolobocastro a=tiagolobocastro refactor(grpc/nexus): don't take subsystem lock on create/destroy A nexus gets sometimes locked up during unshare, and we're not yet sure of how this happens (ie IO stuck) This change loosens the sequential creation and destruction of nexuses, allowing us to interact with other nexuses when another is locked up. We could also enforce sequential during the happy path, for the subsystem itself? We should also start reporting the stuck nexuses in some way? --- chore: update commitlint config file This should have been modified since I lasted updated the packages, but somehow I must have missed this! Co-authored-by: Steffen Siering <[email protected]> Co-authored-by: Tiago Castro <[email protected]>
3 parents b430d00 + 8e1094f + a76e249 commit ea74c4b

File tree

5 files changed

+45
-27
lines changed

5 files changed

+45
-27
lines changed

commitlint.config.js

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
1-
module.exports = {
2-
extends: ['@commitlint/config-conventional'],
3-
rules: {
4-
'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'example', 'security']],
5-
'code-review-rule': [0, 'always'],
6-
},
7-
defaultIgnores: false,
8-
ignores: [
9-
(message) => message.startsWith('chore(bors): merge pull request #'),
10-
(message) => message.startsWith('Merge #')
11-
],
12-
plugins: [
13-
{
14-
rules: {
15-
'code-review-rule': ({subject}) => {
16-
const REVIEW_COMMENTS = `Please don't merge code-review commits, instead squash them in the parent commit`;
17-
if (subject.includes('code-review')) return [ false, REVIEW_COMMENTS ];
18-
if (subject.includes('review comment')) return [ false, REVIEW_COMMENTS ];
19-
if (subject.includes('address comment')) return [ false, REVIEW_COMMENTS ];
20-
if (subject.includes('addressed comment')) return [ false, REVIEW_COMMENTS ];
21-
return [ true ];
22-
},
23-
},
1+
export default {
2+
rules: {
3+
'type-enum': [2, 'always', ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'example', 'security']],
4+
'code-review-rule': [2, 'always'],
5+
"body-max-line-length": [2, "always", 100],
6+
"footer-leading-blank": [1, "always"],
7+
"footer-max-line-length": [1, "always", 100],
8+
"header-max-length": [1, "always", 100],
9+
"header-trim": [1, "always"],
10+
"subject-case": [1, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
11+
'subject-empty': [2, 'never'],
12+
'subject-full-stop': [2, 'never', '.'],
13+
'subject-max-length': [2, 'always', 80],
14+
'subject-min-length': [2, 'always', 5],
15+
'scope-case': [2, 'always', 'lower-case'],
16+
'body-leading-blank': [2, 'always'],
2417
},
25-
],
18+
defaultIgnores: false,
19+
ignores: [
20+
(message) => message.startsWith('chore(bors): merge pull request #'),
21+
(message) => message.startsWith('Merge pull request #'),
22+
(message) => message.startsWith('Merge #')
23+
],
24+
plugins: [
25+
{
26+
rules: {
27+
'code-review-rule': ({subject}) => {
28+
const REVIEW_COMMENTS = `Please don't merge code-review commits, instead squash them in the parent commit`;
29+
if (subject.includes('code-review')) return [false, REVIEW_COMMENTS];
30+
if (subject.includes('review comment')) return [false, REVIEW_COMMENTS];
31+
if (subject.includes('address comment')) return [false, REVIEW_COMMENTS];
32+
if (subject.includes('addressed comment')) return [false, REVIEW_COMMENTS];
33+
return [true];
34+
},
35+
},
36+
},
37+
],
2638
}

io-engine/src/grpc/v1/nexus.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ impl NexusService {
7575
Some(g) => Some(g),
7676
None => {
7777
return Err(Status::deadline_exceeded(
78-
"Failed to acquire access to object within given timeout".to_string(),
78+
"Failed to acquire access to subsystem within given timeout"
79+
.to_string(),
7980
))
8081
}
8182
}
@@ -373,7 +374,7 @@ impl NexusRpc for NexusService {
373374
let ctx = GrpcClientContext::new(&request, function_name!());
374375
let args = request.into_inner();
375376

376-
self.serialized(ctx, args.uuid.clone(), true, async move {
377+
self.serialized(ctx, args.uuid.clone(), false, async move {
377378
trace!("{:?}", args);
378379
let resv_type = NvmeReservationConv(args.resv_type).try_into()?;
379380
let preempt_policy = NvmePreemptionConv(args.preempt_policy).try_into()?;
@@ -436,7 +437,7 @@ impl NexusRpc for NexusService {
436437
let ctx = GrpcClientContext::new(&request, function_name!());
437438
let args = request.into_inner();
438439

439-
self.serialized(ctx, args.uuid.clone(), true, async move {
440+
self.serialized(ctx, args.uuid.clone(), false, async move {
440441
let rx = rpc_submit::<_, _, nexus::Error>(async move {
441442
trace!("{:?}", args);
442443
nexus_destroy(&args.uuid).await?;

shell.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ let
6262
export PATH="$PATH:$(pwd)/scripts/nix-sudo"
6363
6464
export IO_ENGINE_DIR="$RUST_TARGET_DEBUG"
65+
66+
# Prevent Rust tooling to fallback to potentially incompatible host clang compiler
67+
export CLANG_PATH="$NIX_CC_FOR_TARGET/bin/clang"
6568
'';
6669

6770
shellInfoHook = ''

test/python/pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
log_cli = true
33
log_level = warn
44
console_output_style = classic
5+
asyncio_default_fixture_loop_scope = function

test/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ retrying==1.4.1
1111
requests==2.32.4
1212
docker==7.1.0
1313
pyyaml==6.0.2
14+
typing-extensions==4.13.2

0 commit comments

Comments
 (0)