Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for namespace deletion #142

Merged
merged 1 commit into from
May 22, 2024

Conversation

rsevilla87
Copy link
Member

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

It's easier and faster to wait for the namespace deletion rather than resource by resource.

It also fixes a race condition that happens when you execute k8s-netperf twice without waiting for some time between executions, the netperf namespace is still in Deleting status and k8s-netperf crashes. e.g:

$ ./bin/amd64/k8s-netperf --config examples/netperf-full.yml  --debug --all                                                                                                                      
INFO[2024-04-30 11:19:37] Starting k8s-netperf (141@b939249af9389f95d195eedcb47dce131a209342)                                                                                                                                                 
INFO[2024-04-30 11:19:37] 📒 Reading examples/netperf-full.yml file.                                                                                                                                                                          
INFO[2024-04-30 11:19:37] 📒 Reading examples/netperf-full.yml file - using ConfigV2 Method.                                                                                                                                                  
INFO[2024-04-30 11:19:37] Cleaning resources created by k8s-netperf                                                                                                                                                                           
INFO[2024-04-30 11:19:40] ⏰ Waiting for client-across Deployment to deleted...                                                                                                                                                               
INFO[2024-04-30 11:19:42] ⏰ Waiting for client-host Deployment to deleted...                                          
INFO[2024-04-30 11:19:44] ⏰ Waiting for server Deployment to deleted...                                                                                                                                                                      
INFO[2024-04-30 11:19:46] ⏰ Waiting for server-host Deployment to deleted...                                                                                                                                                                 
INFO[2024-04-30 11:19:49] 🔬 prometheus discovered at openshift-monitoring                                                                                                                                                                    
INFO[2024-04-30 11:19:51] ♻️  Namespace already exists, reusing it                                                                                                                                                                             
INFO[2024-04-30 11:19:51] ♻️  Service account already exists, reusing it                                                                                                                                                                      
INFO[2024-04-30 11:19:51] ♻️  Role binding already exists, reusing it                                                                                                                                                                          
WARN[2024-04-30 11:19:52] ⚠️   Single node per zone and/or no zone labels                                                                                                                                                                     
DEBU[2024-04-30 11:19:52] Number of nodes with role worker: 3                                                                                                                                                                                 
DEBU[2024-04-30 11:19:52] Looking for service iperf-service in namespace netperf                                                                                                                                                              
INFO[2024-04-30 11:19:52] 🚀 Creating service for iperf-service in namespace netperf                                                                                                                                                          
FATA[2024-04-30 11:19:52] 😥 Unable to create iperf service: services "iperf-service" is forbidden: unable to create new content in namespace netperf because it is being terminated

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please describe the System Under Test.
  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@rsevilla87 rsevilla87 added bug Something isn't working enhancement New feature or request labels Apr 30, 2024
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
Copy link
Member

@jtaleric jtaleric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jtaleric jtaleric merged commit be41e10 into cloud-bulldozer:main May 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants