[
https://issues.apache.org/jira/browse/YUNIKORN-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wilfred Spiegelenburg resolved YUNIKORN-1856.
---------------------------------------------
Fix Version/s: 1.4.0
Resolution: Fixed
Change to use a generated UID to embed in the application ID instead of the pod
UID as the K8s API does not guarantee that the UID is set on an object until
after the creation process is finished.
> Pod creation fails in certain cases when generateUniqueAppId is enabled
> -----------------------------------------------------------------------
>
> Key: YUNIKORN-1856
> URL: https://issues.apache.org/jira/browse/YUNIKORN-1856
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes
> Affects Versions: 1.3.0
> Reporter: Mit Desai
> Assignee: Mit Desai
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> As part of YUNIKORN-1273 new functionality was added to generate unique
> application ids.
> A unique appId is generated based on the podUid and the namespace name. We
> used podUID instead of other options like timestamp and random hash, as
> regenerating the appId with the podUID during the recovery would generate the
> same appId.
> But in certain cases, when the request reaches the admission controller, the
> podUID is not available and the request would fail due to an invalid label
> value.
>
> Example pod that fails with this error:
> {noformat}
> apiVersion: v1
> kind: Pod
> metadata:
> name: sleepy
> spec:
> containers:
> - name: sleepy
> image: sleepy:0.1.0{noformat}
> {noformat}
> kubectl apply -f sleepypod.yaml
> {noformat}
> Error:
> {noformat}
> The Pod "sleepy" is invalid: metadata.labels: Invalid value: "default-": a
> valid label must be an empty string or consist of alphanumeric characters,
> '-', '_' or '.', and must start and end with an alphanumeric character (e.g.
> 'MyValue', or 'my_value', or '12345', regex used for validation is
> '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]