Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> when pixie is enabled with nri-bundle #1112

Closed
jvadera opened this issue Jun 22, 2023 · 6 comments · May be fixed by #1273
Labels
bug Categorizes issue or PR as related to a bug. triage/pending Issue or PR is pending for triage and prioritization.

Comments

@jvadera
Copy link

jvadera commented Jun 22, 2023

Bug description

Unable to upgrade or downgrade the k8s integration to (latest version, modification in values.yaml) when pixie is installed with nri-bundle helm chart

Version of Helm and Kubernetes

Helm chart version: 5.0.20

Which chart?

Newrelic-bundle

TEST SUITE: None

`jvadera@C02FF1PJML7H terraform-project % helm ls -A

NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
newrelic-bundle newrelic 1 2023-06-22 15:46:00.869023 +0100 IST deployed nri-bundle-5.0.20
`
What happened?

Getting below error

jvadera@C02FF1PJML7H terraform-project % helm upgrade newrelic-bundle -n newrelic -f val.yaml newrelic/nri-bundle --version 5.0.7 Error: UPGRADE FAILED: cannot patch "newrelic-bundle-newrelic-pixie" with kind Job: Job.batch "newrelic-bundle-newrelic-pixie" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app.kubernetes.io/name":"newrelic-pixie", "controller-uid":"af4799d6-12e9-4671-837b-cbb59b86f92c", "job-name":"newrelic-bundle-newrelic-pixie", "release":"newrelic-bundle"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume(nil), InitContainers:[]core.Container{core.Container{Name:"cluster-registration-wait", Image:"gcr.io/pixie-oss/pixie-dev-public/curl:1.0", Command:[]string{"sh", "-c", "set -x; URL=\"https://${SERVICE_NAME}:${SERVICE_PORT}/readyz\"; until [ $(curl -m 0.5 -s -o /dev/null -w \"%!{(MISSING)http_code}\" -k ${URL}) -eq 200 ]; do echo \"Waiting for cluster registration. If this takes too long check the vizier-cloud-connector logs.\" sleep 2; done; "}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar{core.EnvVar{Name:"SERVICE_NAME", Value:"vizier-cloud-connector-svc", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"SERVICE_PORT", Value:"50800", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil)}, VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, Containers:[]core.Container{core.Container{Name:"newrelic-pixie", Image:"newrelic/newrelic-pixie-integration:2.0.5", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar{core.EnvVar{Name:"CLUSTER_NAME", Value:"new", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"NR_LICENSE_KEY", Value:"", ValueFrom:(*core.EnvVarSource)(0xc012488b40)}, core.EnvVar{Name:"PIXIE_API_KEY", Value:"", ValueFrom:(*core.EnvVarSource)(0xc012488b60)}, core.EnvVar{Name:"PIXIE_CLUSTER_ID", Value:"", ValueFrom:(*core.EnvVarSource)(0xc012488b80)}, core.EnvVar{Name:"COLLECT_INTERVAL_SEC", Value:"15", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"HTTP_SPAN_LIMIT", Value:"750", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"DB_SPAN_LIMIT", Value:"250", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList{"memory":resource.Quantity{i:resource.int64Amount{value:250, scale:6}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"250M", Format:"DecimalSI"}}, Requests:core.ResourceList{"cpu":resource.Quantity{i:resource.int64Amount{value:100, scale:-3}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"100m", Format:"DecimalSI"}, "memory":resource.Quantity{i:resource.int64Amount{value:250, scale:6}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"250M", Format:"DecimalSI"}}}, VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, EphemeralContainers:[]core.EphemeralContainer(nil), RestartPolicy:"Never", TerminationGracePeriodSeconds:(*int64)(0xc0136b3e38), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc006ca1700), ImagePullSecrets:[]core.LocalObjectReference(nil), Hostname:"", Subdomain:"", SetHostnameAsFQDN:(*bool)(nil), Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil), PreemptionPolicy:(*core.PreemptionPolicy)(nil), DNSConfig:(*core.PodDNSConfig)(nil), ReadinessGates:[]core.PodReadinessGate(nil), RuntimeClassName:(*string)(nil), Overhead:core.ResourceList(nil), EnableServiceLinks:(*bool)(nil), TopologySpreadConstraints:[]core.TopologySpreadConstraint(nil), OS:(*core.PodOS)(nil)}}: field is immutable

What you expected to happen?
There should be some backward compatibility when there was an upgrade(We are unable to upgrade the agent to the latest version or downgrade with helm) it gives above error of mutating object
uninstalling and reinstalling the complete integration is not a good practice all the times, multiple customers have reported this issue

How to reproduce it?

Step 1 Install the latest integration or install the helm chart with version 5.0.7

Step 2: Make a downgrade/upgrade with helm command and it will give above error

@jvadera jvadera added bug Categorizes issue or PR as related to a bug. triage/pending Issue or PR is pending for triage and prioritization. labels Jun 22, 2023
@workato-integration
Copy link

@jvadera jvadera changed the title [name of the chart] <issue title> [Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> Jun 22, 2023
@jvadera jvadera changed the title [Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> [Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> when pixie is enabled with nri-bundle Jun 22, 2023
@workato-integration workato-integration bot changed the title [Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> when pixie is enabled with nri-bundle [Newrelic-bundle] <unable to upgrade or downgrade helm chart version getting field is immutable> when pixie is enabled with nri-bundle Jun 22, 2023
@vanvanis
Copy link

vanvanis commented Jun 23, 2023

We have started getting the below exceptions during the Rebuild of NewRElic Helm Chart inside our EKS Cluster in PROD environment:-

2023/06/23 01:22:43 executing task helminstallexternal...
2023/06/23 01:22:43 helm repo add newrelic https://helm-charts.newrelic.com && helm repo update
2023/06/23 01:22:44 helm upgrade esg-newrelic newrelic/nri-bundle --install --atomic --wait --wait-for-jobs --history-max 5 --timeout 20m -f /codebuild/output/src2249/src/s3/00/.helm/eks/prod/newrelic.yaml -n newrelic
2023/06/23 01:23:02 "newrelic" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "gatekeeper" chart repository
...Successfully got an update from the "splunk" chart repository
...Successfully got an update from the "newrelic" chart repository
...Successfully got an update from the "external-secrets" chart repository
...Successfully got an update from the "projectcalico" chart repository
Update Complete. ⎈Happy Helming!⎈

Error: UPGRADE FAILED: an error occurred while rolling back the release. original upgrade error: cannot patch "esg-newrelic-newrelic-pixie" with kind Job: Job.batch "esg-newrelic-newrelic-pixie" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app.kubernetes.io/name":"newrelic-pixie", "controller-uid":"d683a034-8d67-4cd9-95bd-5d61cb574ce6", "job-name":"esg-newrelic-newrelic-pixie", "release":"esg-newrelic"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume(nil), InitContainers:[]core.Container{core.Container{Name:"cluster-registration-wait", Image:"gcr.io/pixie-oss/pixie-dev-public/curl:1.0", Command:[]string{"sh", "-c", "set -x; URL="https://${SERVICE_NAME}:${SERVICE_PORT}/readyz"; until [ $(curl -m 0.5 -s -o /dev/null -w "%!{(MISSING)http_code}" -k ${URL}) -eq 200 ]; do echo "Waiting for cluster registration. If this takes too long check the vizier-cloud-connector logs." sleep 2; done; "}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar{core.EnvVar{Name:"SERVICE_NAME", Value:"vizier-cloud-connector-svc", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"SERVICE_PORT", Value:"50800", ValueFrom:(*core.EnvVarSource)(nil)}},

Please advise the Fix for the same.

@DemonICOLI
Copy link

DemonICOLI commented Jun 23, 2023

I can confirm that this error is also present on my deployment with helm

Error: UPGRADE FAILED: release newrelic-bundle failed, and has been rolled back due to atomic being set: cannot patch "newrelic-bundle-newrelic-pixie" with kind Job: Job.batch "newrelic-bundle-newrelic-pixie" is invalid: spec.template: Invalid value: core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"app.kubernetes.io/name":"newrelic-pixie", "batch.kubernetes.io/controller-uid":"806b2d5e-4e5e-4a06-a2f5-277a2bc4ddc9", "batch.kubernetes.io/job-name":"newrelic-bundle-newrelic-pixie", "controller-uid":"806b2d5e-4e5e-4a06-a2f5-277a2bc4ddc9", "job-name":"newrelic-bundle-newrelic-pixie", "release":"newrelic-bundle"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:core.PodSpec{Volumes:[]core.Volume(nil), InitContainers:[]core.Container{core.Container{Name:"cluster-registration-wait", Image:"gcr.io/pixie-oss/pixie-dev-public/curl:1.0", Command:[]string{"sh", "-c", "set -x; URL=\"https://${SERVICE_NAME}:${SERVICE_PORT}/readyz\"; until [ $(curl -m 0.5 -s -o /dev/null -w \"%!{(MISSING)http_code}\" -k ${URL}) -eq 200 ]; do echo \"Waiting for cluster registration. If this takes too long check the vizier-cloud-connector logs.\" sleep 2; done; "}, Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar{core.EnvVar{Name:"SERVICE_NAME", Value:"vizier-cloud-connector-svc", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"SERVICE_PORT", Value:"50800", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList(nil), Claims:[]core.ResourceClaim(nil)}, ResizePolicy:[]core.ContainerResizePolicy(nil), VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, Containers:[]core.Container{core.Container{Name:"newrelic-pixie", Image:"newrelic/newrelic-pixie-integration:2.1.4", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]core.ContainerPort(nil), EnvFrom:[]core.EnvFromSource(nil), Env:[]core.EnvVar{core.EnvVar{Name:"CLUSTER_NAME", Value:"fl-satellite-dev", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"NR_LICENSE_KEY", Value:"", ValueFrom:(*core.EnvVarSource)(0xc01aa82800)}, core.EnvVar{Name:"PIXIE_API_KEY", Value:"", ValueFrom:(*core.EnvVarSource)(0xc01aa82820)}, core.EnvVar{Name:"PIXIE_CLUSTER_ID", Value:"", ValueFrom:(*core.EnvVarSource)(0xc01aa82840)}, core.EnvVar{Name:"COLLECT_INTERVAL_SEC", Value:"15", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"HTTP_SPAN_LIMIT", Value:"750", ValueFrom:(*core.EnvVarSource)(nil)}, core.EnvVar{Name:"DB_SPAN_LIMIT", Value:"250", ValueFrom:(*core.EnvVarSource)(nil)}}, Resources:core.ResourceRequirements{Limits:core.ResourceList{"memory":resource.Quantity{i:resource.int64Amount{value:250, scale:6}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"250M", Format:"DecimalSI"}}, Requests:core.ResourceList{"cpu":resource.Quantity{i:resource.int64Amount{value:100, scale:-3}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"100m", Format:"DecimalSI"}, "memory":resource.Quantity{i:resource.int64Amount{value:250, scale:6}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"250M", Format:"DecimalSI"}}, Claims:[]core.ResourceClaim(nil)}, ResizePolicy:[]core.ContainerResizePolicy(nil), VolumeMounts:[]core.VolumeMount(nil), VolumeDevices:[]core.VolumeDevice(nil), LivenessProbe:(*core.Probe)(nil), ReadinessProbe:(*core.Probe)(nil), StartupProbe:(*core.Probe)(nil), Lifecycle:(*core.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*core.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, EphemeralContainers:[]core.EphemeralContainer(nil), RestartPolicy:"Never", TerminationGracePeriodSeconds:(*int64)(0xc0133f8858), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*core.PodSecurityContext)(0xc018ff1e60), ImagePullSecrets:[]core.LocalObjectReference(nil), Hostname:"", Subdomain:"", SetHostnameAsFQDN:(*bool)(nil), Affinity:(*core.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]core.Toleration(nil), HostAliases:[]core.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil), PreemptionPolicy:(*core.PreemptionPolicy)(nil), DNSConfig:(*core.PodDNSConfig)(nil), ReadinessGates:[]core.PodReadinessGate(nil), RuntimeClassName:(*string)(nil), Overhead:core.ResourceList(nil), EnableServiceLinks:(*bool)(nil), TopologySpreadConstraints:[]core.TopologySpreadConstraint(nil), OS:(*core.PodOS)(nil), SchedulingGates:[]core.PodSchedulingGate(nil), ResourceClaims:[]core.PodResourceClaim(nil)}}: field is immutable

@isaacadeleke-nr
Copy link

Hey @jvadera would you mind sharing your values.yaml file (with secrets expunged of course). I am trying to reproduce the error, but haven't been successful in doing so yet.

Also is this understanding correct: you are trying to upgrade from chart version 5.0.7 to 5.0.20 ?

@davidgit
Copy link
Contributor

davidgit commented Aug 3, 2023

Hi ,

I would suggest to visit New Relic Support, where you can engage the New Relic Support Community or open a support ticket depending on your support level. The support team is best positioned to assist with your specific needs.

Please provide a link to this GitHub issue when submitting your community post or support ticket.

Thanks!

@davidgit davidgit closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
@techdragon
Copy link

@davidgit this is an issue with the helm chart? Why would we want to engage the support community or open a ticket instead of tracking the issue here? Can this please be reopened as I also have this same error. So that's 4 separate corroborating people having the exact same issue with the pixie enabled chart.

techdragon added a commit to techdragon/helm-charts that referenced this issue Feb 8, 2024
This should resolve the closed and unresolved newrelic#1112 which I have an open support case with New Relic about.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug. triage/pending Issue or PR is pending for triage and prioritization.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants