Skip to content

Conversation

@weizhouapache
Copy link
Member

@weizhouapache weizhouapache commented Jan 22, 2025

Description

This PR fixes #10233

--delete-local-data is dropped since Kubernetes 1.31

Drop support for the deprecated --delete-local-data from kubectl drain, users should use --delete-emptydir-data, instead.

https://github.com/kubernetes/kubernetes/blob/a78983906f4cf6f94029a3e6cf3171ef42b395d7/CHANGELOG/CHANGELOG-1.31.md?plain=1#L1338

--delete-emptydir-data has been supported since 2020
kubernetes/kubernetes@625e47a

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Jan 22, 2025
@codecov
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 15.13%. Comparing base (91f1ada) to head (39284d3).
Report is 17 commits behind head on 4.19.

Files with missing lines Patch % Lines
...er/actionworkers/KubernetesClusterScaleWorker.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10234      +/-   ##
============================================
- Coverage     15.13%   15.13%   -0.01%     
+ Complexity    11279    11276       -3     
============================================
  Files          5408     5408              
  Lines        474007   474007              
  Branches      57822    57822              
============================================
- Hits          71745    71734      -11     
- Misses       394241   394254      +13     
+ Partials       8021     8019       -2     
Flag Coverage Δ
uitests 4.30% <ø> (ø)
unittests 15.85% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weizhouapache weizhouapache linked an issue Jan 22, 2025 that may be closed by this pull request
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12160

@weizhouapache
Copy link
Member Author

@blueorangutan test keepEnv

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-12163)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 48579 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10234-t12163-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm
needs regressions testing and maybe deprecation of some older kubctl versions as supported.

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM

Tested manually

  1. Generate a cks iso based on 1.31.1 version of kubernetes

./create-kubernetes-binaries-iso.sh ./ 1.31.1 1.3.0 1.27.0 https://raw.githubusercontent.com/weaveworks/weave/master/prog/weave-kube/weave-daemonset-k8s-1.11.yaml https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml setup-1.31.1

  1. Register it as a kubernetes iso and deploy a cks cluster

  2. Enable autoscaling on the cluster ( specify min and max size)

  3. Deploy a test deployment say nginx on the cks cluster

  4. Trigger cks autoscaling by executing the command
    kubectl scale --replicas=250 deployment/nginx-deployment

  5. The node count of the cks cluster will increase
    kubectl get nodes

  6. Trigger cks autodescaling

kubectl scale --replicas=25 deployment/nginx-deployment

Check the logs

Before fix

2025-01-28 11:10:51,991 INFO  [c.c.k.c.a.KubernetesClusterScaleWorker] (API-Job-Executor-50:[ctx-ddc3650b, job-74, ctx-e8087ea8]) (logid:a9c772dc) Scaling Kubernetes cluster : test
2025-01-28 11:10:51,999 INFO  [c.c.k.c.a.KubernetesClusterScaleWorker] (API-Job-Executor-50:[ctx-ddc3650b, job-74, ctx-e8087ea8]) (logid:a9c772dc) Removing vm : test-node-194ac81c54e from cluster test
2025-01-28 11:10:52,719 ERROR [c.c.u.s.SshHelper] (API-Job-Executor-50:[ctx-ddc3650b, job-74, ctx-e8087ea8]) (logid:a9c772dc) SSH execution of command sudo /opt/bin/kubectl drain test-node-194ac81c54e --ignore-daemonsets --delete-local-data has an error status code in return. Result output: error: unknown flag: --delete-local-data
See 'kubectl drain --help' for usage.

After fix

No error message observed , and cks cluster scaled downed successfully

@weizhouapache
Copy link
Member Author

thanks @kiranchavala for the testing

@DaanHoogland DaanHoogland merged commit b989087 into apache:4.19 Jan 30, 2025
24 of 25 checks passed
@DaanHoogland DaanHoogland deleted the 4.19-fix-10233-cks branch January 30, 2025 14:49
rg9975 pushed a commit to rg9975/cloudstack that referenced this pull request Jan 31, 2025
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

worker node Scale Down Problem In kubernetes

4 participants