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

Provide more information on the .status.condition field #435

Closed
git-hyagi opened this issue Jun 6, 2022 · 0 comments · Fixed by #464
Closed

Provide more information on the .status.condition field #435

git-hyagi opened this issue Jun 6, 2022 · 0 comments · Fixed by #464
Assignees

Comments

@git-hyagi
Copy link
Collaborator

Describe the solution you'd like
The architecture of Pulp operator and the components that it deploys is kind of complex. Not everyone knows all the components involved nor the order in which they are deployed.

To help troubleshoot the operator state, we could modify the .status.condition of Pulp CR instance:

  • based on resource (deployment/sts) status
  • based on pod logs

Example of issue that it could have helped:

  • During a pipeline execution, molecule failed its execution and we don't know in what step it was and what it was trying to do:
  TASK [Wait 15m for reconciliation to run] **************************************
  fatal: [localhost]: FAILED! => {
      "api_found": true,
      "attempts": 150,
      "changed": false,
      "resources": [
...
              "status": {
                  "conditions": [
                      {
                          "lastTransitionTime": "2022-06-02T21:26:54Z",
                          "reason": "",
                          "status": "False",
                          "type": "Successful"
                      },
                      {
                          "lastTransitionTime": "2022-06-02T21:40:46Z",
                          "reason": "Running",
                          "status": "False",
                          "type": "Running"
                      },
                      {
                          "lastTransitionTime": "2022-06-02T21:40:57Z",
                          "reason": "Failed",
                          "status": "True",
                          "type": "Failure"
                      }
                  ]

The idea is to, instead of just providing that operator failed or was in a running state, provide the status of each Pulp operator component with a descriptive message. Here is an example of an expected output:

              "status": {
                  "conditions": [
                      {
                         "type": DB-Available,
                         "message": Database Running,
                         "reason": DatabaseReady,
                         "status": "True",
                         "lastTransitionTime": "2022-06-02T21:40:46Z"
                      },
                      {
                         "type": Pulp-Api-Available,
                         "message": Pulp Api Not Running,
                         "reason": PulpApiNotRunning,
                         "status": "False",
                         "lastTransitionTime": "2022-06-02T21:40:46Z"
                      },
                      {
                         "type": Pulp-Content-Available,
                         "message": Pulp Content Not Running,
                         "reason": PulpContentNotRunning,
                         "status": "False",
                         "lastTransitionTime": "2022-06-02T21:40:46Z"
                      },
...
                  ]

Here is an example of dns cluster operator from OpenShift:

status:
  conditions:
  - lastTransitionTime: "2022-06-06T14:23:26Z"
    message: DNS "default" is available.
    reason: AsExpected
    status: "True"
    type: Available
  - lastTransitionTime: "2022-06-06T14:23:26Z"
    message: desired and current number of DNSes are equal
    reason: AsExpected
    status: "False"
    type: Progressing
  - lastTransitionTime: "2022-06-06T14:23:26Z"
    reason: DNSNotDegraded
    status: "False"
    type: Degraded
@git-hyagi git-hyagi self-assigned this Jun 9, 2022
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
postgres role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
pulp-web role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
pulp-api role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
pulp-content role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
pulp-worker role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
Setting different .status.conditions message for the tasks of
pulp-status role.

closes pulp#435
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 27, 2022
git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Jun 28, 2022
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
postgres role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
pulp-web role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
pulp-api role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
pulp-content role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
pulp-worker role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
Setting different .status.conditions message for the tasks of
pulp-status role.

closes #435
git-hyagi added a commit that referenced this issue Jun 28, 2022
git-hyagi added a commit that referenced this issue Jun 28, 2022
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
postgres role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
pulp-web role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
pulp-api role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
pulp-content role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
pulp-worker role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Setting different .status.conditions message for the tasks of
pulp-status role.

closes pulp#435
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
mancubus77 pushed a commit to mancubus77/pulp-operator that referenced this issue Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant