cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] rgmanager: Don't use the resource name in tmp file names
@ 2012-09-18 13:56 Ryan McCabe
  2012-09-18 17:51 ` Lon Hohberger
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan McCabe @ 2012-09-18 13:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Patch from  John Ruemker <jruemker@redhat.com>

This patch fixes a regression in the fs resource agent that caused
mktemp to fail to create a tmp file during status operations when
the resource name contains the '/' character.

Resolves: rhbz#858022

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
 rgmanager/src/resources/fs.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index 147f246..e55e77f 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -560,7 +560,7 @@ mountInUse () {
 	dev=$1
 	mp=$2
 
-	typeset proc_mounts=$(mktemp /tmp/fs-$OCF_RESKEY_name.proc.mounts.XXXXXX)
+	typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
 	cat /proc/mounts > $proc_mounts
 	while read tmp_dev tmp_mp junka junkb junkc junkd; do
 		if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
@@ -612,7 +612,7 @@ isMounted () {
 
 	ret=$NO
 
-	typeset proc_mounts=$(mktemp /tmp/fs-$OCF_RESKEY_name.proc.mounts.XXXXXX)
+	typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
 	cat /proc/mounts > $proc_mounts
 	while read tmp_dev tmp_mp junk_a junk_b junk_c junk_d
 	do
@@ -970,7 +970,7 @@ Unknown file system type '$fstype' for device $dev.  Assuming fsck is required."
 	#
 	if [ -n "$fsck_needed" ] || [ "${OCF_RESKEY_force_fsck}" = "yes" ] ||\
 	   [ "${OCF_RESKEY_force_fsck}" = "1" ]; then
-		typeset fsck_log=$(mktemp /tmp/fs-$OCF_RESKEY_name.fsck.log.XXXXXX)
+		typeset fsck_log=$(mktemp /tmp/fs.fsck.log.XXXXXX)
 		ocf_log debug "Running fsck on $dev"
 		fsck -p $dev >> $fsck_log 2>&1
 		ret_val=$?
-- 
1.7.11.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] rgmanager: Don't use the resource name in tmp file names
  2012-09-18 13:56 [Cluster-devel] [PATCH] rgmanager: Don't use the resource name in tmp file names Ryan McCabe
@ 2012-09-18 17:51 ` Lon Hohberger
  0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2012-09-18 17:51 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On 09/18/2012 09:56 AM, Ryan McCabe wrote:
> Patch from  John Ruemker <jruemker@redhat.com>
> 
> This patch fixes a regression in the fs resource agent that caused
> mktemp to fail to create a tmp file during status operations when
> the resource name contains the '/' character.
> 
> Resolves: rhbz#858022
> 
> Signed-off-by: Ryan McCabe <rmccabe@redhat.com>

Reviewed-by: Lon Hohberger <lhh@redhat.com>


> ---
>  rgmanager/src/resources/fs.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
> index 147f246..e55e77f 100755
> --- a/rgmanager/src/resources/fs.sh
> +++ b/rgmanager/src/resources/fs.sh
> @@ -560,7 +560,7 @@ mountInUse () {
>  	dev=$1
>  	mp=$2
>  
> -	typeset proc_mounts=$(mktemp /tmp/fs-$OCF_RESKEY_name.proc.mounts.XXXXXX)
> +	typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
>  	cat /proc/mounts > $proc_mounts
>  	while read tmp_dev tmp_mp junka junkb junkc junkd; do
>  		if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then
> @@ -612,7 +612,7 @@ isMounted () {
>  
>  	ret=$NO
>  
> -	typeset proc_mounts=$(mktemp /tmp/fs-$OCF_RESKEY_name.proc.mounts.XXXXXX)
> +	typeset proc_mounts=$(mktemp /tmp/fs.proc.mounts.XXXXXX)
>  	cat /proc/mounts > $proc_mounts
>  	while read tmp_dev tmp_mp junk_a junk_b junk_c junk_d
>  	do
> @@ -970,7 +970,7 @@ Unknown file system type '$fstype' for device $dev.  Assuming fsck is required."
>  	#
>  	if [ -n "$fsck_needed" ] || [ "${OCF_RESKEY_force_fsck}" = "yes" ] ||\
>  	   [ "${OCF_RESKEY_force_fsck}" = "1" ]; then
> -		typeset fsck_log=$(mktemp /tmp/fs-$OCF_RESKEY_name.fsck.log.XXXXXX)
> +		typeset fsck_log=$(mktemp /tmp/fs.fsck.log.XXXXXX)
>  		ocf_log debug "Running fsck on $dev"
>  		fsck -p $dev >> $fsck_log 2>&1
>  		ret_val=$?
> 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-18 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 13:56 [Cluster-devel] [PATCH] rgmanager: Don't use the resource name in tmp file names Ryan McCabe
2012-09-18 17:51 ` Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).