sys-fs/stratisd-2.0.1-r1

Add patch wich disables xfs uuid change after snapshot create to support RAW volumes. Add patch to disable duplicates UUID and name check because of random failure to activate pool.
This commit is contained in:
Alexander Miroshnichenko 2020-05-20 10:55:01 +03:00
parent c3a70502fc
commit 1291728133
Signed by: alex
GPG Key ID: E93720C6C73A77F4
4 changed files with 74 additions and 1 deletions

View File

@ -1,3 +1,5 @@
AUX 0001-disable-xfs-uuid-change-after-snapshot-create.patch 1682 BLAKE2B 0d3d57d4e7ae2eace8f1e01468facdccf6dcb4516ade548c68004f064c570e8adb1a8750072be81d59f18210bedf72de97cf4e55387bc79911252426e0963d42 SHA512 a363e777088ef015cc0e5eba46d079a2d795fdaa2e0ebd8fc13fe8528e04d8909758aeaa40bc8476a0d5f6189df819cae446e57a9ee633a655a1e724a4db2d57
AUX 0002-duplicate_check-disable.patch 1223 BLAKE2B df38e29ee2d2843505620f1229f7d9486da6c0b2b04995092a0170efc25c2d38eefd71db4117217b8bdfe24d4c9db4cdcf7bb64b1c5a43474381ee906d7c8b0b SHA512 d80a468ec3ea6460e916d9ba6f9fbc3509f4c36e15e1650abac7ac956c568c78615f0d94e150dc1f88fbdb6b1ec8d5426dc898428238d5ee3dadee799f9b5f37
AUX init.d.stratisd-r1 622 BLAKE2B 5c16c592ecbe9b905e0cc844eb98655693c574b50afa71b1196b0a986d8b3cb6e1dad19dfabc61a4b433f07686f7bfb3c28776dd979eee7399757e405397e173 SHA512 8e567c44c00cdf6ca0f1bbaa8c38238e48bf0d319eec7c223735ff81a9516aa45dce96ddc60e9db52c754fa1ddc28902a54b89d9ee3b4d3440cb8efcac2cfeae
DIST aho-corasick-0.6.3.crate 24963 BLAKE2B 7d22a3501664a4324e43a20874fe4d2afcb1576d66f76bcfd894c0ea03b0daefd85e03e20196370dcb86d8c81067c3bc2202889349389c23b876d4b2bf8f2bbd SHA512 4d0d55d8a6657fe13009d66728b7417926325dd9ca4f7ad7cd5d40e59cf0a55b906cd109d724a0b385ee988526535fc64a467ded171419e452c5a8c90196ae45
DIST ansi_term-0.10.2.crate 16642 BLAKE2B 69c001a07e02f48eeea8d63b1a242fc1eeb2ab9cb874e6c0e6cf40efbb6a1d585572330f9b69abb4d8df3012edc6e861854f816571b35aa55ee759fce79f1203 SHA512 ad4572845913cb21fdd9d8c0bffc5fce1571ef62c32fe83fd41262f7955e918400a446077494038299c4c0dfb0bd030d089336b3f169e726a5e15ee5c78ea3b5
@ -114,5 +116,5 @@ DIST winapi-i686-pc-windows-gnu-0.3.2.crate 3143529 BLAKE2B 7327b344038bc568b957
DIST winapi-x86_64-pc-windows-gnu-0.3.2.crate 3165198 BLAKE2B 3e1787d5eef457d1f63602436e3756d9f5c6d5bae070b865bf0597c81c8a38e693423c8734a67a008439624ba2f2bc612162e783fd6130de9f7226699514281a SHA512 a471fa60252eb1f351881fba0e1a41ef3e4992985c0841450a5057e530490f52c842651ffd0cdfd428d46f78a7e6990b5384f3af819aa852933ac5fa6abf91c1
DIST wincolor-0.1.6.crate 4799 BLAKE2B 37e72b9603d912b65dd59fe74f1158dd87783ef10511527e50795efc28711348a4c34ee27a2cb4ab523389f443c66ede77c471dd8c2e1bfadb6e8f22726e634e SHA512 d8d9e3a16918844d82cf1cddd7ffdd35cbeb8367b661108cc392d5ce636c270a27a307a4d0307553103356db2958114f269b5a007e4271dd1e6039d7c737e374
EBUILD stratisd-1.0.6.ebuild 2841 BLAKE2B bf8b3918b4624e5bac2476e9e41f70a475278bbe95fa6b12dc7317b772d0ba32396b501e484342ad81df0a8759e698795d9a4c987b6731a4a176ee05f2c2b32a SHA512 7bcea647d779c3c795df421501a5d4efd13ca3c19aef839091234a623cc1922a170cc6bcdd8897881046ed7747a706508b954d0a7d991c6f56ca81faa97b08b6
EBUILD stratisd-2.0.1.ebuild 2940 BLAKE2B f78ecf3258409849588d1d4b438ef582ab705166119671d96c124acb6fd1acac749d93c8005c53736f649cbf9f98ef8e2dfd2853bdcc8a9ede36786489e5aba9 SHA512 c9ba4a1edbfda1650b76f8e713ec54cd4ecfc798e02fb69efd007c18f4ee927d071720c0c68a145e2d7a6e44370ed6c9f58fe7168abac8e1ebb2bccddb4ab06e
EBUILD stratisd-2.0.1-r1.ebuild 3244 BLAKE2B 8b55741e905a879e19f14278ab314adedd41b89ce6b8d9b29e7ea8f35628f709ccb499426be9d1c62547b41871a11c4e200d94fed0f01f889ddf89ec1889b015 SHA512 63dac89f7fa43c14be7a4cbe222a3f9ad32596608f3a65ce36ece4ec761bc8a2ff041fe38615961f48646f71fbbcd78f3e57cba22f8a0a79215eb17dffef0342
MISC metadata.xml 364 BLAKE2B 05556be8a2ea9f74b4592df7eb2038f3baee6c2863129b938540e509c241ede9651e8221dcc9abf13f015af316aafefafcf9e9121034cdaa1d5967b910e67be1 SHA512 ae850f4a01394975342a4e078a1486a179c4155cb262ad89a25073da25823d48989f7cb34673f4c71520f624f8619cb5932bff62b0c912af27ecc71fe8327a52

View File

@ -0,0 +1,44 @@
From ef8231267c4ebb54977e3ea3d389693b20dcf1a1 Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <alex@millerson.name>
Date: Sun, 29 Mar 2020 12:20:08 +0300
Subject: [PATCH] disable xfs uuid change after snapshot create
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/engine/strat_engine/cmd.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/engine/strat_engine/cmd.rs b/src/engine/strat_engine/cmd.rs
index 5265ed19ff03..b9dac8a72fbb 100644
--- a/src/engine/strat_engine/cmd.rs
+++ b/src/engine/strat_engine/cmd.rs
@@ -46,6 +46,7 @@ const THIN_CHECK: &str = "thin_check";
const THIN_REPAIR: &str = "thin_repair";
const UDEVADM: &str = "udevadm";
const XFS_DB: &str = "xfs_db";
+const BINTRUE: &str = "true";
const XFS_GROWFS: &str = "xfs_growfs";
lazy_static! {
@@ -55,6 +56,7 @@ lazy_static! {
(THIN_REPAIR.to_string(), find_binary(THIN_REPAIR)),
(UDEVADM.to_string(), find_binary(UDEVADM)),
(XFS_DB.to_string(), find_binary(XFS_DB)),
+ (BINTRUE.to_string(), find_binary(BINTRUE)),
(XFS_GROWFS.to_string(), find_binary(XFS_GROWFS)),
]
.iter()
@@ -148,7 +150,7 @@ pub fn xfs_growfs(mount_point: &Path) -> StratisResult<()> {
/// Set a new UUID for filesystem on the devnode.
pub fn set_uuid(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
execute_cmd(
- Command::new(get_executable(XFS_DB).as_os_str())
+ Command::new(get_executable(BINTRUE).as_os_str())
.arg("-x")
.arg(format!("-c uuid {}", uuid))
.arg(devnode),
--
2.24.1

View File

@ -0,0 +1,20 @@
diff -ur stratisd-2.0.1/src/engine/strat_engine/thinpool/thinpool.rs stratisd-2.0.1.new/src/engine/strat_engine/thinpool/thinpool.rs
--- stratisd-2.0.1/src/engine/strat_engine/thinpool/thinpool.rs 2020-02-11 01:07:44.000000000 +0300
+++ stratisd-2.0.1.new/src/engine/strat_engine/thinpool/thinpool.rs 2020-05-19 10:53:32.716859774 +0300
@@ -428,12 +428,12 @@
let mut fs_table = Table::default();
for (name, uuid, fs) in filesystems {
let evicted = fs_table.insert(name, uuid, fs);
- if evicted.is_some() {
+ // if evicted.is_some() {
// TODO: Recover here. Failing the entire pool setup because
// of this is too harsh.
- let err_msg = "filesystems with duplicate UUID or name specified in metadata";
- return Err(StratisError::Engine(ErrorEnum::Invalid, err_msg.into()));
- }
+ // let err_msg = "filesystems with duplicate UUID or name specified in metadata";
+ // return Err(StratisError::Engine(ErrorEnum::Invalid, err_msg.into()));
+ // }
}
let thin_ids: Vec<ThinDevId> = filesystem_metadatas.iter().map(|x| x.thin_id).collect();

View File

@ -137,6 +137,13 @@ RDEPEND="
QA_FLAGS_IGNORED="/sbin/stratisd /usr/libexec/stratisd"
PATCHES=(
# Until feature will be released https://github.com/stratis-storage/project/issues/161
${FILESDIR}/0001-disable-xfs-uuid-change-after-snapshot-create.patch
# Until issue will be fixed https://github.com/stratis-storage/stratisd/issues/1780
${FILESDIR}/0002-duplicate_check-disable.patch
)
src_compile(){
cargo_src_compile --no-default-features
mv "${S}"/target/release/stratisd "${S}"/target/release/stratisd-init