Bug 1389255 - [platformmanagement_public_806] Evict endpoint getting: Resource was marked with kind Pod but was unable to be converted
Summary: [platformmanagement_public_806] Evict endpoint getting: Resource was marked w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Chuan Yu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 09:49 UTC by Chuan Yu
Modified: 2017-03-08 18:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Antiaffinity admission plugin did not allow submitting anything to pod subresources, here pods/evicton. Consequence: It's impossible to evict a pod. Fix: Update antiaffinity admission plugin to ignore calls to pod's soubresources. Result: Pod eviction is working as expected.
Clone Of:
Environment:
Last Closed: 2017-03-08 18:39:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chuan Yu 2016-10-27 09:49:14 UTC
Description of problem:
Evict pods failed, and get "message": "Resource was marked with kind Pod but was unable to be converted".

Version-Release number of selected component (if applicable):
openshift v3.4.0.16+cc70b72

How reproducible:
Always

Steps to Reproduce:
1.Try to evict existed pod by curl cmd, such as:
curl -k -v -X POST -H "Authorization: Bearer $(oc whoami -t)" -H 'Content-type: application/json' https://127.0.0.1:8443/api/v1/namespaces/default/pods/pod-5/eviction -d @eviction.json
{ 
  "apiVersion": "policy/v1alpha1", 
  "kind": "Eviction", 
  "metadata": { 
    "name": "pod-1", 
    "namespace": "default" 
  } 
} 


Actual results:
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "Resource was marked with kind Pod but was unable to be converted",
  "reason": "BadRequest",
  "code": 400
}

Expected results:
No such messages return, the cmd should be run successful or fail.

Additional info:

Comment 1 Maciej Szulik 2016-10-27 10:23:28 UTC
Fix in https://github.com/openshift/origin/pull/11578 is waiting upstream approval.

Comment 2 Chuan Yu 2016-11-04 02:52:37 UTC
Checked with openshift v1.4.0-alpha.0+777e66f-1137, the issue was fixed. 
Will check with OCP later.

Comment 3 Chuan Yu 2016-11-08 06:10:28 UTC
Checked with the OCP latest verion, the issue was fixed.
openshift v3.4.0.23+24b1a58
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0


Note You need to log in before you can comment on or make changes to this bug.