Bug 1401415 - Incorrect pvc name was generated when deploy logging with ansible
Summary: Incorrect pvc name was generated when deploy logging with ansible
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-05 08:00 UTC by Xia Zhao
Modified: 2017-08-25 15:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-25 15:51:41 UTC
Target Upstream Version:


Attachments (Terms of Use)
ansbile task logs (22.33 KB, text/plain)
2016-12-05 08:00 UTC, Xia Zhao
no flags Details
deployer log (43.31 KB, text/plain)
2016-12-05 08:01 UTC, Xia Zhao
no flags Details

Description Xia Zhao 2016-12-05 08:00:39 UTC
Created attachment 1227996 [details]
ansbile task logs

Description of problem:
Incorrect pvc name was generated when deploy logging with ansible, it should be "logging-es-1" instead of "logging-es1". 
Issue did not repro when manually deploy logging with "--from-literal es-pvc-dynamic=true --from-literal es-pvc-size=10G" specified in deployer configmap.

Logging got deployed with a wrong pvc name:

# oc get po
NAME                          READY     STATUS      RESTARTS   AGE
logging-curator-1-l0fzh       1/1       Running     0          4h
logging-deployer-dlnow        0/1       Completed   0          4h
logging-es-1yl4qhyc-1-91pkd   1/1       Running     0          4h
logging-fluentd-5f3s1         1/1       Running     0          4h
logging-fluentd-dhojf         1/1       Running     0          4h
logging-kibana-1-tz7ks        2/2       Running     0          4h


Version-Release number of selected component (if applicable):
# openshift version
openshift v3.4.0.32+d349492
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

openshift-ansible-3.4.31-1.git.0.4b78e57 

How reproducible:
Always

Steps to Reproduce:
1. Deploy logging with these parameters passing to ansible:
 openshift_hosted_logging_deployer_prefix: ${ops-registry-image-prefix}
 openshift_hosted_logging_deploy: true
 openshift_hosted_logging_storage_kind: dynamic
 openshift_hosted_logging_deployer_version: 3.4.0

2. Check logging pods:
# oc get po
NAME                          READY     STATUS      RESTARTS   AGE
logging-curator-1-l0fzh       1/1       Running     0          4h
logging-deployer-dlnow        0/1       Completed   0          4h
logging-es-1yl4qhyc-1-91pkd   1/1       Running     0          4h
logging-fluentd-5f3s1         1/1       Running     0          4h
logging-fluentd-dhojf         1/1       Running     0          4h
logging-kibana-1-tz7ks        2/2       Running     0          4h

3. Check deployer configmap content
# oc get configmap logging-deployer -o yaml
apiVersion: v1
data:
  es-cluster-size: "1"
  es-ops-cluster-size: "1"
  es-ops-pvc-dynamic: "true"
  es-ops-pvc-prefix: logging-es 
  es-ops-pvc-size: 10Gi
  es-pvc-dynamic: "true"
  es-pvc-prefix: logging-es 
  es-pvc-size: 10Gi
  kibana-hostname: kibana.{subdomain}
  kibana-ops-hostname: kibana-ops.{subdomain}
  public-master-url: https://{master-domain}:8443
kind: ConfigMap
metadata:
  creationTimestamp: 2016-12-05T02:12:33Z
  name: logging-deployer
  namespace: logging
  resourceVersion: "1221"
  selfLink: /api/v1/namespaces/logging/configmaps/logging-deployer
  uid: 4865c5ef-ba90-11e6-9243-42010af00014

4. Check the pvc name

Actual results:
4. pvc name is logging-es1
# oc get pvc
NAME          STATUS    VOLUME                                     CAPACITY   ACCESSMODES   AGE
logging-es1   Bound     pvc-66fbe5b6-ba90-11e6-9243-42010af00014   10Gi       RWO           4h

Expected results:
4. pvc name should be logging-es-1

Additional info:
1. ansible log attached
2. deployer pod log attached

Comment 1 Xia Zhao 2016-12-05 08:01:36 UTC
Created attachment 1227997 [details]
deployer log

Comment 2 ewolinet 2016-12-05 15:16:56 UTC
Per the documentation of the EFK deployer, this is working as expected. The prefix specified is followed by a number. To see the pvc name as 'logging-es-1' the prefix should be 'logging-es-'.

Comment 3 Xia Zhao 2016-12-06 02:14:59 UTC
So the thing is, during logging deployment, if I didn't explicitly specify a value to es-ops-pvc-prefix, just specify this:  

--from-literal es-pvc-dynamic=true --from-literal es-pvc-size=1G

deployer will create the pvc with value "logging-es-" (which is expected)

but ansible created it with "logging-es", which omitted the "-" in the end.

The behaviour is different here.


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