Description of problem: Using oc adm create-bootstrap-project-template it creates a template with apiVersion parameters wrong, like: - apiVersion: project.openshift.io/v1 Version-Release number of selected component (if applicable): $ oc version oc v3.6.173.0.5 kubernetes v1.6.1+5115d708d7 features: Basic-Auth GSSAPI Kerberos SPNEGO How reproducible: oc 3.6.173.0.5 command line. Steps to Reproduce: 1. oc adm create-bootstrap-project-template -o yaml >> oc_adm_template.yaml 2. oadm create-bootstrap-project-template -o yaml >> oadm_template.yaml 3. diff oc_adm_template.yaml oadm_template.yaml Actual results: 7c7 < - apiVersion: project.openshift.io/v1 --- > - apiVersion: v1 18c18 < - apiVersion: authorization.openshift.io/v1 --- > - apiVersion: v1 32c32 < - apiVersion: authorization.openshift.io/v1 --- > - apiVersion: v1 46c46 < - apiVersion: authorization.openshift.io/v1 --- > - apiVersion: v1 60c60 < - apiVersion: authorization.openshift.io/v1 --- > - apiVersion: v1 Expected results: Empty Additional info: If the *bad* project-request is created, when you try to create a project it fails as: $ oc new-project jenkins-persistent-test Error from server (InternalError): Internal error occurred: the project template (default/project-request) is not correctly configured: must contain a project resource
This BZ blocks this one -> https://github.com/openshift/openshift-docs/pull/4785
Are you running this against a 3.6 server as well? I'm unable to reproduce this using: - oc 3.6 - against 3.7 cluster - oc 3.7 - against 3.7 cluster
The cluster is OCP 3.5, but I've tried it in an isolated environment (aka not logged) and it's the same issue: $ rm -Rf ~/.kube/* $ oc logout error: Missing or incomplete configuration info. Please login or point to an existing, complete config file: 1. Via the command-line flag --config 2. Via the KUBECONFIG environment variable 3. In your home directory as ~/.kube/config To view or setup config directly use the 'config' command. $ oc whoami error: Missing or incomplete configuration info. Please login or point to an existing, complete config file: 1. Via the command-line flag --config 2. Via the KUBECONFIG environment variable 3. In your home directory as ~/.kube/config To view or setup config directly use the 'config' command. $ oc version oc v3.6.173.0.5 kubernetes v1.6.1+5115d708d7 features: Basic-Auth GSSAPI Kerberos SPNEGO $ ls $ oc adm create-bootstrap-project-template -o yaml >> oc_adm_template.yaml $ grep api oc_adm_template.yaml apiVersion: v1 - apiVersion: project.openshift.io/v1 - apiVersion: authorization.openshift.io/v1 - apiVersion: authorization.openshift.io/v1 - apiVersion: authorization.openshift.io/v1 - apiVersion: authorization.openshift.io/v1
OCP 3.6 with oc 3.6 seem to work: [cloud-user@master-0 proje]$ oc adm create-bootstrap-project-template -o yaml >> project.yaml [cloud-user@master-0 proje]$ oadm create-bootstrap-project-template -o yaml >> oadm_project.yaml [cloud-user@master-0 proje]$ diff project.yaml oadm_project.yaml [cloud-user@master-0 proje]$ oc version oc v3.6.173.0.5 kubernetes v1.6.1+5115d708d7 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://openshift.refarch.roger.com:8443 openshift v3.6.173.0.5 kubernetes v1.6.1+5115d708d7
I was able to replicate this with a 1.5 cluster and a 3.6 client. @ffranz I'm thinking maybe we did not add support for a `project.openshift.io/v1` Project group-version until 3.6? I was able to get the same invalid template generated by `oc adm` to work once I deleted `project.openshift.io/` and just left `v1`. cc'ing Mo as well.
@mfojtik I think `oc` 3.6 should default to generating non-grouped projects for the project template, in order to have at least one future release be backwards-compatible with 3.5 clusters.
Origin PR: https://github.com/openshift/origin/pull/16207
Update status to MODIFY, will verify this once new ose3.6.1 pudle built out
Verified with: openshift v3.6.173.0.37 kubernetes v1.6.1+5115d708d7 etcd 3.2.1 steps: # oc adm create-bootstrap-project-template -o yaml >> oc_adm_template.yaml # oadm create-bootstrap-project-template -o yaml >> oadm_template.yaml # diff oc_adm_template.yaml oadm_template.yaml # less oc_adm_template.yaml # # grep apiVersion oadm_template.yaml apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1 # grep apiVersion oc_adm_template.yaml apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1 - apiVersion: v1
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:3049