Bug 1460594

Summary: failed invalid storage kind 'emptydir' for component 'metrics'
Product: OpenShift Container Platform Reporter: Javier Ramirez <javier.ramirez>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED WONTFIX QA Contact: Johnny Liu <jialiu>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: aos-bugs, javier.ramirez, jdesousa, jokerman, mmccomas, paldeala, rromerom, sdodson, trankin, vigoyal
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 20:17: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:
Attachments:
Description Flags
Ansible log
none
ansible logs from customer
none
ansible logs from my reproducer none

Description Javier Ramirez 2017-06-12 06:39:16 UTC
Created attachment 1286945 [details]
Ansible log

Description of problem:
When trying to deploy metrics during installation time and using the advanced method, it fails with the error message:

The conditional check 'persistent_volumes | length > 0 or persistent_volume_claims | length > 0' failed. The error was: {{ hostvars[groups.o
o_first_master.0] | oo_persistent_volumes(groups) }}: |failed invalid storage kind 'emptydir' for component 'metrics'

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_facts/tasks/main.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Detecting Operating System
  ^ here


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

openshift-ansible-callback-plugins-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-playbooks-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-filter-plugins-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-roles-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-docs-3.5.71-1.git.0.128c2db.el7.noarch
openshift-ansible-lookup-plugins-3.5.71-1.git.0.128c2db.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set openshift_hosted_metrics_deploy=true and openshift_master_default_subdomain in the inventory file
2. Run the playbook /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml

Actual results:
It fails with the error message:
"failed invalid storage kind 'emptydir' for component 'metrics'"

Expected results:
To install openshift and deploy metrics with emptydir storage

Additional information:

If you install openshift with no metrics and after it you set:
openshift_metrics_install_metrics=true openshift_hosted_metrics_storage_kind=emptydir

And run the playbook /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/openshift-metrics.yml
Metrics are deployed with emptydir.

Comment 2 Javier Ramirez 2017-06-12 06:42:32 UTC
Host file:
[OSEv3:children]
masters
nodes

[OSEv3:vars]
ansible_ssh_user=root
deployment_type=openshift-enterprise
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_hosted_metrics_deploy=true
openshift_master_default_subdomain=apps.test.example.com
openshift_hosted_metrics_storage_kind=emptydir

[masters]
master1.example.com

[nodes]
master1.example.com
node1.example.com openshift_node_labels="{'region': 'primary', 'zone': 'east'}"
node2.example.com openshift_node_labels="{'region': 'primary', 'zone': 'west'}"

Comment 3 Javier Ramirez 2017-06-12 06:43:17 UTC
Not sure if important, but parameter openshift_hosted_metrics_storage_kind=emptydir

It is redundant and the behaviour is exactly the same without it.

Comment 9 Scott Dodson 2017-07-20 14:29:20 UTC
If you don't set openshift_hosted_metrics_storage_kind at all you should get emptydir. Can you please verify and we'll move this over to a docs bug to clarify.

Comment 10 Javier Ramirez 2017-07-20 17:11:25 UTC
(In reply to Scott Dodson from comment #9)
> If you don't set openshift_hosted_metrics_storage_kind at all you should get
> emptydir. Can you please verify and we'll move this over to a docs bug to
> clarify.

As you can read at https://bugzilla.redhat.com/show_bug.cgi?id=1460594#c3

Not sure if important, but parameter openshift_hosted_metrics_storage_kind=emptydir

It is redundant and the behaviour is exactly the same without it.

Comment 11 Javier Ramirez 2017-07-21 12:10:01 UTC
I can't reproduce this bug with latest versions:
atomic-openshift-node-3.5.5.31-1.git.0.b6f55a2.el7.x86_64
atomic-openshift-clients-3.5.5.31-1.git.0.b6f55a2.el7.x86_64
atomic-openshift-master-3.5.5.31-1.git.0.b6f55a2.el7.x86_64
tuned-profiles-atomic-openshift-node-3.5.5.31-1.git.0.b6f55a2.el7.x86_64
atomic-openshift-utils-3.5.91-1.git.0.28b3ddb.el7.noarch
atomic-openshift-docker-excluder-3.5.5.31-1.git.0.b6f55a2.el7.noarch
atomic-openshift-excluder-3.5.5.31-1.git.0.b6f55a2.el7.noarch
atomic-openshift-3.5.5.31-1.git.0.b6f55a2.el7.x86_64
atomic-openshift-sdn-ovs-3.5.5.31-1.git.0.b6f55a2.el7.x86_64


        image: registry.access.redhat.com/openshift3/metrics-cassandra:3.5.0
        image: registry.access.redhat.com/openshift3/metrics-hawkular-metrics:3.5.0
        image: registry.access.redhat.com/openshift3/metrics-heapster:3.5.0

# cat /etc/ansible/hosts 
[OSEv3:children]
masters
nodes

[OSEv3:vars]
ansible_ssh_user=root
deployment_type=openshift-enterprise
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_hosted_metrics_deploy=true
openshift_master_default_subdomain=apps.test.example.com

[masters]
master35.example.com

[nodes]
master35.example.com 
nodeinfra.example.com openshift_node_labels="{'region': 'infra'}"
nodeprimary.example.com openshift_node_labels="{'region': 'primary'}"

Comment 13 Javier Ramirez 2017-08-05 15:57:44 UTC
Created attachment 1309418 [details]
ansible logs from customer

Comment 14 Javier Ramirez 2017-08-05 15:58:49 UTC
Created attachment 1309419 [details]
ansible logs from my reproducer

Comment 16 Vikram Goyal 2017-08-08 10:37:44 UTC
Hi Ruben,

Looks like Javier was awaiting feedback on this from engineering?

Comment 21 Scott Dodson 2018-04-16 20:17:10 UTC
Latest comment in the case from the customer was that this problem doesn't exist in 3.6. Moving back to Installer but marking CLOSED WONTFIX.