Skip to content

fix 0.8-to-1.0 upgrade issue with istio-mixer-post-install#7087

Closed
ayj wants to merge 1 commit intoistio:release-1.0from
ayj:release-1.0-mixer-post-install-upgrade-issue
Closed

fix 0.8-to-1.0 upgrade issue with istio-mixer-post-install#7087
ayj wants to merge 1 commit intoistio:release-1.0from
ayj:release-1.0-mixer-post-install-upgrade-issue

Conversation

@ayj
Copy link
Copy Markdown
Contributor

@ayj ayj commented Jul 13, 2018

The istio-mixer-post-install job was changed between 0.8 to 1.0 to address CRD install issues. However, hob template specs are immutable. Upgrading from 0.8 to 1.0 produces the following error when the modified job is applied.

The Job "istio-mixer-post-install" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"istio-mixer-post-install", GenerateName:"", Namespace:"", SelfLin
k:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSecon
ds:(*int64)(nil), Labels:map[string]string{"app":"mixer", "controller-uid":"7990ff1d-86b8-11e8-8e71-42010a8000b7", "job-name":"istio-mixer-post-install", "release":"RELEASE-NAME"}, Annotations:m
ap[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:core.PodSpec{Volumes:[]core.Volume{core.Vol
ume{Name:"tmp-configmap-mixer", VolumeSource:core.VolumeSource{HostPath:(*core.HostPathVolumeSource)(nil), EmptyDir:(*core.EmptyDirVolumeSource)(nil), GCEPersistentDisk:(*core.GCEPersistentDiskV
olumeSource)(nil), AWSElasticBlockStore:(*core.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*core.GitRepoVolumeSource)(nil), Secret:(*core.SecretVolumeSource)(nil), NFS:(*core.NFSVolumeSourc
e)(nil), ISCSI:(*core.ISCSIVolumeSource)(nil), Glusterfs:(*core.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*core.PersistentVolumeClaimVolumeSource)(nil), RBD:(*core.RBDVolumeSource)(nil
), Quobyte:(*core.QuobyteVolumeSource)(nil), FlexVolume:(*core.FlexVolumeSource)(nil), Cinder:(*core.CinderVolumeSource)(nil), CephFS:(*core.CephFSVolumeSource)(nil), Flocker:(*core.FlockerVolum
eSource)(nil), DownwardAPI:(*core.DownwardAPIVolumeSource)(nil), FC:(*core.FCVolumeSource)(nil), AzureFile:(*core.AzureFileVolumeSource)(nil), ConfigMap:(*core.ConfigMapVolumeSource)(0xc43d75330
0), VsphereVolume:(*core.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*core.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*core.PhotonPersistentDiskVolumeSource)(nil), Projected:(*core.
ProjectedVolumeSource)(nil), PortworxVolume:(*core.PortworxVolumeSource)(nil), ScaleIO:(*core.ScaleIOVolumeSource)(nil), StorageOS:(*core.StorageOSVolumeSource)(nil)}}}, InitContainers:[]core.Co
ntainer(nil), Containers:[]core.Container{core.Container{Name:"hyperkube", Image:"quay.io/coreos/hyperkube:v1.7.6_coreos.0", Command:[]string{"/bin/bash", "/tmp/mixer/run.sh", "/tmp/mixer/custom
-resources.yaml"}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar(nil), Resources:core.ResourceRequirements{Limits:core.
ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount{core.VolumeMount{Name:"tmp-configmap-mixer", ReadOnly:false, MountPath:"/tmp/mixer", SubPath:"", MountPropaga
tion:(*core.MountPropagationMode)(nil)}}, VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), Terminati
onMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, Re
startPolicy:"OnFailure", TerminationGracePeriodSeconds:(*int64)(0xc42f069080), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountN
ame:"istio-mixer-post-install-account", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc440dc3a40), ImagePullSecrets:[]core.LocalObjectRefer
ence(nil), Hostname:"", Subdomain:"", Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:
"", Priority:(*int32)(nil), DNSConfig:(*core.PodDNSConfig)(nil)}}: field is immutable 

Creating a new version of the job fixes the issue. However, the 0.8 istio-mixer-post-install job is still left around and needs to be manually cleaned up.

Copy link
Copy Markdown
Member

@sdake sdake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Nice fast work @ayj!

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ayj, sdake

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 13, 2018

Codecov Report

Merging #7087 into release-1.0 will increase coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           release-1.0   #7087   +/-   ##
===========================================
+ Coverage           72%     72%   +1%     
===========================================
  Files              355     355           
  Lines            30346   30307   -39     
===========================================
+ Hits             21726   21728    +2     
+ Misses            7710    7668   -42     
- Partials           910     911    +1
Impacted Files Coverage Δ
pilot/pkg/config/memory/monitor.go 82% <0%> (-9%) ⬇️
...r/adapter/stackdriver/contextgraph/contextgraph.go 83% <0%> (-3%) ⬇️
pilot/pkg/serviceregistry/kube/controller.go 66% <0%> (-2%) ⬇️
mixer/adapter/prometheus/server.go 95% <0%> (-1%) ⬇️
mixer/adapter/statsd/statsd.go 96% <0%> (-1%) ⬇️
mixer/adapter/cloudwatch/handler.go 87% <0%> (ø) ⬇️
pkg/util/webhookclient.go 0% <0%> (ø) ⬆️
mixer/pkg/protobuf/yaml/pool.go 100% <0%> (ø) ⬆️
mixer/adapter/denier/denier.go 100% <0%> (ø) ⬆️
mixer/adapter/list/ipList.go 100% <0%> (ø) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b5b990...02f12fe. Read the comment docs.

@ayj ayj closed this Jul 13, 2018
@ayj ayj deleted the release-1.0-mixer-post-install-upgrade-issue branch July 13, 2018 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants