Hide Forgot
Description of problem: In From File tab of create page, upload a resource file with json format (but metadata.name is not given), then Create, it pops up a small window wrongly saying: pod '' already exists Do you want to replace with the new content? Version-Release number of selected component (if applicable): fork_ami_openshift3_userinterface_public_546_222 How reproducible: Always Steps to Reproduce: 1. oc login and create project 2. Prepare resource file with json format in local PC $ wget https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json Then remove the "name" line under metadata from the file. 3. Login to Openshift web console, click Add to project --> From File --> Browse, select the json file and Create 4. oc create -f hello-pod.json Actual results: 3. It pops up small window saying: pod '' already exists Do you want to replace with the new content? Replace Cancel 4. It prompts (it is expected): The Pod "" is invalid. metadata.name: Required value: name or generateName is required Expected results: 3. Should prompt the resource is invalid, as same as CLI in step 4 Additional info: The result should be same as missing other required field: E.g. remove only spec.containers[0].name, then repeat above steps, both CLI and web console can show correct message: Pod "hello-openshift" is invalid: spec.containers[0].name: Required value
The PR has been merged, please use the master for testing.
Checked against devenv-rhel7_4087 1. oc login and create project 2. Prepare resource file with json format in local PC $ wget https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json Then remove the "name" line under metadata from the file. 3. Login to Openshift web console, click Add to project --> From File --> Browse, select the json file and Create pod is not created, and give error message "Failed to process the resource. Resource name is missing in metadata field"
For scenario described in this bug, it works well now, move to VERIFIED