openstack-k8s-operators / openstack-operator

Meta Operator for OpenStack
https://openstack-k8s-operators.github.io/openstack-operator/
Apache License 2.0
27 stars 76 forks source link

Use ansibleEE library instead of AnsibleEE v1 CR #972

Closed bshephar closed 2 weeks ago

bshephar commented 2 months ago

This change swaps out the use of the AnsibleEE custom resource for a generic Go library implementation. This enables us to stop using the unnecessary OpenStackAnsibleEE abstraction that we currently have around Kubernetes Jobs for AnsibleEE executions.

Jira: https://issues.redhat.com/browse/OSPRH-8926

openshift-ci[bot] commented 2 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

softwarefactory-project-zuul[bot] commented 2 months ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8d8fc165435e40cd8a678ed706092259

:x: openstack-k8s-operators-content-provider FAILURE in 6m 37s :warning: podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

softwarefactory-project-zuul[bot] commented 2 months ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ff4f8dea98fc4e5db900f382d883aa83

:x: openstack-k8s-operators-content-provider FAILURE in 8m 16s :warning: podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider :warning: openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

softwarefactory-project-zuul[bot] commented 2 months ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/1ae4243f9a8e4f3b8f4679b20439a9f4

:heavy_check_mark: openstack-k8s-operators-content-provider SUCCESS in 2h 38m 49s :x: podified-multinode-edpm-deployment-crc FAILURE in 1h 38m 49s :x: cifmw-crc-podified-edpm-baremetal FAILURE in 1h 31m 20s :x: adoption-standalone-to-crc-ceph-provider FAILURE in 2h 23m 53s :x: openstack-operator-tempest-multinode FAILURE in 1h 44m 08s

bshephar commented 2 months ago

Looks like an issue with the GetAnsibleExecution():

2024-07-25T03:33:09.611Z        INFO    Controllers.OpenStackDataPlaneDeployment        ServiceRepoSetupDeploymentReady OpenStackAnsibleEE not yet found        {"controller": "openstackdataplanedeployment", "controllerGroup": "dataplane.openstack.org", "controllerKind": "OpenStackDataPlaneDeployment", "OpenStackDataPlaneDeployment": {"name":"edpm-deployment","namespace":"openstack"}, "namespace": "openstack", "name": "edpm-deployment", "reconcileID": "3c90b7e8-3a39-4224-9875-897d4ed3db08"}
softwarefactory-project-zuul[bot] commented 2 months ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,15fa6e850a9cb6ca8efc0f23b92fd9a7e5b3c1e4

softwarefactory-project-zuul[bot] commented 2 months ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,c6aad6f604b9b4d6f2cfef5edccfd03c3dfdad55

softwarefactory-project-zuul[bot] commented 2 months ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,13a7570ac407ef70783c1cefee2bc89c2e31fe0e

softwarefactory-project-zuul[bot] commented 2 months ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,5e7a6cf120950bc5c80961281433cfe154b9bb4c

softwarefactory-project-zuul[bot] commented 2 months ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,3877b1fd084db964183b04bb3f7cc417888529de

softwarefactory-project-zuul[bot] commented 1 month ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3c8cc9170d7b4db9958ae84346021683

:heavy_check_mark: openstack-k8s-operators-content-provider SUCCESS in 2h 57m 00s :x: podified-multinode-edpm-deployment-crc FAILURE in 1h 39m 26s :x: cifmw-crc-podified-edpm-baremetal FAILURE in 1h 30m 25s :heavy_check_mark: adoption-standalone-to-crc-ceph-provider SUCCESS in 2h 37m 26s :x: openstack-operator-tempest-multinode FAILURE in 1h 44m 20s

softwarefactory-project-zuul[bot] commented 1 month ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,13442c8bece18299ebfa21a6b24b8b500cff4b3a

bshephar commented 1 month ago

Kuttl tests left to go on this PR. Removed the draft from it so that all CI jobs would run and we can get a baseline for how it's looking.

bshephar commented 1 month ago

+kubebuilder:rbac:groups=ansibleee.openstack.org,resources=openstackansibleees,verbs=get;list;watch;create;update;patch;delete This isn't necessary anymore.

Very true, I removed this as well.

jpodivin commented 1 month ago

/retest

jpodivin commented 1 month ago

/retest

softwarefactory-project-zuul[bot] commented 1 month ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/88b347155e7b468c84a659f81be34a16

:heavy_check_mark: openstack-k8s-operators-content-provider SUCCESS in 1h 46m 42s :heavy_check_mark: podified-multinode-edpm-deployment-crc SUCCESS in 1h 14m 56s :heavy_check_mark: cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 15m 07s :x: adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 14m 47s :heavy_check_mark: openstack-operator-tempest-multinode SUCCESS in 1h 30m 24s

jpodivin commented 1 month ago

/retest

bshephar commented 1 month ago

For those reviewing and follow this PR. Commit 1 has been updated now to use the recently merged ansibleee functions from: https://github.com/openstack-k8s-operators/openstack-operator/pull/1004

The update there removes the replaces in go.mod that previously leveraged my personal lib-common fork.

I still need to fix all of the Kuttl tests. So far I have just worked on perfecting the jobs in: tests/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml. Some idiosyncrasies between batchv1.Job and the now removed OpenStackAnsibleEE CR. Once I get them right in that job, I'll update the rest.

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

This was missing handling for NetworkAttachment so we don't end up with the job pods connected to the multus network: https://github.com/openstack-k8s-operators/openstack-ansibleee-operator/blob/main/controllers/openstack_ansibleee_controller.go#L172

Probably need to write some functional tests to catch that and validate the multus annotation is correct. Latest patchset adds this functionality, retesting now and will look at functional tests for the annotation.

Latest patchset resolves the issue:

[m3@osp-df-3 openstack-operator]$ oc get job download-cache-edpm-compute-openstack-edpm-ipam -o jsonpath='{.metadata.annotations}'
{"k8s.v1.cni.cncf.io/networks":"[{\"name\":\"ctlplane\",\"namespace\":\"openstack\",\"interface\":\"ctlplane\"}]"}
bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

Eh, job is being created, but I named it wrong in the kuttl test:

2024-08-20T05:37:09.278Z    INFO    Controllers.OpenStackDataPlaneDeployment    AnsibleEE job is not yet completed: Execution: custom-global-service-edpm-compute-global, Active pods: 1    {"controller": "openstackdataplanedeployment", "controllerGroup": "dataplane.openstack.org", "controllerKind": "OpenStackDataPlaneDeployment", "OpenStackDataPlaneDeployment": {"name":"edpm-compute-global","namespace":"openstack-kuttl-tests"}, "namespace": "openstack-kuttl-tests", "name": "edpm-compute-global", "reconcileID": "0eb3000b-89f6-40f7-bc55-bb1054a8ef7d"}
bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

softwarefactory-project-zuul[bot] commented 1 month ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. Warning: Error merging github.com/openstack-k8s-operators/openstack-operator for 972,5b96dd183a0dc506ef70f6f5b2e8895dc82247d1

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

softwarefactory-project-zuul[bot] commented 1 month ago

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/af392e2ea8b443669b892116c74898a7

:heavy_check_mark: openstack-k8s-operators-content-provider SUCCESS in 2h 33m 07s :heavy_check_mark: podified-multinode-edpm-deployment-crc SUCCESS in 1h 12m 30s :x: cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 13m 46s :heavy_check_mark: openstack-operator-tempest-multinode SUCCESS in 1h 39m 30s

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

Ok, should just be the tls-data test now

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl

bshephar commented 1 month ago

/test openstack-operator-build-deploy-kuttl