Bug 1319929
| Summary: | Unable to create new Jobs from a template | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Ed Seymour <eseymour> | ||||
| Component: | Node | Assignee: | Maciej Szulik <maszulik> | ||||
| Status: | CLOSED ERRATA | QA Contact: | DeShuai Ma <dma> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 3.1.0 | CC: | aos-bugs, eseymour, jokerman, mmccomas, tdawson, tmckay, wmeng | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: |
Cause:
Jobs were experimental feature in 3.1.
Consequence:
Templates didn't work with Jobs.
Fix:
Stabilize Job feature.
Result:
Jobs migrated to stable API allowing us to fully support all the necessary features, including Templates.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-09-27 09:36:46 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Ed Seymour
2016-03-21 20:49:35 UTC
Apologies in advance if I'm triaging this incorrectly. Could you please attach your template? Created attachment 1139070 [details]
Example template using a Job
Attached is an example template that attempts to create a new resource of typeJob
What openshift version are you running? I tested the latest master and it worked for me, albeit with a couple of required changes to your template. I had to set parallelism and completions to hard-coded int values instead of parameters, because the parameters turn into strings, and these values must be ints. It was latest CDK beta - that may be why it didn't work, perhaps? What is the output of running this command? `openshift version` openshift v3.1.0.4-16-g112fcc4 kubernetes v1.1.0-origin-1107-g4c8e6f4 etcd 2.1.2 Maciej, are jobs supposed to work in 3.1.0.4? I know they work in 3.2... To be clear, the Job works when not part of a template, it's only when I tried to template the Job that I hit this issue. Ed, that might be crucial information. Will look into this tomorrow morning. Jobs in 3.1 where only available if you specified to enable experimental API, but since you're mentioning plain Jobs work ok I assume you have that on, on the other hand 'unknown type Job' suggests it's not on. Additionally between 3.1 and 3.2 there were more significant changes in how API is registered, it might be that templates don't work well with those, or rather didn't work well with experimental APIs. Can you verify if running cli version works for you: oc process -f template.yaml -v URL=google.pl | oc create -f - Checked against latest master, it's working correctly. Moving to QA. Jobs can be successfully created using templates. # oc process -f template.yaml -v URL=google.pl | oc create -f - job "ab" created # oc get job NAME DESIRED SUCCESSFUL AGE ab 1 0 40s # openshift version openshift v3.2.1.3-1-gcbaf600 kubernetes v1.2.0-36-g4a3f9c5 etcd 2.2.5 fyi, I can verify that this was broken in 3.1 but appears to have been fixed later. # oc version oc v3.1.0.4-5-gebe80f5 kubernetes v1.1.0-origin-1107-g4c8e6f4 In my case, a yaml template containing a job could be launched from the CLI using oc process and running oc create on the resulting json. However, if I uploaded the yaml template to a project via oc create and then tried to launch from the console via "Add to project", it failed with an unknown kind error. note, using origin image tags from https://hub.docker.com/r/openshift/origin/tags/ and running allinone containers, this appears to have been fixed in v1.1.2 but was broken previously. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1933 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |