Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2008333

Summary: gcp-vpc-move-vip, gcp-vpc-move-route, gcp-pd-move: A failed API call returns OCF_ERR_CONFIGURED, preventing restarts
Product: Red Hat Enterprise Linux 8 Reporter: Reid Wahl <nwahl>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: Brandon Perkins <bperkins>
Severity: high Docs Contact:
Priority: high    
Version: 8.4CC: agk, cherrylegler, cluster-maint, cluster-qe, fdinitto, franklegler, harinanduri, rrueck
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: resource-agents-4.9.0-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2008952 2008953 2008954 2008955 2042070 (view as bug list) Environment:
Last Closed: 2022-05-10 14:38:05 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: 2008952, 2008953, 2008954, 2008955, 2042070    

Description Reid Wahl 2021-09-28 00:36:20 UTC
Description of problem:

Google reported the following issue in the gcp-vpc-move-vip RA.

If an API call to googleapis.com fails (e.g., due to an intermittent issue), the validate() function returns OCF_ERR_CONFIGURED. This is a fatal error and prevents the resource from starting on any cluster node until the failure is cleared (manually or by a failure-timeout meta attribute).

From the gcp-vpc-move-vip RA:
~~~
def validate():
  global ALIAS
  global CONN
  global THIS_VM

  # Populate global vars
  try:
    CONN = googleapiclient.discovery.build('compute', 'v1',
                                           cache_discovery=False)
  except Exception as e:
    logger.error('Couldn\'t connect with google api: ' + str(e))
    sys.exit(OCF_ERR_CONFIGURED)

  try:
    THIS_VM = get_metadata('instance/name')
  except Exception as e:
    logger.error('Couldn\'t get instance name, is this running inside GCE?: '
                 + str(e))
    sys.exit(OCF_ERR_CONFIGURED)
~~~

I found that similar code exists in gcp-vpc-move-route and gcp-pd-move.

This appears to be fixed for gcp-vpc-move-vip by commit 3ae6d8f0 [1], but the fix has not been shipped by Red Hat.

The issue appears to still exist upstream in gcp-vpc-move-route and gcp-pd-move.

[1] gcp-vpc-move-vip.in: Adds retries (https://github.com/ClusterLabs/resource-agents/commit/3ae6d8f0)

-----

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

resource-agents-gcp-4.1.1-90.el8_4.7

-----

How reproducible:

Always

-----

Steps to Reproduce:
1. Configure a pacemaker cluster on GCP VMs with a gcp-vpc-move-vip (or gcp-vpc-move-route or gcp-pd-move) resource.
2. Prevent successful connections to the Google API. (I haven't looked into the best way -- maybe a simple firewall block?)

-----

Actual results:

The resource fails and is not allowed to attempt to start again due to an OCF_ERR_CONFIGURED.

-----

Expected results:

The resource fails and is allowed to attempt to start again.

Comment 1 Reid Wahl 2021-09-28 00:39:49 UTC
I'm requesting 8.1.z, 8.2.z, and 8.4.z, for SAP systems.

Comment 2 Reid Wahl 2021-09-28 00:45:41 UTC
I couldn't find a Bugzilla account for the reporter, so I'm CC'ing Cherry and Frank Legler for visibility. Feel free to remove yourselves if you don't want to receive updates.

Comment 11 errata-xmlrpc 2022-05-10 14:38:05 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-2022:1974