| Summary: | oc convert didn't create all files under directory after they have been converted | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> |
| Component: | oc | Assignee: | Fabiano Franz <ffranz> |
| Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.4.0 | CC: | aos-bugs, jokerman, mmccomas, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: 'oc convert' failed to produce a YAML file with valid syntax when converting from multiple files in a directory.
Consequence: When converting from multiple files in a directory and piping the output to 'oc create', it would only create the first file converted.
Fix: Fixed the YAML syntax in the output of 'oc convert' when converting multiple files.
Result: The output of 'oc convert' can feed 'oc create' properly.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-18 12:51:06 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: | |
Checked with oc v3.4.0.27+dffa95c/kubernetes v1.4.0+776c994 with steps in "Steps to Reproduce", issue has been fixed I could verify when it's moved ON_QA Move to VERIFIED since already checked in oc v3.4.0.27 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-2017:0066 |
Description of problem: oc convert didn't create all files under directory after they have been converted Version-Release number of selected component (if applicable): oc v3.4.0.23+24b1a58 kubernetes v1.4.0+776c994 How reproducible: Always Steps to Reproduce: 1.Prepare 2 test files cat >> job-v1.yaml << EOF apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: metadata: name: pi spec: containers: - name: pi image: perl command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never EOF cat >> job-v2.json << EOF { "kind": "ScheduledJob", "apiVersion": "batch/v2alpha1", "metadata": { "name": "hello", "creationTimestamp": null }, "spec": { "schedule": "0/1 * * * ?", "concurrencyPolicy": "Allow", "suspend": false, "jobTemplate": { "metadata": { "creationTimestamp": null }, "spec": { "template": { "metadata": { "creationTimestamp": null }, "spec": { "containers": [ { "name": "hello", "image": "busybox", "args": [ "/bin/sh", "-c", "date; echo Hello from the Kubernetes cluster" ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always" } ], "restartPolicy": "OnFailure", "terminationGracePeriodSeconds": 30, "dnsPolicy": "ClusterFirst", "securityContext": {} } } } } }, "status": {} } EOF 2.mkdir /tmp/test; cp job-v1.yaml job-v2.json /tmp/test;cd /tmp/test 3.oc convert -f . 4.oc convert -f . | oc create -f - Actual results: 3.All files are converted 4.Only one resource is created $ oc convert -f . | oc create -f - running in local mode... scheduledjob "hello" created Expected results: 4. Both job "pi" and scheduledjob "hello" should be created successfully Additional info: