Bug 1830716

Summary: nova-evacuate is needlessly verbose
Product: Red Hat Enterprise Linux 8 Reporter: Michele Baldessari <michele>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.2CC: agk, cluster-maint, fdinitto, lmiccini, pkomarov
Target Milestone: rc   
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: resource-agents-4.1.1-51.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:19:19 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:

Description Michele Baldessari 2020-05-03 11:47:47 UTC
Description of problem:
nove evacuate littlers the log at every monitor() operation:
May 01 19:36:48 database-0.redhat.local pacemaker-execd[12359]:  notice: nova-evacuate_monitor_10000:167827:stderr [ Could not query value of evacuate: attribute does not exist ] 
May 01 19:36:58 database-0.redhat.local pacemaker-execd[12359]:  notice: nova-evacuate_monitor_10000:168060:stderr [ Could not query value of evacuate: attribute does not exist ] 
May 01 19:37:08 database-0.redhat.local pacemaker-execd[12359]:  notice: nova-evacuate_monitor_10000:168289:stderr [ Could not query value of evacuate: attribute does not exist ] 
May 01 19:37:18 database-0.redhat.local pacemaker-execd[12359]:  notice: nova-evacuate_monitor_10000:168518:stderr [ Could not query value of evacuate: attribute does not exist ] 

That is because we do not redirect stderr to dev null when we call attrd_updater"
evacuate_monitor() {   
    if [ ! -f "$statefile" ]; then
        return $OCF_NOT_RUNNING
    fi  
 
    handle_evacuations $(      
        attrd_updater -n evacuate -A |
            sed 's/ value=""/ value="no"/' |
            tr '="' '  ' |     
            awk '{print $4" "$6}'
    )                  
    return $OCF_SUCCESS
}


So the fix here would be using:
attrd_updater -n evacuate -A 2>/dev/null |

Remind on Monday where the git of this resides and I'll post proper PR and test it ;)

Comment 1 Oyvind Albrigtsen 2020-05-04 14:07:00 UTC
git repo for the nova agents is either:
https://github.com/beekhof/openstack-resource-agents
or
https://opendev.org/x/openstack-resource-agents

Comment 2 Michele Baldessari 2020-05-07 11:39:32 UTC
I guess we can just use this one https://review.opendev.org/#/c/277161/ which is merged already anyways

Comment 13 errata-xmlrpc 2020-11-04 02:19:19 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 (Low: resource-agents security and bug fix 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/RHSA-2020:4605