Skip to content

Commit

Permalink
Merge pull request #3204 from mulkieran/version-3.4.3
Browse files Browse the repository at this point in the history
Version 3.4.3
  • Loading branch information
mulkieran authored Dec 14, 2022
2 parents 4ee8693 + e6af31f commit 2014a0f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
11 changes: 11 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
stratisd 3.4.3
==============
Recommended Rust toolchain version: 1.65.0
Lowest supported Rust toolchain version: 1.62.1

Recommended development platform for Python development: Fedora 36

- Prepare branch:
https://github.com/stratis-storage/stratisd/pull/3203


stratisd 3.4.2
==============
Recommended Rust toolchain version: 1.65.0
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stratisd"
version = "3.4.2"
version = "3.4.3"
authors = ["Stratis Developers <[email protected]>"]
edition = "2021"
rust-version = "1.62.1" # LOWEST SUPPORTED RUST TOOLCHAIN
Expand Down
12 changes: 5 additions & 7 deletions src/engine/strat_engine/backstore/crypt/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,14 @@ impl<'a> TryFrom<&'a Value> for StratisLuks2Token {
STRATIS_TOKEN_DEV_UUID_KEY,
DevUuid
);
let pool_name = check_and_get_key!(
map.get(STRATIS_TOKEN_POOLNAME_KEY)
.and_then(|s| s.as_str())
.map(|s| Name::new(s.to_string())),
STRATIS_TOKEN_POOLNAME_KEY
);
let pool_name = map
.get(STRATIS_TOKEN_POOLNAME_KEY)
.and_then(|s| s.as_str())
.map(|s| Name::new(s.to_string()));
Ok(StratisLuks2Token {
devname,
identifiers: StratisIdentifiers::new(pool_uuid, dev_uuid),
pool_name: Some(pool_name),
pool_name,
})
}
}
Expand Down
16 changes: 15 additions & 1 deletion src/engine/strat_engine/liminal/liminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,21 @@ fn setup_pool(

StratPool::setup(pool_uuid, datadevs, cachedevs, timestamp, &metadata, pool_einfo)
.map(|(name, mut pool)| {
if matches!(pool_name, MaybeInconsistent::Yes | MaybeInconsistent::No(None)) || MaybeInconsistent::No(Some(&name)) != pool_name.as_ref() {
if matches!(pool_name, MaybeInconsistent::Yes | MaybeInconsistent::No(None)) || MaybeInconsistent::No(Some(&name)) != pool_name.as_ref() || pool.blockdevs().iter().map(|(_, _, bd)| {
bd.pool_name()
}).fold(false, |acc, next| {
match next {
Some(Some(name)) => {
if MaybeInconsistent::No(Some(name)) == pool_name.as_ref() {
acc
} else {
true
}
},
Some(None) => true,
None => false,
}
}) {
if let Err(e) = pool.rename_pool(&name) {
warn!("Pool will not be able to be started by name; pool name metadata in LUKS2 token is not consistent across all devices: {}", e);
}
Expand Down

0 comments on commit 2014a0f

Please sign in to comment.