Description of problem: Create a template to provision a new Job (extensions/v1beta1) reports an "unknown type Job" error message when used. Use case was to create templates to run one-time jobs on demand with parallelism and completion, such as a bench mark test. Version-Release number of selected component (if applicable): CDK version beta5 How reproducible: easy Steps to Reproduce: 1. Create a template for a Job 2. Use 'Add to Project' to request an instance of Job Actual results: Reported error 'unknown type Job' Expected results: It should create Job. Note: Jobs can be successfully created without using templates. Additional info:
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