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

DiskOffering in CloudStackMachine CRD should be a pointer to CloudStackResourceDiskOffering #328

Closed
wants to merge 3 commits into from

Conversation

hrak
Copy link
Contributor

@hrak hrak commented Dec 6, 2023

Issue #, if available:

#326

Description of changes:

This is a breaking change in the (unreleased) v1beta3 API which changes the DiskOffering property of CloudStackMachine to be a pointer to CloudStackResourceDiskOffering

Reasoning is described in the above linked issue.

Testing performed:

make test

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

netlify bot commented Dec 6, 2023

Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!

Name Link
🔨 Latest commit 3bc0c08
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/65c34f6533ebf70008055c4d
😎 Deploy Preview https://deploy-preview-328--kubernetes-sigs-cluster-api-cloudstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 6, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 6, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @hrak. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 6, 2023
@hrak hrak force-pushed the bug/disk_offering_ptr branch from 841dc2e to 02cfabc Compare December 11, 2023 14:41
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 11, 2023
@hrak
Copy link
Contributor Author

hrak commented Dec 11, 2023

While working on this PR i was surprised to find that API conversion code was not being generated anymore by the Makefile. I fixed that in this PR too + updated the webhooks to conform with requirements set in CAPI 0.4 (yes, 0.4)

@rohityadavcloud
Copy link
Member

/lgtm
/ok-to-test

@rohityadavcloud
Copy link
Member

/run-e2e -c 4.18

@blueorangutan
Copy link

@rohityadavcloud a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2024

Codecov Report

Attention: 94 lines in your changes are missing coverage. Please review.

Comparison is base (7fd4146) 25.45% compared to head (3bc0c08) 25.27%.

Files Patch % Lines
api/v1beta2/cloudstackmachine_conversion.go 0.00% 33 Missing ⚠️
api/v1beta2/zz_generated.conversion.go 0.00% 30 Missing ⚠️
api/v1beta1/cloudstackmachine_conversion.go 0.00% 18 Missing ⚠️
api/v1beta1/zz_generated.conversion.go 0.00% 5 Missing ⚠️
api/v1beta3/zz_generated.deepcopy.go 0.00% 4 Missing and 1 partial ⚠️
pkg/cloud/instance.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #328      +/-   ##
==========================================
- Coverage   25.45%   25.27%   -0.18%     
==========================================
  Files          59       59              
  Lines        5555     5610      +55     
==========================================
+ Hits         1414     1418       +4     
- Misses       4002     4051      +49     
- Partials      139      141       +2     

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

@blueorangutan
Copy link

Test Results : (tid-357)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.27.2
Kubernetes Version upgrade from: v1.26.5
Kubernetes Version upgrade to: v1.27.2
CloudStack Version: 4.18
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr328-sl-357.zip

[PASS] When testing app deployment to the workload cluster [TC1][PR-Blocking] Should be able to download an HTML from the app deployed to the workload cluster
[PASS] When testing machine remediation Should replace a machine when it is destroyed
[PASS] When testing affinity group Should have host affinity group when affinity is anti
[PASS] When testing MachineDeployment rolling upgrades Should successfully upgrade Machines upon changes in relevant MachineDeployment fields
[PASS] When testing horizontal scale out/in [TC17][TC18][TC20][TC21] Should successfully scale machine replicas up and down horizontally
[PASS] When testing multiple CPs in a shared network with kubevip Should successfully create a cluster with multiple CPs in a shared network
[PASS] When testing subdomain Should create a cluster in a subdomain
[PASS] When testing with disk offering Should successfully create a cluster with disk offering
[PASS] When testing node drain timeout A node should be forcefully removed if it cannot be drained in time
[PASS] with two clusters should successfully add and remove a second cluster without breaking the first cluster
[PASS] When testing with custom disk offering Should successfully create a cluster with a custom disk offering
[PASS] When testing K8S conformance [Conformance] Should create a workload cluster and run kubetest


Summarizing 17 Failures:

[Fail] When testing affinity group [It] Should have host affinity group when affinity is pro 
/jenkins/workspace/capc-e2e-new/test/e2e/common.go:331

[Fail] When testing app deployment to the workload cluster with network interruption [ToxiProxy] [BeforeEach] Should be able to create a cluster despite a network interruption during that process 
/jenkins/workspace/capc-e2e-new/test/e2e/toxiproxy/toxiProxy.go:203

[Fail] When testing app deployment to the workload cluster with slow network [ToxiProxy] [BeforeEach] Should be able to download an HTML from the app deployed to the workload cluster 
/jenkins/workspace/capc-e2e-new/test/e2e/toxiproxy/toxiProxy.go:203

[Fail] When the specified resource does not exist [It] Should fail due to the specified account is not found [TC4a] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified domain is not found [TC4b] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified control plane offering is not found [TC7] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified template is not found [TC6] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified zone is not found [TC3] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified disk offering is not found 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the compute resources are not sufficient for the specified offering [TC8] 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified disk offer is not customized but the disk size is specified 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the specified disk offer is customized but the disk size is not specified 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist [It] Should fail due to the public IP can not be found 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade worker machine due to insufficient compute resources 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources 
/jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253

[Fail] When testing resource cleanup [AfterEach] Should create a new network when the specified network does not exist 
/jenkins/workspace/capc-e2e-new/test/e2e/resource_cleanup.go:101

[Fail] When testing Kubernetes version upgrades [It] Should successfully upgrade kubernetes versions when there is a change in relevant fields 
/root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/machinedeployment_helpers.go:129

Ran 28 of 29 Specs in 13301.948 seconds
FAIL! -- 11 Passed | 17 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (13301.96s)
FAIL

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2024
@hrak hrak force-pushed the bug/disk_offering_ptr branch from 02cfabc to 3bc0c08 Compare February 7, 2024 09:37
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2024
@hrak
Copy link
Contributor Author

hrak commented May 7, 2024

/remove-lifecycle rotten

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

lgtm

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2024
@vishesh92
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 20, 2024
@vishesh92
Copy link
Member

/run-e2e -c 4.19

@blueorangutan
Copy link

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.19
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

@k8s-ci-robot
Copy link
Contributor

@hrak: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
capi-provider-cloudstack-presubmit-e2e-smoke-test 3bc0c08 link true /test capi-provider-cloudstack-presubmit-e2e-smoke-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@blueorangutan
Copy link

Test Results : (tid-400)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.27.2
Kubernetes Version upgrade from: v1.26.5
Kubernetes Version upgrade to: v1.27.2
CloudStack Version: 4.19
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr328-sl-400.zip



Summarizing 3 Failures:
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:332
 [FAIL] When testing app deployment to the workload cluster [TC1][PR-Blocking] [It] Should be able to download an HTML from the app deployed to the workload cluster
 /jenkins/workspace/capc-e2e-new/test/e2e/deploy_app.go:111
 [FAIL] When testing app deployment to the workload cluster with slow network [ToxiProxy] [It] Should be able to download an HTML from the app deployed to the workload cluster
 /jenkins/workspace/capc-e2e-new/test/e2e/deploy_app_toxi.go:135

Ran 28 of 29 Specs in 9289.255 seconds
FAIL! -- 25 Passed | 3 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (9289.26s)
FAIL

api/%/zz_generated.conversion.go: bin/conversion-gen $(CONVERSION_GEN_INPUTS)
conversion-gen --go-header-file "./hack/boilerplate.go.txt" --input-dirs "./api/v1beta1" \
--output-base "." --output-file-base="zz_generated.conversion" --skip-unsafe=true
generate-conversion: $(CONTROLLER_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
generate-conversion: $(CONTROLLER_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3
generate-conversion: $(CONVERSION_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3

Copy link
Member

Choose a reason for hiding this comment

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

@hrak capi-provider-cloudstack-presubmit-e2e-smoke-test is currently failing because it can't find conversion-gen.

api/%/zz_generated.conversion.go: bin/conversion-gen $(CONVERSION_GEN_INPUTS)
conversion-gen --go-header-file "./hack/boilerplate.go.txt" --input-dirs "./api/v1beta1" \
--output-base "." --output-file-base="zz_generated.conversion" --skip-unsafe=true
generate-conversion: $(CONTROLLER_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
generate-conversion: $(CONTROLLER_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3
generate-conversion: $(CONVERSION_GEN) ## Generate code to convert api/v1beta1 and api/v1beta2 to api/v1beta3

@rohityadavcloud
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2024
@rohityadavcloud
Copy link
Member

@vishesh92 pl fix the minor issue post-merging this PR, thanks.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hrak, vishesh92

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@vishesh92
Copy link
Member

@hrak For some reason I am not able to resolve conflicts for this PR. If you have time, can you rebase this PR and resolve conflicts? Else I will have to create a duplicate PR.

@vishesh92
Copy link
Member

I have recreated this PR here: #359
after fixing the conflicts and fixing the make generate-conversion command.

@vishesh92 vishesh92 closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants