Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1449320

Summary: Can't get PodPreset by oc command
Product: OpenShift Container Platform Reporter: DeShuai Ma <dma>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: high    
Version: 3.6.0CC: agoldste, aos-bugs, ffranz, jokerman, mmccomas, smunilla, wmeng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-10 05:23:08 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:
Embargoed:

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