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: 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 3a6a3e7fa2..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 @@ -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] 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"] 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 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 { 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