Description of problem: I would expect the PVC created by the installer to be removed when uninstalling logging using the openshift-logging playbook with the following variables: openshift_logging_install_logging=false openshift_logging_upgrade_logging=false openshift_logging_es_pvc_size=1Gi Version-Release number of selected component (if applicable): OCP 3.5.5.26 How reproducible: Always Steps to Reproduce: 1. Create PV for logging 2. Install logging using openshift-logging.yml playbook 3. Remove logging using same playbook Actual results: $ oc get pv -n logging NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM REASON AGE logging-es-1 1Gi RWO Retain Bound logging/logging-es-0 1h logging-es-2 1Gi RWO Retain Bound logging/logging-es-1 1h logging-es-3 1Gi RWO Retain Bound logging/logging-es-2 1h Expected results: I would expect the PVC to have been deleted because a new installation will create new PVC which won't be bound because of the existing ones. Additional info:
This PR should address your comment: https://github.com/openshift/openshift-ansible/pull/5189
Commit pushed to master at https://github.com/openshift/openshift-ansible https://github.com/openshift/openshift-ansible/commit/51a2d9dbadea02f22168629d44ff339b3c45d6d1 Bug 1467265 - logging: add 'purge' option with uninstall The common uninstall would keep PVC around to prevent unwanted data loss during reinstalls. There is a scenario where the user may want complete removal of EFK stack including PVC. This change adds an optional `openshift_logging_purge_logging` variable to completely remove the EFK stack. By default, this is set to 'False' and only works if user sets `openshift_logging_install_logging` to 'False' to initiate the uninstallation process.
Created attachment 1323020 [details] The host and uninstall logs The pvc was not deleted by playbook in openshift-ansible:master [root@host2-master ~]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE logging-es-0 Bound nfsvol5 10Gi RWO 3h
Could you please run following commands after you tried the uninstall? Thanks! oc get pvc --selector=logging-infra --namespace=logging oc describe pvc logging-es-0
Jan, The prior pvc [1] was incorrect. it wasn't created by installer and wasn't labelled by logging-infra. The test pass with pvc created by installer. so move bug to verified. [1]. The prior pvc created by manually [root@host2-master ~]# oc describe pvc logging-es-0 Name: logging-es-0 Namespace: logging StorageClass: Status: Bound Volume: nfsvol5 Labels: <none> Annotations: pv.kubernetes.io/bind-completed=yes pv.kubernetes.io/bound-by-controller=yes Capacity: 10Gi Access Modes: RWO Events: <none> [2]. The pvc created by installer. # oc get pvc logging-es-0 -o json { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "annotations": { "pv.kubernetes.io/bind-completed": "yes", "pv.kubernetes.io/bound-by-controller": "yes" }, "creationTimestamp": "2017-09-08T02:02:53Z", "labels": { "logging-infra": "support" }, "name": "logging-es-0", "namespace": "logging", "resourceVersion": "35379", "selfLink": "/api/v1/namespaces/logging/persistentvolumeclaims/logging-es-0", "uid": "d36c0b9d-9439-11e7-bc00-fa163e8efe63" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "10G" } }, "volumeName": "nfsvol6" }, "status": { "accessModes": [ "ReadWriteOnce" ], "capacity": { "storage": "10Gi" }, "phase": "Bound" } }
Great! Thanks for the update. I was already getting quite creative about what could have possibly happened there as I couldn't reproduce that at all.
Commits pushed to master at https://github.com/openshift/openshift-docs https://github.com/openshift/openshift-docs/commit/43b15d6e39513951ea0b37fd7ca72840df01bcf5 Bug 1467265 Add 'Purge' Option with Uninstall https://github.com/openshift/openshift-docs/commit/2b4d13b2bbc62b90e46ab5c24a24f3595102e7a9 Merge pull request #5218 from bmcelvee/BZ1467265 Bug 1467265 Add 'Purge' Option with Uninstall
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/RHSA-2017:3188