Bug 1846726

Summary: gcp-vpc-move-vip: Metadata provides inaccurate description of functionality [RHEL 8]
Product: Red Hat Enterprise Linux 8 Reporter: Reid Wahl <nwahl>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED DUPLICATE QA Contact: Brandon Perkins <bperkins>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: agk, bfrank, cluster-maint, cluster-qe, fdinitto, oalbrigt
Target Milestone: rc   
Target Release: 8.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1846724 Environment:
Last Closed: 2020-10-07 08:06:55 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: 1846724    
Bug Blocks:    

Description Reid Wahl 2020-06-13 06:02:13 UTC
+++ This bug was initially created as a clone of Bug #1846724 +++

Description of problem:

The metadata for the gcp-vpc-move-vip resource agent states that it configures an alias IP address, when it actually configures an alias IP address **range**.

The metadata includes the following:

~~~
ocf:heartbeat:gcp-vpc-move-vip - Floating IP Address on Google Cloud Platform

Floating IP Address on Google Cloud Platform - Using Alias IP address functionality to attach a secondary IP address to a running instance

Resource options:
  alias_ip (required) (unique): IP Address to be added including CIDR. E.g 192.168.0.1/32
  alias_range_name (unique): Subnet name for the Alias IP
~~~

The distinction between an alias IP address and an alias IP address range is quite important. Since the RA configures an alias range, **every** IP address within the subnet specified by the netmask is an alias pointing to the node where the gcp-vpc-move-vip is running.

This is a good thing, as it makes aliases much more flexible than they otherwise would be. However, the documentation needs to reflect the RA's functionality.

To me, the description reads pretty strongly as though only a singular alias IP gets added. Without further explanation, I also don't think the phrase "including CIDR" informs the reader that this resource can set a range; I would have expected the CIDR simply to indicate the netmask of a single IP address being added, just like when adding an IP address "xxx.xxx.xxx.xxx/24" from the command line.

In the example below, I've created one gcp-vpc-move-vip resource agent with a CIDR netmask of 31, so that it includes **two** alias IP addresses. As you can see, with the resource running on node 2, I can use either 10.138.0.30 or 10.138.0.31 to access node 2.

~~~
[root@nwahl-rhel7-node1 ~]# pcs resource show alias_ip1
 Resource: alias_ip1 (class=ocf provider=heartbeat type=gcp-vpc-move-vip)
  Attributes: alias_ip=10.138.0.30/31
  Operations: monitor interval=60s timeout=15s (alias_ip1-monitor-interval-60s)
              start interval=0s timeout=300s (alias_ip1-start-interval-0s)
              stop interval=0s timeout=15s (alias_ip1-stop-interval-0s)

[root@nwahl-rhel7-node1 ~]# pcs resource | grep gcp-vpc-move-vip
     alias_ip1	(ocf::heartbeat:gcp-vpc-move-vip):	Started nwahl-rhel7-node2

[root@nwahl-rhel7-node1 ~]# ssh nwahl.0.30 '/usr/bin/hostname'
nwahl-rhel7-node2

[root@nwahl-rhel7-node1 ~]# ssh nwahl.0.31 '/usr/bin/hostname'
nwahl-rhel7-node2
~~~

-----

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

resource-agents-gcp-4.1.1-44.el8_2.3.x86_64.rpm

-----

How reproducible:

Always

-----

Steps to Reproduce:

# pcs resource describe gcp-vpc-move-vip

-----

Actual results:

Resource metadata suggests that only one alias IP address is configured.

-----

Expected results:

Resource metadata clearly explains its capabilities -- namely, that it configures an alias IP range, which can include either a single IP or multiple.

-----

Additional info:

You can find more info about alias IP ranges here: https://cloud.google.com/vpc/docs/configure-alias-ip-ranges

Here is the method that the RA uses to update the ranges: https://cloud.google.com/compute/docs/reference/rest/v1/instances/updateNetworkInterface


--- Additional comment from RHEL Program Management on 2020-06-13 05:59:30 UTC ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

Comment 1 Reid Wahl 2020-06-13 07:24:57 UTC
A probably better document on alias IP ranges: https://cloud.google.com/vpc/docs/alias-ip

Comment 3 Oyvind Albrigtsen 2020-10-07 08:06:55 UTC
This is being fixed in bz1846733.

*** This bug has been marked as a duplicate of bug 1846733 ***