Bug 1627971 - OpenShift upgrade playbook fails when optional value is not defined for Azure Cloud Provider
Summary: OpenShift upgrade playbook fails when optional value is not defined for Azure...
Keywords:
Status: CLOSED DUPLICATE of bug 1615903
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: liujia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-12 02:41 UTC by Takayoshi Tanaka
Modified: 2018-09-12 12:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-12 12:39:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Takayoshi Tanaka 2018-09-12 02:41:27 UTC
Description of problem:
When specifying the openshift_cloudprovider_kind=azure in the inventory file and do not specify the optional value such as openshift_cloudprovider_azure_availability_set_name, the upgrade playbook failed. 


Version-Release number of the following components:
```
# rpm -q openshift-ansible
openshift-ansible-3.10.41-1.git.0.fd15dd7.el7.noarch

# rpm -q ansible
ansible-2.4.6.0-1.el7ae.noarch

# ansible --version
ansible 2.4.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
```

How reproducible:
Always

Steps to Reproduce:
1. Install OpenShift 3.10.14 with specifying the following values to enable Azure Cloud Provider.
```
openshift_cloudprovider_kind=azure
openshift_cloudprovider_azure_client_id=<ID>
openshift_cloudprovider_azure_client_secret=<Password>
openshift_cloudprovider_azure_subscription_id=<ID>
openshift_cloudprovider_azure_resource_group=ocp310
```

2. Upgrade to 3.10.41
# ansible-playbook     /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_10/upgrade_nodes.yml

Actual results:
I lost the logs but it failed at the "ensure provider configuration variables are defined" task.

Expected results:
The upgrade should be completed without error.


Additional info:
It seems the error happens here:
https://github.com/openshift/openshift-ansible/blob/openshift-ansible-3.10.41-1/roles/openshift_sanitize_inventory/tasks/main.yml#L96-L100

It has been fixed at the later commit:
https://github.com/openshift/openshift-ansible/commit/742067cfd0b5f7eb26d6357cc9e5b900f1052140#diff-3f7ba27815bc4fa8679d59a6e27e5d5c

Actually, the upgrade playbook succeeded when I added the following values. This could be the workaround.

```
openshift_cloudprovider_azure_cloud=AzurePublicCloud
openshift_cloudprovider_azure_vnet_name=ocp310-vnet
openshift_cloudprovider_azure_security_group_name=master-nsg
openshift_cloudprovider_azure_availability_set_name=""
```

I haven't seen the customer who has faced this issue at this point.

Comment 1 Scott Dodson 2018-09-12 12:39:15 UTC
This was fixed in openshift-ansible-3.10.42-1 and any version after that. This is in a currently pending errata already.

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


Note You need to log in before you can comment on or make changes to this bug.