openshift / openshift-ansible

Install and config an OpenShift 3.x cluster
https://try.openshift.com
Apache License 2.0
2.18k stars 2.31k forks source link

Still can discover the node data in Grafana UI even if the node is removed by uninstall.yml #12321

Closed jimmyw86878 closed 3 years ago

jimmyw86878 commented 3 years ago

Description

Our environment is one All-In-One node and one compute node. After removing the compute node, we still can discover that node data in Grafana UI. However, all the value of that node data is zero. We follow the official steps to remove the node by using openshift-ansible/playbooks/adhoc/uninstall.yml. And it works just fine. We think that it should be removed in Grafana UI if the node is removed from the cluster. ga

Version
[root@master ~]# ansible --version
ansible 2.9.18
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Steps To Reproduce
  1. [step 1] Install the master node and worker node.
  2. [step 2] Remove the worker node by using openshift-ansible/playbooks/adhoc/uninstall.yml.
    ansible-playbook -i deletehost openshift-ansible/playbooks/adhoc/uninstall.yml
Expected Results

The removed node should not show up in Grafana UI.

Observed Results

The result is shown in above figure.

Additional Information

OS

cat /etc/redhat-release

CentOS Linux release 7.8.2003 (Core)

Inventory file for installing the cluster

#bare minimum hostfile

[OSEv3:children]
masters
nodes
etcd

[OSEv3:vars]
ansible_ssh_user="root"
# if your target hosts are Fedora uncomment this
#ansible_python_interpreter=/usr/bin/python3
openshift_version="3.11"
openshift_release="3.11"
openshift_deployment_type=origin
openshift_portal_net=172.30.0.0/16
# localhost likely doesn't meet the minimum requirements
openshift_disable_check=disk_availability,memory_availability,docker_image_availability,package_version,package_availability
#openshift_additional_repos=[{'id': 'centos-paas', 'name': 'centos-paas', 'baseurl' :'https://buildlogs.centos.org/centos/7/paas/x86_64/openshift-origin311', 'gpgcheck' :'0', 'enabled' :'1'}]
#openshift_node_groups=[{'name': 'node-config-all-in-one', 'labels': ['node-role.kubernetes.io/master=true', 'node-role.kubernetes.io/infra=true', 'node-role.kubernetes.io/compute=true']}]

openshift_metrics_install_metrics=True
openshift_logging_install_logging=False

enable_excluders=False
enable_docker_excluder=False
ansible_service_broker_install=False
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
openshift_master_htpasswd_file='/etc/origin/master/htpasswd'

openshift_master_cluster_hostname=10.60.6.34
openshift_public_hostname=10.60.6.34
openshift_master_default_subdomain=10.60.6.34
openshift_master_cluster_public_hostname=10.60.6.34
openshift_master_api_port=8443
openshift_master_console_port=8443

openshift_cockpit_deployer_image="10.60.6.34:5000/openshift3/registry-console:v3.11"

# registry passwd
oreg_url=10.60.6.34:5000/openshift/origin-${component}:${version}
openshift_examples_modify_imagestreams=true

# docker config
openshift_docker_additional_registries=10.60.6.34:5000
openshift_docker_insecure_registries=10.60.6.34:5000
#openshift_docker_blocked_registries
openshift_docker_options="--log-driver json-file --log-opt max-size=1M --log-opt max-file=3"

# Enable cluster metrics
openshift_metrics_install_metrics=false
#openshift_metrics_hawkular_hostname=10.60.6.34

openshift_enable_service_catalog=false
openshift_docker_selinux_enabled=False

[masters]
10.60.6.34 openshift_custom_ip=10.60.6.34

[etcd]
10.60.6.34 openshift_custom_ip=10.60.6.34

[nodes]
10.60.7.88 openshift_node_group_name="node-config-compute"
# openshift_node_group_name should refer to a dictionary with matching key of name in list openshift_node_groups.
10.60.6.34 openshift_custom_ip=10.60.6.34 openshift_node_group_name="node-config-all-in-one"

Inventory file for removing the compute node

[OSEv3:children]
nodes

[OSEv3:vars]
ansible_ssh_user=root
openshift_deployment_type=origin

[nodes]
10.60.7.88 openshift_node_group_name="node-config-compute"
openshift-bot commented 3 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 3 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci[bot] commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/openshift-ansible/issues/12321#issuecomment-913164797): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.