Skip to content

Snapshot fingerprint reports raw OCI OCID instead of "oke" for OKE clusters #1517

Description

@atif1996

Summary

When running `aicr snapshot` against an OKE (Oracle Kubernetes Engine) cluster, the `service` field in the fingerprint is populated with the raw OCI instance OCID instead of the expected value `oke`.

Expected behavior

```yaml
fingerprint:
service:
source: k8s.node.provider
value: oke
```

Actual behavior

```yaml
fingerprint:
service:
source: k8s.node.provider
value: ocid1.instance.oc1.us-chicago-1.anxxeljsaqwjupqcb4pa5kzxy4hef5dtclbkqsnmu6kedbkrne3s2bz5nwzq
```

Root cause

OKE nodes set `spec.providerID` to a bare OCID (`ocid1.instance.oc1...`) with no scheme prefix. The `parseProvider` function in `pkg/collector/k8s/node.go` splits on `://` expecting an `oci://...` prefix (analogous to `aws://`, `gce://`, `azure://`), but OKE never emits that format — the OCID falls through to the default case and is returned verbatim.

Additionally, `populateFromK8s` in `pkg/fingerprint/from_measurements.go` copied the provider value directly without normalization, meaning snapshots produced by older agent images were also affected at read time.

Fix

  • `pkg/collector/k8s/node.go`: check `strings.HasPrefix(providerID, "ocid1.")` before the `://` split
  • `pkg/fingerprint/from_measurements.go`: apply `normalizeProviderID` at read time so existing snapshots with raw OCIDs are also corrected

Fixed in #1510.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions