version 0.5.2-2

Signed-off-by: Andy Grover <agrover@redhat.com>
This commit is contained in:
Andy Grover 2018-05-04 12:34:37 -07:00
parent 8c39fc6148
commit fa64785dfd
2 changed files with 75 additions and 1 deletions

View File

@ -0,0 +1,70 @@
From 66fb5f44bf9adcdf6bcedd4810217686a5c8d74d Mon Sep 17 00:00:00 2001
From: Andy Grover <agrover@redhat.com>
Date: Fri, 4 May 2018 12:30:45 -0700
Subject: [PATCH] Prefix commands with entire path
When invoked via dbus activation, we don't have /usr/sbin in our path, so
these commands are failing.
Signed-off-by: Andy Grover <agrover@redhat.com>
---
src/engine/strat_engine/thinpool/thinpool.rs | 4 ++--
src/engine/strat_engine/thinpool/util.rs | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/engine/strat_engine/thinpool/thinpool.rs b/src/engine/strat_engine/thinpool/thinpool.rs
index 15245f5..c153882 100644
--- a/src/engine/strat_engine/thinpool/thinpool.rs
+++ b/src/engine/strat_engine/thinpool/thinpool.rs
@@ -785,7 +785,7 @@ fn setup_metadev
// TODO: Refine policy about failure to run thin_check.
// If, e.g., thin_check is unavailable, that doesn't necessarily
// mean that data is corrupted.
- if execute_cmd(Command::new("thin_check")
+ if execute_cmd(Command::new("/usr/sbin/thin_check")
.arg("-q")
.arg(&meta_dev.devnode()),
&format!("thin_check failed for pool {}", thinpool_name))
@@ -812,7 +812,7 @@ fn attempt_thin_repair(pool_uuid: PoolUuid,
Some(&dm_uuid),
segs_to_table(device, spare_segments))?;
- execute_cmd(Command::new("thin_repair")
+ execute_cmd(Command::new("/usr/sbin/thin_repair")
.arg("-i")
.arg(&meta_dev.devnode())
.arg("-o")
diff --git a/src/engine/strat_engine/thinpool/util.rs b/src/engine/strat_engine/thinpool/util.rs
index 2c1447d..245e6fd 100644
--- a/src/engine/strat_engine/thinpool/util.rs
+++ b/src/engine/strat_engine/thinpool/util.rs
@@ -30,7 +30,7 @@ pub fn execute_cmd(cmd: &mut Command, error_msg: &str) -> StratisResult<()> {
/// Create a filesystem on devnode.
pub fn create_fs(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
- execute_cmd(Command::new("mkfs.xfs")
+ execute_cmd(Command::new("/usr/sbin/mkfs.xfs")
.arg("-f")
.arg("-q")
.arg(&devnode)
@@ -42,13 +42,15 @@ pub fn create_fs(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
/// Use the xfs_growfs command to expand a filesystem mounted at the given
/// mount point.
pub fn xfs_growfs(mount_point: &Path) -> StratisResult<()> {
- execute_cmd(Command::new("xfs_growfs").arg(mount_point).arg("-d"),
+ execute_cmd(Command::new("/usr/sbin/xfs_growfs")
+ .arg(mount_point)
+ .arg("-d"),
&format!("Failed to expand filesystem {:?}", mount_point))
}
/// Set a new UUID for filesystem on the devnode.
pub fn set_uuid(devnode: &Path, uuid: Uuid) -> StratisResult<()> {
- execute_cmd(Command::new("xfs_admin")
+ execute_cmd(Command::new("/usr/sbin/xfs_admin")
.arg("-U")
.arg(format!("{}", uuid))
.arg(&devnode),
--
2.14.3

View File

@ -9,7 +9,7 @@
Name: stratisd
Version: 0.5.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Daemon that manages block devices to create filesystems
License: MPLv2.0
@ -17,6 +17,7 @@ URL: https://github.com/stratis-storage/stratisd
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# https://github.com/stratis-storage/stratisd/pull/916
Patch0001: 0001-deps-update-uuid-to-0.6.patch
Patch0002: 0002-Prefix-commands-with-entire-path.patch
ExclusiveArch: %{rust_arches}
@ -88,6 +89,9 @@ mv %{buildroot}%{_bindir}/stratisd %{buildroot}%{_libexecdir}/stratisd
%{_mandir}/man8/stratisd.8*
%changelog
* Fri May 4 2018 Andy Grover <agrover@redhat.com> - 0.5.2-2
- Add 0002-Prefix-commands-with-entire-path.patch
* Tue May 1 2018 Andy Grover <agrover@redhat.com> - 0.5.2-1
- Update to 0.5.2