Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1580256 - Failed to build AMI because clusterid is not set
Failed to build AMI because clusterid is not set
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.10.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.11.0
Assigned To: Chris Callegari
sheng.lao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-21 02:02 EDT by Wenkai Shi
Modified: 2018-10-11 03:20 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Release Note
Doc Text:
Added openshift_clusterid override to example inventory in AWS README
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:20:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:20 EDT

  None (edit)
Description Wenkai Shi 2018-05-21 02:02:19 EDT
Description of problem:
Failed to build AMI because clusterid is not set

Version-Release number of the following components:
openshift-ansible-3.10.0-0.46.0.git.0.85c3afd.el7

How reproducible:
100%

Steps to Reproduce:
1. Follow document(https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws) to build an AMI.
2. Set openshift_cloudprovider_kind to aws in inventory.yml as example(https://github.com/openshift/openshift-ansible/blob/master/playbooks/aws/provisioning-inventory.example.ini)
3. Execute build_ami playbook as step 1(https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws#step-1):
# ansible-playbook -i inventory.yml build_ami.yml -e @provisioning_vars.yml

cat inventory.yml
...
openshift_cloudprovider_kind=aws
...

Actual results:
# ansible-playbook -i inventory.yml /usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.yml -e @provisioning_vars.yml -vvv
...
TASK [openshift_sanitize_inventory : Ensure clusterid is set along with the cloudprovider] ***************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:35
Monday 21 May 2018  01:49:24 -0400 (0:00:00.019)       0:01:14.638 ************ 
fatal: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "msg": "Ensure that the openshift_clusterid is set and that all infrastructure has the required tags.\nFor dynamic provisioning when using multiple clusters in different zones, tag each node with Key=kubernetes.io/cluster/xxxx,Value=clusterid where xxxx and clusterid are unique per cluster. In versions prior to 3.6, this was Key=KubernetesCluster,Value=clusterid.\nhttps://github.com/openshift/openshift-docs/blob/master/install_config/persistent_storage/dynamically_provisioning_pvs.adoc#available-dynamically-provisioned-plug-ins\n"
}

PLAY RECAP ***********************************************************************************************************************************************************************************
ec2-xx-xx-xx-xx.compute-1.amazonaws.com : ok=13   changed=0    unreachable=0    failed=1   
localhost                  : ok=14   changed=2    unreachable=0    failed=0   

Expected results:
AWS provisioning related playbook should ensure that the openshift_clusterid is set and that all infrastructure has the required tags.

Additional info:
Comment 2 sheng.lao 2018-08-09 06:13:03 EDT
1. Test result: Failed 

2. Environment:
#git describe
openshift-ansible-3.11.0-0.11.0-106-gc01e5ef

3. Analysis: 
1) find all references from the repo, with command:
  # grep -r openshift_clusterid

2) I can't find any code to define the variable of openshift_clusterid

3) but, when i reading this tip from the error message,I think this variable, openshift_clusterid, must be set with the cloudprovider. But we don't have a document to declare it, then will lead the customers to the wrong place.

https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_sanitize_inventory/tasks/main.yml#L35
Comment 4 Chris Callegari 2018-08-09 08:59:50 EDT
The correct key is called openshift_aws_clusterid.

Please make sure the key and value exist in your extra_vars file.
Comment 5 sheng.lao 2018-08-09 22:55:20 EDT
I ask my companion,he says that the 'clusterid', in title, it comes from the output message of ansible play-book:
   TASK [openshift_sanitize_inventory : Ensure clusterid is set along with the cloudprovider] 

So it's clear now. 

He filed this bug, because the word 'clusterid', in that ansible message, is confusing, and there is no sentence to declare: what is 'clusterid', in this document: 
https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws

So, please, update the document to clarify the openshift_clusterid.

Thanks!
Comment 6 Chris Callegari 2018-08-16 15:40:18 EDT
openshift_clusterid added to README example

https://github.com/openshift/openshift-ansible/pull/9635
Comment 7 sheng.lao 2018-08-20 09:58:22 EDT
fixed at: openshift-ansible-3.11.0-0.19.0-2-g0e60053
Comment 9 errata-xmlrpc 2018-10-11 03:20:00 EDT
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, 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-2018:2652

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