Bug 1521218
Summary: | [RFE] Allow deploy logging with no-default storageclass | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Anping Li <anli> |
Component: | Logging | Assignee: | ewolinet |
Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.7.1 | CC: | anli, aos-bugs, grodrigu, knakayam, mmckinst, rmeggins |
Target Milestone: | --- | ||
Target Release: | 3.7.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-05 09:33:10 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: |
Description
Anping Li
2017-12-06 02:42:29 UTC
What about this variable: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_logging_elasticsearch/defaults/main.yml#L34 Jeff, the variable looks good. Does the use of this variable resolve this issue? Can we close it? Jeff, Yes, It works. Jeff, We should fix the error when openshift_logging_es_pvc_storage_class_name is undefined. TASK [openshift_logging_elasticsearch : Creating ES storage template - static] ************************************************************************************************************************************ task path: /root/openshift-ansible/roles/openshift_logging_elasticsearch/tasks/main.yaml:304 fatal: [ec2-35-153-101-95.compute-1.amazonaws.com]: FAILED! => {"failed": true, "msg": "The field 'vars' has an invalid value, which includes an undefined variable. The error was: {{ openshift_logging_es_pvc_storage_class_name }}: 'openshift_logging_es_pvc_storage_class_name' is undefined\n\nThe error appears to have been in '/root/openshift-ansible/roles/openshift_logging_elasticsearch/tasks/main.yaml': line 304, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # storageclasses with the storageClassName set to \"\" in pvc.j2\n - name: Creating ES storage template - static\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: {{ openshift_logging_es_pvc_storage_class_name }}: 'openshift_logging_es_pvc_storage_class_name' is undefined"} to retry, use: --limit @/root/openshift-ansible/playbooks/openshift-logging/config.retry if we deploy logging using dynamical provision without openshift_logging_es_pvc_storage_class_name, the following message pop up. ASK [openshift_logging_elasticsearch : Creating ES storage template - static] ************************************************************************************************************************************ fatal: [host-8-241-51.host.centralci.eng.rdu2.redhat.com]: FAILED! => {"failed": true, "msg": "The field 'vars' has an invalid value, which includes an undefined variable. The error was: {{ openshift_logging_es_pvc_storage_class_name }}: 'openshift_logging_es_pvc_storage_class_name' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_logging_elasticsearch/tasks/main.yaml': line 330, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # storageclasses with the storageClassName set to \"\" in pvc.j2\n - name: Creating ES storage template - static\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: {{ openshift_logging_es_pvc_storage_class_name }}: 'openshift_logging_es_pvc_storage_class_name' is undefined"} Pass with openshift3/ose-ansible/images/v3.7.35-1 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:0636 *** Bug 1561799 has been marked as a duplicate of this bug. *** AFAICT you still can't specify a storage class for dynamic elasticsearch volume. The output pasted in the BZ report shows this was tested using the static one: """Creating ES storage template - static""" Compare the dynamic one at https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_logging_elasticsearch/tasks/main.yaml#L430-L441 to the static one at https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_logging_elasticsearch/tasks/main.yaml#L417-L428 . Notice the line defining 'storage_class_name' is missing in dynamic. Since the variable isn't there, it can't be passed to the template and you'll get the default storage class. I've submitted two PRs to fix this: https://github.com/openshift/openshift-ansible/pull/8013 - for 3.7 https://github.com/openshift/openshift-ansible/pull/8054 - for master branch The reason that we don't pass the 'storage_class_name' to the dynamic task is that in order for a PVC to be considered dynamic, it needs to not have a storageClassName field specified. |