Bug 1848025

Summary: sybaseASE: Resource fails to complete a probe operation without access to $sybase_home [RHEL 8]
Product: Red Hat Enterprise Linux 8 Reporter: Chad Newsom <cnewsom>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: agk, akaiser, cfeist, cluster-maint, fdinitto, nwahl, phagara, sbradley
Target Milestone: rcKeywords: OtherQA
Target Release: 8.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: resource-agents-4.1.1-72.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1848673 (view as bug list) Environment:
Last Closed: 2021-05-18 15:11:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1848673, 1862463    

Description Chad Newsom 2020-06-17 14:39:22 UTC
Description of problem:

ocf:heartbeat:sybaseASE fails to start when symlinks are used for sybase_home

Version-Release number of selected component (if applicable):

resource-agents-4.1.1-30.el7_7.7.x86_64


Steps to Reproduce:
1. create ocf:heartbeat:sybaseASE using a symlink to a directory on cluster managed storage as the sybase_home attribute

Actual results:

Resource fails since the probe will return OCF_ERR_GENERIC (1) instead of OCF_NOT_RUNNING (7) or OCF_SUCCESS (0).


Expected results:

The resource agent should be configured in such a way that should be able to accurately report when the resource isn't running even when symlinks are used.


Additional info:


This appears to be the result of verify_all() which returns OCF_ERR_ARGS, but then the caller converts that to OCF_ERR_GENERIC

        # Check if the parameter 'sybase_home' is a valid path.
        if [[ ! -d $OCF_RESKEY_sybase_home ]]
        then
                ocf_log err "sybaseASE: The sybase_home '$OCF_RESKEY_sybase_home' doesn't exist."
                return $OCF_ERR_ARGS
        fi
------------------------------------------(cut)-----------------------------------------------------------

        # Check if the directory /$OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ase exists.
        if [[ ! -d $OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ase ]]
        then
                ocf_log err "sybaseASE: The directory '$OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ase' doesn't exist."
                return $OCF_ERR_ARGS
        fi
------------------------------------------(cut)-----------------------------------------------------------

        # Check if the directory /$OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ocs exists.
        if [[ ! -d $OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ocs ]]
        then
                ocf_log err "sybaseASE: The directory '$OCF_RESKEY_sybase_home/$OCF_RESKEY_sybase_ocs' doesn't exist."
                return $OCF_ERR_ARGS
        fi

Comment 13 Patrik Hagara 2020-10-14 15:27:05 UTC
qa_ack+, OtherQA verification to be done by Oyvind

Comment 17 Patrik Hagara 2021-01-21 09:47:07 UTC
Moving to Verified as per comment#16. Thanks Oyvind!

Comment 19 errata-xmlrpc 2021-05-18 15:11:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (resource-agents bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1736