From d7d27706e3e5d433c1426c76988480e328a909b9 Mon Sep 17 00:00:00 2001 From: Bryan Gurney Date: Tue, 26 Mar 2024 10:35:01 -0400 Subject: [PATCH 1/7] github actions: update recommended Rust to 1.77.0 Signed-off-by: Bryan Gurney --- .github/workflows/cargo.yml | 2 +- .github/workflows/fedora.yml | 28 ++++++++++++++-------------- .github/workflows/main.yml | 10 +++++----- .github/workflows/ubuntu.yml | 26 +++++++++++++------------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 2f7c0bbed8..ee07bebb79 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -51,7 +51,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Check out ci repo run: git clone https://github.com/stratis-storage/ci.git - name: Run comparisons of version specs with available Fedora packages diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index ca4a51acde..efcdb37282 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -40,45 +40,45 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min-no-systemd - toolchain: 1.75.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-utils - toolchain: 1.75.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-no-ipc - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratisd-tools - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: >- TANG_URL=localhost make -f Makefile test-clevis-loop-should-fail - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-no-ipc - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -113,7 +113,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 273d0c47b4..26e289d34d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,10 +40,10 @@ jobs: matrix: include: - task: make -f Makefile fmt-ci - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: rustfmt - task: make -f Makefile check-typos - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -83,7 +83,7 @@ jobs: TANG_URL=tang RUST_LOG=stratisd=debug make -f Makefile test-clevis-loop - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo image: fedora:39 # CURRENT DEVELOPMENT ENVIRONMENT runs-on: ubuntu-22.04 @@ -217,7 +217,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Run stratisd-min cli tests run: make test-stratisd-min - name: Run stratis-min cli tests @@ -267,7 +267,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: components: cargo - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN - name: Build stratisd run: PROFILEDIR=debug make -f Makefile build-all - name: Install stratisd diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index dad447688d..3e1841d6ec 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -40,40 +40,40 @@ jobs: matrix: include: - task: make -f Makefile clippy - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: clippy - task: PROFILEDIR=debug make -f Makefile build - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-min-no-systemd - toolchain: 1.75.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-utils - toolchain: 1.75.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile build-no-ipc - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: PROFILEDIR=debug make -f Makefile stratisd-tools - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile docs-ci - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile test - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-min - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo - task: make -f Makefile build-no-ipc - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: @@ -111,7 +111,7 @@ jobs: matrix: include: - task: RUST_LOG=stratisd=debug make -f Makefile test-loop - toolchain: 1.76.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN + toolchain: 1.77.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN components: cargo runs-on: ubuntu-22.04 container: From fb555c0af121f7aa3f7051f034a228425c68dedd Mon Sep 17 00:00:00 2001 From: mulhern Date: Thu, 28 Mar 2024 10:06:28 -0400 Subject: [PATCH 2/7] Add a debug entry for writing metadata to pool Signed-off-by: mulhern --- src/engine/strat_engine/backstore/blockdevmgr.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/strat_engine/backstore/blockdevmgr.rs b/src/engine/strat_engine/backstore/blockdevmgr.rs index 489c6a2ef1..d41fa7c54d 100644 --- a/src/engine/strat_engine/backstore/blockdevmgr.rs +++ b/src/engine/strat_engine/backstore/blockdevmgr.rs @@ -294,6 +294,11 @@ impl BlockDevMgr { .iter_mut() .filter(|b| b.max_metadata_size().bytes() >= data_size); + debug!( + "Writing {} of pool level metadata to devices in pool", + data_size + ); + // TODO: consider making selection not entirely random, i.e, ensuring // distribution of metadata over different paths. let saved = candidates From 8b6e285feb6b76b0bd280f78e7a8b740f0ee7cd3 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 3 Apr 2024 14:56:08 -0400 Subject: [PATCH 3/7] Allow two frequenty used abbreviations Signed-off-by: mulhern --- _typos.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_typos.toml b/_typos.toml index 53a81e840e..52e9e202e5 100644 --- a/_typos.toml +++ b/_typos.toml @@ -4,6 +4,14 @@ Strat = "Strat" strat = "strat" STRAT = "STRAT" +# Misidentified as misspelling of "ME" +MEK = "MEK" + +[default.extend-identifiers] +# Misidentified as misspelling of "on" +pn = "pn" + + [files] # typos tries to correct the spelling of D-Bus signatures extend-exclude = ["_introspect.py", "api.rs"] From 00ee6ce0f159a6f806f34af1d343e10259e1a327 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 3 Apr 2024 14:18:36 -0400 Subject: [PATCH 4/7] Create pipe so file descriptor is not dropped early Previously the file descriptor was dropped before the request could be completed because the entire expression including the pipe() call was expanded within the macro. Signed-off-by: mulhern --- src/jsonrpc/client/pool.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jsonrpc/client/pool.rs b/src/jsonrpc/client/pool.rs index d85a56096c..f253272bde 100644 --- a/src/jsonrpc/client/pool.rs +++ b/src/jsonrpc/client/pool.rs @@ -34,9 +34,9 @@ pub fn pool_start( let password = prompt_password()? .ok_or_else(|| StratisError::Msg("Password provided was empty".to_string()))?; + let (read_end, write_end) = pipe()?; + write(write_end, password.as_bytes())?; do_request_standard!(PoolStart, id, unlock_method; { - let (read_end, write_end) = pipe()?; - write(write_end, password.as_bytes())?; read_end.as_raw_fd() }) } else { From 96209abeac648996bdca39603fe491d8f6e747ee Mon Sep 17 00:00:00 2001 From: John Baublitz Date: Wed, 3 Apr 2024 17:57:24 -0400 Subject: [PATCH 5/7] Fix for /etc/fstab setup script --- systemd/stratis-fstab-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/stratis-fstab-setup b/systemd/stratis-fstab-setup index f4619b92b8..6123526a95 100755 --- a/systemd/stratis-fstab-setup +++ b/systemd/stratis-fstab-setup @@ -34,7 +34,7 @@ if $(stratis-min pool is-stopped "$POOL_UUID"); then echo Failed to start pool with UUID $POOL_UUID using passphrase. >&2 fi fi - if ! $(stratis-min pool is-encrypted); then + if ! $(stratis-min pool is-encrypted "$POOL_UUID"); then if stratis-min pool start "$POOL_UUID"; then exit 0 else From 7f55c08cd9d50abbdb2859ab181cb60a9bec1e64 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 3 Apr 2024 16:53:55 -0400 Subject: [PATCH 6/7] Increase libc dependency lower bound to 0.2.153 Signed-off-by: mulhern --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3a6a3e7fa2..427fc7544a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,7 +138,7 @@ version = "0.3.2" optional = true [dependencies.libc] -version = "0.2.147" +version = "0.2.153" optional = true [dependencies.libcryptsetup-rs] From c85286a2784c18d2b221940758da60e84b19d239 Mon Sep 17 00:00:00 2001 From: mulhern Date: Wed, 3 Apr 2024 16:44:29 -0400 Subject: [PATCH 7/7] version 3.6.7 Signed-off-by: mulhern --- CHANGES.txt | 16 ++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1183f3a1b9..136a3ec161 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,19 @@ +stratisd 3.6.7 +============== +Recommended Rust toolchain version: 1.77.0 +Recommended development platform for Python development: Fedora 39 + +* New commits: + * Increase libc dependency lower bound to 0.2.153 + +* Cherry-picked commits: + * github actions: update recommended Rust to 1.77.0 + * Add a debug entry for writing metadata to pool + * Allow two frequenty used abbreviations + * Create pipe so file descriptor is not dropped early + * Fix for /etc/fstab setup script + + stratisd 3.6.6 ============== Recommended Rust toolchain version: 1.76.0 diff --git a/Cargo.lock b/Cargo.lock index 061912dce1..0ef8cf1570 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1286,7 +1286,7 @@ dependencies = [ [[package]] name = "stratisd" -version = "3.6.6" +version = "3.6.7" dependencies = [ "assert_cmd", "assert_matches", diff --git a/Cargo.toml b/Cargo.toml index 427fc7544a..13e061028a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stratisd" -version = "3.6.6" +version = "3.6.7" authors.workspace = true edition.workspace = true rust-version.workspace = true