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

New custom resource - play #9

Merged

Conversation

cloudguruab
Copy link
Contributor

@cloudguruab cloudguruab commented Nov 17, 2022

A few things, Could the validation error for status.nodes be related to the cluster age? I ran oc get config with the following output:

NAME      AGE
cluster   134d

Ran $ ./bin/manager - initial state was fine, but once I created ansibleee-test.yml this error came up again. Also, looks like playbook-config map is successfully created. Not sure if I need to introduce creating another job in the reconcile function.

I1117 18:46:55.210702 2412650 request.go:682] Waited for 1.043355068s due to client-side throttling, not priority and fairness, request: GET:https://api.crc.testing:6443/apis/operators.coreos.com/v1alpha1?timeout=32s
1.668707216417091e+09   INFO    controller-runtime.metrics      Metrics server is starting to listen    {"addr": ":8080"}
1.6687072164181502e+09  INFO    setup   starting manager
1.6687072164186494e+09  INFO    Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
1.6687072164187126e+09  INFO    Starting server {"kind": "health probe", "addr": "[::]:8081"}
1.6687072164190018e+09  INFO    Starting EventSource    {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE", "source": "kind source: *v1alpha1.AnsibleEE"}
1.6687072164191613e+09  INFO    Starting EventSource    {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE", "source": "kind source: *v1.Job"}
1.668707216419192e+09   INFO    Starting EventSource    {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE", "source": "kind source: *v1.ConfigMap"}
1.6687072164192145e+09  INFO    Starting Controller     {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE"}
1.6687072167234418e+09  INFO    Starting workers        {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE", "worker count": 1}
Creating a new ConfigMap: ConfigMap.Namespace openstack ConfigMap.Name playbook-configmap
configmap created successfully - return and requeue
Creating a new Job: Job.Namespace openstack Job.Name ansibleee-test
jobs.batch "ansibleee-test" already exists
1.6687073157908645e+09  ERROR   Reconciler error        {"controller": "ansibleee", "controllerGroup": "redhat.com", "controllerKind": "AnsibleEE", "AnsibleEE": {"name":"ansibleee-test","namespace":"openstack"}, "namespace": "openstack", "name": "ansibleee-test", "reconcileID": "4eaf9ee5-1b40-4031-930a-11575ee1ae26", "error": "jobs.batch \"ansibleee-test\" already exists"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /home/adrbrown/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /home/adrbrown/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /home/adrbrown/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234

@jlarriba
Copy link
Collaborator

The ReconcilerError is quite clear on what is happening: jobs.batch "ansibleee-test" already exists. In Openshift/Kubernetes you can never create two jobs at the same time with the same name. Either you change the name or you delete the previous job execution: oc delete ansibleee ansibleee-test.

To avoid this error, you must delete the previous ansibleee-test job before running ./bin/manager, or it will get the ansibleee and launch it again (as you are deploying a new instance of the operator).

Regarding the age of the cluster, that never impacts anything, not one service in Kubernetes is looking at that.

@cloudguruab cloudguruab changed the title New custom resource - playbook name New custom resource - play Nov 23, 2022
@cloudguruab cloudguruab marked this pull request as ready for review November 23, 2022 02:14
@jlarriba
Copy link
Collaborator

/assign jlarriba

@openshift-merge-robot
Copy link
Contributor

@cloudguruab: 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/test-infra repository.

@jlarriba
Copy link
Collaborator

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cloudguruab, jlarriba

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

@jlarriba
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 28, 2022
@openshift-merge-robot openshift-merge-robot merged commit 52ce719 into openstack-k8s-operators:main Nov 28, 2022
openstack-mirroring pushed a commit to openstack-archive/tripleo-common that referenced this pull request Nov 30, 2022
This patch introduces the capacity for the tripleo_entrypoint.sh
script to generate an inventory and/or a playbook from env
variables passed to the runner container by the operator itself

The ansibleee-operator will take care of filling the contents of the
env variables in [1] and [2]

[1] openstack-k8s-operators/openstack-ansibleee-operator#20
[2] openstack-k8s-operators/openstack-ansibleee-operator#9

Change-Id: I030518bb8807aad9fb0d480a130d327522de707d
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Nov 30, 2022
* Update tripleo-common from branch 'master'
  to d2249b70e26c94948695f14dc272e11fc4339a7a
  - Merge "Generic inventory and playbook"
  - Generic inventory and playbook
    
    This patch introduces the capacity for the tripleo_entrypoint.sh
    script to generate an inventory and/or a playbook from env
    variables passed to the runner container by the operator itself
    
    The ansibleee-operator will take care of filling the contents of the
    env variables in [1] and [2]
    
    [1] openstack-k8s-operators/openstack-ansibleee-operator#20
    [2] openstack-k8s-operators/openstack-ansibleee-operator#9
    
    Change-Id: I030518bb8807aad9fb0d480a130d327522de707d
danpawlik pushed a commit to danpawlik/openstack-ansibleee-operator that referenced this pull request Oct 12, 2023
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.

3 participants