Bug 1620536 - Failed to create scale group for 'l_epoch_time' is undefined
Summary: Failed to create scale group for 'l_epoch_time' is undefined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: Chris Callegari
QA Contact: sheng.lao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-23 06:50 UTC by sheng.lao
Modified: 2018-10-11 07:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Change launch_config and scale_group name to utilize serial number rather than epoch_time. Reason: The name change will make name value immutable over repeated play runs. Result: Tasks will be in OK state over repeated play runs.
Clone Of:
Environment:
Last Closed: 2018-10-11 07:25:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:25:43 UTC

Description sheng.lao 2018-08-23 06:50:56 UTC
Description of problem:
When I create the scale group with playbook: provision_install.yml, I meet this error:
'l_epoch_time' is undefined

for that, I search the source code, and get the following result:
# grep -r  l_epoch_time  
roles/openshift_aws/tasks/scale_group.yml:    launch_config_name: "{{ openshift_aws_node_group.name }}-{{ openshift_aws_ami_map[openshift_aws_node_group.group] | default(openshift_aws_ami) }}-{{ l_epoch_time }}"

and inspect git change log, find
that fact for `l_epoch_time` was removed somehow:
# git show 6d2ab4679
... ...
-# Need to set epoch time in one place to use for launch_config and scale_group
-- set_fact:
-    l_epoch_time: "{{ ansible_date_time.epoch }}"
... ...

Version-Release number of the following components:
# git describe
openshift-ansible-3.11.0-0.20.0-20-g8fa3d80

How reproducible:
100%

Steps to Reproduce:
1. ansible-playbook -i inventory.yaml -e @provisioning_vars.yaml playbooks/aws/openshift-cluster/provision_install.yml  
2.
3.

Actual results:
TASK [openshift_aws : Create the scale group] ****************************************************************************************************
Thursday 23 August 2018  02:22:51 -0400 (0:00:00.176)       0:01:07.851 *******  
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'l_epoch_time' is undefined\n\nThe error appears to have been in '/root/openshift-ansible/roles/openshift_aws/tasks/scale_group.yml': line 14, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create the scale group\n  ^ here\n"}

Expected results:
Create scale group is success

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Chris Callegari 2018-08-23 13:32:05 UTC
Fixed in https://github.com/openshift/openshift-ansible/pull/9728

Waiting for merge

Comment 2 Chris Callegari 2018-08-24 13:42:23 UTC
pull has been tagged lgtm.  please retest when merged.

Comment 3 sheng.lao 2018-08-28 04:47:37 UTC
Fixed at : openshift-ansible-3.11.0-0.24.0-16-ge42f892
With logs:
TASK [openshift_aws : Create the scale group] *********************************************************************************
task path: /root/openshift-ansible/roles/openshift_aws/tasks/scale_group.yml:14
Monday 27 August 2018  22:40:44 -0400 (0:00:00.071)       0:14:39.674 *********
... ...
        "module_args": {
            "launch_config_name": "qe-shlao-5 compute group-ami-xxx-1",
... ...

Comment 5 errata-xmlrpc 2018-10-11 07:25:25 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, 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.