portainer/portainer · error

an error occurred during the CombineServicesWithApplications

Error message

an error occurred during the CombineServicesWithApplications operation, unable to convert pod to application. Error: %w

What it means

Error "an error occurred during the CombineServicesWithApplications operation, unable to convert pod to application. Error: %w" thrown in portainer/portainer.

Source

Thrown at api/kubernetes/cli/volumes.go:286

	return kcl.updateVolumesWithOwningApplications(volumes, pods, deploymentItems, replicaSetItems, statefulSetItems, daemonSetItems)
}

// updateVolumesWithOwningApplications updates the volumes with the applications that use them.
func (kcl *KubeClient) updateVolumesWithOwningApplications(volumes *[]models.K8sVolumeInfo, pods *corev1.PodList, deploymentItems []appsv1.Deployment, replicaSetItems []appsv1.ReplicaSet, statefulSetItems []appsv1.StatefulSet, daemonSetItems []appsv1.DaemonSet) (*[]models.K8sVolumeInfo, error) {
	for i, volume := range *volumes {
		for _, pod := range pods.Items {
			if pod.Spec.Volumes != nil {
				for _, podVolume := range pod.Spec.Volumes {
					if podVolume.PersistentVolumeClaim != nil && podVolume.PersistentVolumeClaim.ClaimName == volume.PersistentVolumeClaim.Name && pod.Namespace == volume.PersistentVolumeClaim.Namespace {
						application, err := kcl.ConvertPodToApplication(pod, PortainerApplicationResources{
							ReplicaSets:  replicaSetItems,
							Deployments:  deploymentItems,
							StatefulSets: statefulSetItems,
							DaemonSets:   daemonSetItems,
						}, false)
						if err != nil {
							log.Error().Err(err).Msg("Failed to convert pod to application")
							return nil, fmt.Errorf("an error occurred during the CombineServicesWithApplications operation, unable to convert pod to application. Error: %w", err)
						}
						// Check if the application already exists in the OwningApplications slice
						exists := false
						for _, existingApp := range (*volumes)[i].PersistentVolumeClaim.OwningApplications {
							if existingApp.Name == application.Name && existingApp.Namespace == application.Namespace {
								exists = true
								break
							}
						}
						if !exists && application != nil {
							(*volumes)[i].PersistentVolumeClaim.OwningApplications = append((*volumes)[i].PersistentVolumeClaim.OwningApplications, *application)
						}
					}
				}
			}
		}
	}
	return volumes, nil

View on GitHub (pinned to 17e74456ff)

When it happens

Trigger: Thrown at api/kubernetes/cli/volumes.go:286 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26). Data as JSON: /api/errors/3445ad004286b054. Report an issue: GitHub.