Bug 1569400
Summary: | Improve prometheus uninstall process | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Junqi Zhao <juzhao> |
Component: | Monitoring | Assignee: | Paul Gier <pgier> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Junqi Zhao <juzhao> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.10.0 | CC: | aos-bugs, jforrest, pgier, spasquie |
Target Milestone: | --- | ||
Target Release: | 3.11.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Prometheus uninstall currently deletes the entire openshift-metrics namespace.
Consequence: This has the potential to delete objects which have been created in the same namespace, but are not part of the prometheus installation.
Fix: Change the uninstall process to delete only the specific objects which were created by the prometheus install. Only delete the namespace if there are no remaining objects.
Result: This will allow prometheus to be installed and uninstalled while sharing a namespace with other objects.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-12-21 15:16:33 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
Junqi Zhao
2018-04-19 08:44:34 UTC
# rpm -qa | grep openshift-ansible openshift-ansible-roles-3.10.0-0.22.0.git.0.b6ec617.el7.noarch openshift-ansible-playbooks-3.10.0-0.22.0.git.0.b6ec617.el7.noarch openshift-ansible-3.10.0-0.22.0.git.0.b6ec617.el7.noarch openshift-ansible-docs-3.10.0-0.22.0.git.0.b6ec617.el7.noarch I'd prefer to keep the uninstall process as simple as possible, otherwise it's more maintenance to keep the uninstall in sync with the install. Is there something specific that would commonly be deployed to the prometheus namespace? metrics now is deployed under openshift-metrics namespaces, we should keep the prometheus namespace after undeploying prometheus https://github.com/openshift/openshift-ansible/pull/8649 moving to 3.11 as the change referenced in comment 4 is being reverted and the only thing in openshift-metrics in 3.10 should be the tech preview prometheus stack, which will no longer be in this namespace in 3.11 We may need to address this in 3.11 if metrics-server does get installed into openshift-metrics versus the new openshift-monitoring namespace. Mainly concerned that if someone moves from the old prometheus tech preview installation to the new one that uninstalling the old one doesnt wipe out metrics-server. It doesn't really matter where metrics-server is installed. You could run multiple during the upgrade, as long as you update the APIService to point to the correct one. Paul, From the PR, ds, svc and other resources are deleted, the prometheus namespace is finally deleted too, and not maintained, the fix has nothing to do with the defect. Paul, We could close this defect as WONTFIX if the openshift-metrics namespace is deleted after undeploying prometheus, since the openshift-metrics namespace is used only by us now, I am OK with the solution The updated uninstall should only delete the namespace if there are no other objects present. So the behaviour is the same if prometheus is the only thing installed in the namespace. However, if there is another deployment sharing the namespace, then it won't be deleted. I thought that solved the use case here. If it's better to keep the namespace regardless of whether it contains another deployment, I could just remove that part of the uninstall. (In reply to Paul Gier from comment #12) > If it's better to keep the namespace regardless of whether it contains > another deployment, I could just remove that part of the uninstall. Since prometheus will be deprecated in 4.0, and there is not other deployment using openshift-metrics namespace now, I think remove the openshift-metrics namespace is OK. # rpm -qa | grep ansible ansible-2.6.3-1.el7ae.noarch openshift-ansible-docs-3.11.0-0.28.0.git.0.730d4be.el7.noarch openshift-ansible-playbooks-3.11.0-0.28.0.git.0.730d4be.el7.noarch openshift-ansible-3.11.0-0.28.0.git.0.730d4be.el7.noarch openshift-ansible-roles-3.11.0-0.28.0.git.0.730d4be.el7.noarch If only prometheus is using openshift-metrics namespace, ds, svc, configmaps and other resources are deleted, the namespace is kept. If there is not other deployment under openshift-metrics namespace, the openshift-metrics namespace will be deleted Closing bugs that were verified and targeted for GA but for some reason were not picked up by errata. This bug fix should be present in current 3.11 release content. |