Skip to content

Commit

Permalink
patch the workflow
Browse files Browse the repository at this point in the history
Signed-off-by: myan <[email protected]>
  • Loading branch information
yanmxa committed Sep 25, 2024
1 parent 40d1a83 commit 3a6cc3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion agents/kube_engineer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def kube_engineer(llm_config: dict):
- Use simple English and provide clear, human-readable summaries. Avoid unusual characters.
- Complete tasks with minimal steps. Combine shell commands into scripts where possible.
- Present each step with a single code block. Provide one code block to the Executor at a time!
- Use `kubectl describe` with the `-o yaml` option or the `kubectl get events` command to investigate the details of a resource.
- Use `kubectl describe`, or with the `-o yaml` option command to find the details of a resource.
- Try to access the cluster explicitly, such as using `--kubeconfig` and `--context` options. Otherwise, use the `KUBECONFIG` environment variable.
**Examples:**
Expand Down
15 changes: 5 additions & 10 deletions runbooks/cluster-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ The klusterlet agent (`deploy/klusterlet -n open-cluster-management`), reconcile
```bash
# get the deployment
oc -n open-cluster-management-agent get deploy/klusterlet-registration-agent --context <managed-cluster-context>
# get the pods instance
oc -n open-cluster-management-agent get pods -l app=klusterlet-registration-agent --context <managed-cluster-context>
```

The unknown status is caused by the Klusterlet registration agent not running, or there may be internal issues preventing it from updating the managed cluster on the hub. We need to explore further with the following two cases:
The unknown status is caused by the Klusterlet registration agent instance not running, or there may be internal issues preventing it from updating the managed cluster on the hub. We need to explore further with the following two cases:

If the pod instance is present, try to review its logs to see if any errors are preventing the creation of the klusterlet registration agent.
If the pod instance is not present, go to (3) check the klusterlet agent which is responsible create the registration agent.
If the pod instance of the deployment is present, go to (2) try to check its logs to see if any errors are preventing the creation of the klusterlet registration agent.
If the the pod instance of the deployment is not present, go to (3) check the klusterlet agent which is responsible create the registration agent.

(2) Check the log of the pod of the klusterlet registration agent if it exists

Expand All @@ -81,14 +79,11 @@ If the `klusterlet-registration-agent` deployment is not found, then go to the n
```bash
# the deployment
oc -n open-cluster-management get deploy/klusterlet --context <managed-cluster-context>

# the pods
oc -n open-cluster-management get pod -l app=klusterlet --context <managed-cluster-context>
```

If the Klusterlet agent pod isn't running, this is why the Klusterlet registration agent instance is not operational! Then get the deployment detail to investigate why the instance hasn't running and return the result.
If the Klusterlet agent instance isn't running, this is why the Klusterlet registration agent instance is not operational! Then get the deployment detail of the klusterlet agent to find why the instance hasn't running and return the result.

If the klusterlet agent pod exists, check the logs of the klusterlet agent.
If the klusterlet agent instance(pod) exists, check the logs of the klusterlet agent.

(4) Check the klusterlet agent log on the managed cluster if the klusterlet agent pod exists.

Expand Down

0 comments on commit 3a6cc3b

Please sign in to comment.