Bug 1449320 - Can't get PodPreset by oc command
Summary: Can't get PodPreset by oc command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-09 15:32 UTC by DeShuai Ma
Modified: 2017-08-16 19:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 05:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description DeShuai Ma 2017-05-09 15:32:27 UTC
Description of problem:
Create a PodPreset then get it will get error

Version-Release number of selected component (if applicable):
# oc version
oc v3.6.65
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://qe-dma36-master-1:8443
openshift v3.6.65
kubernetes v1.6.1+5115d708d7

How reproducible:
Always

Steps to Reproduce:
1. Create a podpreset
# cat podpreset.yaml 
kind: PodPreset
apiVersion: settings.k8s.io/v1alpha1
metadata:
  name: allow-database
spec:
  selector:
    matchLabels:
      role: frontend
  env:
    - name: DB_PORT
      value: "6379"
  volumeMounts:
    - mountPath: /cache
      name: cache-volume
  volumes:
    - name: cache-volume
      emptyDir: {}
# oc create -f podpreset.yaml -n dma
podpreset "allow-database" created


2. Get the podpreset
# oc get podpreset -n dma
NAME      KIND
error: unknown type &settings.PodPreset{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"allow-database", GenerateName:"", Namespace:"dma", SelfLink:"/apis/settings.k8s.io/v1alpha1/namespaces/dma/podpresets/allow-database", UID:"922d8468-34cb-11e7-8193-42010af00004", ResourceVersion:"20214", Generation:1, CreationTimestamp:v1.Time{Time:time.Time{sec:63629940259, nsec:0, loc:(*time.Location)(0x6a109a0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:settings.PodPresetSpec{Selector:v1.LabelSelector{MatchLabels:map[string]string{"role":"frontend"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}, Env:[]api.EnvVar{api.EnvVar{Name:"DB_PORT", Value:"6379", ValueFrom:(*api.EnvVarSource)(nil)}}, EnvFrom:[]api.EnvFromSource(nil), Volumes:[]api.Volume{api.Volume{Name:"cache-volume", VolumeSource:api.VolumeSource{HostPath:(*api.HostPathVolumeSource)(nil), EmptyDir:(*api.EmptyDirVolumeSource)(0xc4211222d0), GCEPersistentDisk:(*api.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*api.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*api.GitRepoVolumeSource)(nil), Secret:(*api.SecretVolumeSource)(nil), NFS:(*api.NFSVolumeSource)(nil), ISCSI:(*api.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*api.PersistentVolumeClaimVolumeSource)(nil), RBD:(*api.RBDVolumeSource)(nil), Quobyte:(*api.QuobyteVolumeSource)(nil), FlexVolume:(*api.FlexVolumeSource)(nil), Cinder:(*api.CinderVolumeSource)(nil), CephFS:(*api.CephFSVolumeSource)(nil), Flocker:(*api.FlockerVolumeSource)(nil), DownwardAPI:(*api.DownwardAPIVolumeSource)(nil), FC:(*api.FCVolumeSource)(nil), AzureFile:(*api.AzureFileVolumeSource)(nil), ConfigMap:(*api.ConfigMapVolumeSource)(nil), VsphereVolume:(*api.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*api.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*api.PhotonPersistentDiskVolumeSource)(nil), Projected:(*api.ProjectedVolumeSource)(nil), PortworxVolume:(*api.PortworxVolumeSource)(nil), ScaleIO:(*api.ScaleIOVolumeSource)(nil)}}}, VolumeMounts:[]api.VolumeMount{api.VolumeMount{Name:"cache-volume", ReadOnly:false, MountPath:"/cache", SubPath:""}}}}

Actual results:
2. get some error info

Expected results:
2. Should get podpreset success

Additional info:

Comment 1 DeShuai Ma 2017-05-09 15:35:11 UTC
This will fixed by upstream https://github.com/kubernetes/kubernetes/pull/44746
when merge this pr need rebase to ocp.

Comment 2 Fabiano Franz 2017-05-09 18:53:08 UTC
Andy, this is currently listed as a blocker. Should we take the upstream commit, or are you ok waiting for the next rebase?

Comment 3 Fabiano Franz 2017-05-10 19:31:02 UTC
Waiting for the next Kube rebase.

Comment 4 Andy Goldstein 2017-05-30 14:46:04 UTC
SGTM

Comment 5 DeShuai Ma 2017-07-06 07:43:33 UTC
What's the latest of the bug?
On openshift v3.6.135 I get no kind resource error.

# oc get podpreset
the server doesn't have a resource type "podpreset"

Comment 6 Fabiano Franz 2017-07-11 18:36:59 UTC
Fixed in https://github.com/openshift/origin/pull/15148

Comment 8 Weihua Meng 2017-07-14 08:43:11 UTC
Verified on openshift v3.6.144.
Fixed.

# oc get  podpreset -n wmeng
NAME             AGE
allow-database   44s

Comment 10 errata-xmlrpc 2017-08-10 05:23:08 UTC
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/RHEA-2017:1716


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