Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1449320 - Can't get PodPreset by oc command
Can't get PodPreset by oc command
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-09 11:32 EDT by DeShuai Ma
Modified: 2017-08-16 15 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-10 01:23:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 05:02:50 EDT

  None (edit)
Description DeShuai Ma 2017-05-09 11:32:27 EDT
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 11:35:11 EDT
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 14:53:08 EDT
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 15:31:02 EDT
Waiting for the next Kube rebase.
Comment 4 Andy Goldstein 2017-05-30 10:46:04 EDT
SGTM
Comment 5 DeShuai Ma 2017-07-06 03:43:33 EDT
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 14:36:59 EDT
Fixed in https://github.com/openshift/origin/pull/15148
Comment 8 Weihua Meng 2017-07-14 04:43:11 EDT
Verified on openshift v3.6.144.
Fixed.

# oc get  podpreset -n wmeng
NAME             AGE
allow-database   44s
Comment 10 errata-xmlrpc 2017-08-10 01:23:08 EDT
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.