openshift / openshift/osdctl

[ROSAENG-435] osdctl cluster context should list PagerDuty incidents for HCP

Open
#941 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug ready-to-code
Dominant language
Go
Stars
47
Forks
142
Avg merge
21h 19m
Merged PRs (30d)
9

Description

Expected Behavior

When running osdctl cluster context --cluster-id for a HCP cluster, it should return relevant PagerDuty alerts.

Actual Behavior

When running it, it fails to find any incidents and returns none.

Steps to Reproduce:

Run osdctl cluster-context --cluster-id $SOME_HCP_ID

Note the lack of incidents in the output

Environment:

All

Additional Information

This is primarily due to the design of how Classic vs HCP clusters are routed to PD. For classic clusters, we create a PD service per-cluster, and the service name is inferred via the DNS name of the cluster in osdctl here

We should decouple this first, so it's more obvious, then figure out how to enumerate the list of service IDs in PD based on the clusters region. Once we have that, we can then list incidents for those service(s), and iterate over them, looking at the CustomDetails to map the Cluster ID.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cmd/org/context.go around the linked cluster-context logic at line 210, then reproduce the HCP case with osdctl cluster-context --cluster-id $SOME_HCP_ID. Trace how Classic cluster PagerDuty services are inferred and determine how regional service IDs and CustomDetails should be used to identify incidents by cluster ID. Done means HCP context output lists its relevant PagerDuty incidents.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.