karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.12k stars 807 forks source link

the crd kservice cannot sync #4823

Closed wangxf1987 closed 2 weeks ago

wangxf1987 commented 3 weeks ago

What do you think about this question?:

sh-4.2# kubectl --kubeconfig subcluster/kubeconfig get kservice  -n andy andy-benchmarkdtest164-hk99n7
NAME                            CLUSTER   MODE         EXPECTMODE   SERVERLESSENABLE   VERSION   GENERATION   OBSERVEDGENERATION   PHASE   DESIRED   ALL   READY   AVAILABLE   UNAVAILABLE   AGE
andy-benchmarkdtest164-hk99n7   xx03      Serverless   Serverless   true               1         4            4                    Ready   2         2     2                                 2d7h
sh-4.2# kubectl  get kservice  -n andy andy-benchmarkdtest164-hk99n7
NAME                            CLUSTER   MODE         EXPECTMODE   SERVERLESSENABLE   VERSION   GENERATION   OBSERVEDGENERATION   PHASE         DESIRED   ALL   READY   AVAILABLE   UNAVAILABLE   AGE
andy-benchmarkdtest164-hk99n7   xx03      Serverless   Serverless   true               1         5            4                    AutoScaling   2         2     2       0           0             2d7h

my resource interpertertation of lua as below:

apiVersion: config.karmada.io/v1alpha1
kind: ResourceInterpreterCustomization
metadata:
  name: declarative-configuration-kservice
spec:
  target:
    apiVersion: fed.jd.com/v1
    kind: KService
  customizations:
    replicaResource:
      luaScript: >
        local kube = require("kube")
        function GetReplicas(obj)
          replica = obj.spec.replicas
          requirement = kube.accuratePodRequirements(obj.spec.template)
          return replica, requirement
        end
    replicaRevision:
      luaScript: >
        function ReviseReplica(obj, desiredReplica)
          obj.spec.replicas = desiredReplica
          return obj
        end
    statusAggregation:
      luaScript: >
        function AggregateStatus(desiredObj, statusItems)
          if statusItems == nil then
            return desiredObj
          end
          if desiredObj.status == nil then
            desiredObj.status = {}
          end
          if desiredObj.status.revisions == nil then
            desiredObj.status.revisions = {}
          end
          if desiredObj.status.mode == '' then
            desiredObj.status.mode = ''
          end
          if desiredObj.status.phase == '' then
            desiredObj.status.phase = ''
          end
          if desiredObj.status.conditions == nil then
            desiredObj.status.conditions = {}
          end
          if desiredObj.status.annotations == nil then
            desiredObj.status.annotations = {}
          end
          if desiredObj.status.replicas == nil then
            desiredObj.status.replicas = {}
          end

          desiredObj.status.serverlessEnable = false

          if desiredObj.status.autoScale == nil then
            desiredObj.status.autoScale = {}
          end
          if desiredObj.status.autoScale.replicasBeforeScale == nil then
            desiredObj.status.autoScale.replicasBeforeScale = {}
          end
          if desiredObj.status.autoScale.replicasAfterScale == nil then
            desiredObj.status.autoScale.replicasAfterScale = {}
          end

          observedGeneration = 0
          conditions = {}
          annotations = {}

          phase = ''

          revision = ''
          strategyRevision = ''
          templateRevision = ''
          scaleStrategyRevision = ''
          scalePolicyRevision = ''
          podLifecycleRevision = ''

          mode = ''

          allReplicas = 0
          readyReplicas = 0 
          updatedReplicas = 0
          availableReplicas = 0
          unavailableReplicas = 0

          statusServerlessEnable = false

          autoScaleVersion = 0

          beforePikaset = 0
          beforeCriuset = 0
          beforeCosset = 0
          beforeTotal = 0
          beforeAll = 0
          beforeCos = 0
          beforeOffline = 0
          beforeGCCache = 0
          beforeGCRescue = 0
          beforeGCUnmount = 0
          beforeGCStop = 0
          beforeGCDelete = 0
          beforeCosTimeout = 0
          beforeLight = 0
          beforeLightAll = 0
          beforeLightPika = 0
          beforeLightPikaAll = 0
          beforeLessmore = 0
          beforeLessmoreAll = 0

          afterPikaset = 0
          afterCriuset = 0
          afterCosset = 0
          afterTotal = 0
          afterAll = 0
          afterCos = 0
          afterOffline = 0
          afterGCCache = 0
          afterGCRescue = 0
          afterGCUnmount = 0
          afterGCStop = 0
          afterGCDelete = 0
          afterCosTimeout = 0
          afterLight = 0
          afterLightAll = 0
          afterLightPika = 0
          afterLightPikaAll = 0
          afterLessmore = 0
          afterLessmoreAll = 0

          collisionCount = 0

          for i = 1, #statusItems do
            if statusItems[i].status ~= nil and statusItems[i].status.observedGeneration ~= nil then
                observedGeneration = observedGeneration + statusItems[i].status.observedGeneration
            end
            if statusItems[i].status ~= nil and statusItems[i].status.conditions ~= nil then
              for conditionIndex = 1, #statusItems[i].status.conditions do
                conditions[conditionIndex] = {}
                conditions[conditionIndex].type = statusItems[i].status.conditions[conditionIndex].type
                conditions[conditionIndex].status = statusItems[i].status.conditions[conditionIndex].status
                if statusItems[i].status.conditions[conditionIndex].severity ~= '' then
                  conditions[conditionIndex].severity = statusItems[i].status.conditions[conditionIndex].severity
                end
                conditions[conditionIndex].lastTransitionTime = statusItems[i].status.conditions[conditionIndex].lastTransitionTime
                if statusItems[i].status.conditions[conditionIndex].reason ~= '' then
                  conditions[conditionIndex].reason = statusItems[i].status.conditions[conditionIndex].reason
                end
                if statusItems[i].status.conditions[conditionIndex].message ~= '' then
                  conditions[conditionIndex].message = statusItems[i].status.conditions[conditionIndex].message
                end
              end
            end

            if statusItems[i].status ~= nil and type(statusItems[i].status.annotations) == "table" and next(statusItems[i].status.annotations or {}) ~= nil then
              for key,value in pairs(statusItems[i].status.annotations or {}) do
                annotations[key] = value
              end
            end

            if statusItems[i].status ~= nil and statusItems[i].status.phase ~= '' then
              phase = statusItems[i].status.phase
            end

            if statusItems[i].status ~= nil and statusItems[i].status.revisions ~= nil then
              revision = statusItems[i].status.revisions.revision
              strategyRevision = statusItems[i].status.revisions.strategyRevision
              templateRevision = statusItems[i].status.revisions.templateRevision
              scaleStrategyRevision = statusItems[i].status.revisions.scaleStrategyRevision
              scalePolicyRevision = statusItems[i].status.revisions.scalePolicyRevision
              podLifecycleRevision = statusItems[i].status.revisions.podLifecycleRevision
            end

            if statusItems[i].status ~= nil and statusItems[i].status.mode ~= '' then
              mode = statusItems[i].status.mode
            end

            if statusItems[i].status ~= nil and statusItems[i].status.replicas ~= nil then
              if statusItems[i].status.replicas.all ~= nil then
                allReplicas = allReplicas + statusItems[i].status.replicas.all
              end
              if statusItems[i].status.replicas.ready ~= nil then
                readyReplicas = readyReplicas + statusItems[i].status.replicas.ready
              end
              if statusItems[i].status.replicas.updated ~= nil then
                updatedReplicas = updatedReplicas + statusItems[i].status.replicas.updated
              end
              if statusItems[i].status.replicas.available ~= nil then
                availableReplicas = availableReplicas + statusItems[i].status.replicas.available
              end
              if statusItems[i].status.replicas.unavailable ~= nil then
                unavailableReplicas = unavailableReplicas + statusItems[i].status.replicas.unavailable
              end
            end

            if statusItems[i].status ~= nil and statusItems[i].status.serverlessEnable ~= nil then
              statusServerlessEnable = statusItems[i].status.serverlessEnable
            end

            if statusItems[i].status ~= nil and statusItems[i].status.autoScale ~= nil then
              if statusItems[i].status.autoScale.version ~= nil then
                autoScaleVersion = statusItems[i].status.autoScale.version
              end
              if statusItems[i].status.autoScale.replicasBeforeScale ~= nil then
                  if statusItems[i].status.autoScale.replicasBeforeScale.pikaset ~= nil then
                    beforePikaset = beforePikaset + statusItems[i].status.autoScale.replicasBeforeScale.pikaset
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.criuset ~= nil then
                    beforeCriuset = beforeCriuset + statusItems[i].status.autoScale.replicasBeforeScale.criuset
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.cosset ~= nil then
                    beforeCosset = beforeCosset + statusItems[i].status.autoScale.replicasBeforeScale.cosset
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.total ~= nil then
                    beforeTotal = beforeTotal + statusItems[i].status.autoScale.replicasBeforeScale.total
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.all ~= nil then
                    beforeAll = beforeAll + statusItems[i].status.autoScale.replicasBeforeScale.all
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.cos ~= nil then
                    beforeCos = beforeCos + statusItems[i].status.autoScale.replicasBeforeScale.cos
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.offline ~= nil then
                    beforeOffline = beforeOffline + statusItems[i].status.autoScale.replicasBeforeScale.offline
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.cache ~= nil then
                    beforeGCCache = beforeGCCache + statusItems[i].status.autoScale.replicasBeforeScale.cache
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.rescue ~= nil then
                    beforeGCRescue = beforeGCRescue + statusItems[i].status.autoScale.replicasBeforeScale.rescue
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.unmount ~= nil then
                    beforeGCUnmount = beforeGCUnmount + statusItems[i].status.autoScale.replicasBeforeScale.unmount
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.stop ~= nil then
                    beforeGCStop = beforeGCStop + statusItems[i].status.autoScale.replicasBeforeScale.stop
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.delete ~= nil then
                    beforeGCDelete = beforeGCDelete + statusItems[i].status.autoScale.replicasBeforeScale.delete
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.timeout ~= nil then
                    beforeCosTimeout = beforeCosTimeout + statusItems[i].status.autoScale.replicasBeforeScale.timeout
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.light ~= nil then
                    beforeLight = beforeLight + statusItems[i].status.autoScale.replicasBeforeScale.light
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.lightAll ~= nil then
                    beforeLightAll = beforeLightAll + statusItems[i].status.autoScale.replicasBeforeScale.lightAll
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.lightPika ~= nil then
                    beforeLightPika = beforeLightPika + statusItems[i].status.autoScale.replicasBeforeScale.lightPika
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.lightPikaAll ~= nil then
                    beforeLightPikaAll = beforeLightPikaAll + statusItems[i].status.autoScale.replicasBeforeScale.lightPikaAll
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.lessmore ~= nil then
                    beforeLessmore = beforeLessmore + statusItems[i].status.autoScale.replicasBeforeScale.lessmore
                  end
                  if statusItems[i].status.autoScale.replicasBeforeScale.lessmoreAll ~= nil then
                    beforeLessmoreAll = beforeLessmoreAll + statusItems[i].status.autoScale.replicasBeforeScale.lessmoreAll
                  end
              end
            end

            if statusItems[i].status ~= nil and statusItems[i].status.autoScale ~= nil then
              if statusItems[i].status.autoScale.replicasAfterScale ~= nil then
                  if statusItems[i].status.autoScale.replicasAfterScale.pikaset ~= nil then
                    afterPikaset = afterPikaset + statusItems[i].status.autoScale.replicasAfterScale.pikaset
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.criuset ~= nil then
                    afterCriuset = afterCriuset + statusItems[i].status.autoScale.replicasAfterScale.criuset
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.cosset ~= nil then
                    afterCosset = afterCosset + statusItems[i].status.autoScale.replicasAfterScale.cosset
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.total ~= nil then
                    afterTotal = afterTotal + statusItems[i].status.autoScale.replicasAfterScale.total
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.all ~= nil then
                    afterAll = afterAll + statusItems[i].status.autoScale.replicasAfterScale.all
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.cos ~= nil then
                    afterCos = afterCos + statusItems[i].status.autoScale.replicasAfterScale.cos
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.offline ~= nil then
                    afterOffline = afterOffline + statusItems[i].status.autoScale.replicasAfterScale.offline
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.cache ~= nil then
                    afterGCCache = afterGCCache + statusItems[i].status.autoScale.replicasAfterScale.cache
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.rescue ~= nil then
                    afterGCRescue = afterGCRescue + statusItems[i].status.autoScale.replicasAfterScale.rescue
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.unmount ~= nil then
                    afterGCUnmount = afterGCUnmount + statusItems[i].status.autoScale.replicasAfterScale.unmount
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.stop ~= nil then
                    afterGCStop = afterGCStop + statusItems[i].status.autoScale.replicasAfterScale.stop
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.delete ~= nil then
                    afterGCDelete = afterGCDelete + statusItems[i].status.autoScale.replicasAfterScale.delete
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.timeout ~= nil then
                    afterCosTimeout = afterCosTimeout + statusItems[i].status.autoScale.replicasAfterScale.timeout
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.light ~= nil then
                    afterLight = afterLight + statusItems[i].status.autoScale.replicasAfterScale.light
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.lightAll ~= nil then
                    afterLightAll = afterLightAll + statusItems[i].status.autoScale.replicasAfterScale.lightAll
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.lightPika ~= nil then
                    afterLightPika = afterLightPika + statusItems[i].status.autoScale.replicasAfterScale.lightPika
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.lightPikaAll ~= nil then
                    afterLightPikaAll = afterLightPikaAll + statusItems[i].status.autoScale.replicasAfterScale.lightPikaAll
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.lessmore ~= nil then
                    afterLessmore = afterLessmore + statusItems[i].status.autoScale.replicasAfterScale.lessmore
                  end
                  if statusItems[i].status.autoScale.replicasAfterScale.lessmoreAll ~= nil then
                    afterLessmoreAll = afterLessmoreAll + statusItems[i].status.autoScale.replicasAfterScale.lessmoreAll
                  end
              end
            end

            if statusItems[i].status ~= nil and statusItems[i].status.collisionCount ~= nil then
              collisionCount = collisionCount + statusItems[i].status.collisionCount
            end
          end

          desiredObj.status.observedGeneration = observedGeneration
          desiredObj.status.conditions = conditions
          desiredObj.status.annotations = annotations

          desiredObj.status.phase = phase

          desiredObj.status.revisions.revision = revision
          desiredObj.status.revisions.strategyRevision = strategyRevision
          desiredObj.status.revisions.templateRevision = templateRevision
          desiredObj.status.revisions.scaleStrategyRevision = scaleStrategyRevision
          desiredObj.status.revisions.scalePolicyRevision = scalePolicyRevision
          desiredObj.status.revisions.podLifecycleRevision = podLifecycleRevision

          desiredObj.status.mode = mode

          desiredObj.status.replicas.all = allReplicas
          desiredObj.status.replicas.ready = readyReplicas
          desiredObj.status.replicas.updated = updatedReplicas
          desiredObj.status.replicas.available = availableReplicas
          desiredObj.status.replicas.unavailable = unavailableReplicas

          desiredObj.status.serverlessEnable = statusServerlessEnable

          desiredObj.status.autoScale.version = autoScaleVersion

          desiredObj.status.autoScale.replicasBeforeScale.pikaset = beforePikaset
          desiredObj.status.autoScale.replicasBeforeScale.criuset = beforeCriuset
          desiredObj.status.autoScale.replicasBeforeScale.cosset = beforeCosset
          desiredObj.status.autoScale.replicasBeforeScale.total = beforeTotal
          desiredObj.status.autoScale.replicasBeforeScale.all = beforeAll
          desiredObj.status.autoScale.replicasBeforeScale.cos = beforeCos
          desiredObj.status.autoScale.replicasBeforeScale.offline = beforeOffline
          desiredObj.status.autoScale.replicasBeforeScale.cache = beforeGCCache
          desiredObj.status.autoScale.replicasBeforeScale.rescue = beforeGCRescue
          desiredObj.status.autoScale.replicasBeforeScale.unmount = beforeGCUnmount
          desiredObj.status.autoScale.replicasBeforeScale.stop = beforeGCStop
          desiredObj.status.autoScale.replicasBeforeScale.delete = beforeGCDelete
          desiredObj.status.autoScale.replicasBeforeScale.timeout = beforeCosTimeout
          desiredObj.status.autoScale.replicasBeforeScale.light = beforeLight
          desiredObj.status.autoScale.replicasBeforeScale.lightAll = beforeLightAll
          desiredObj.status.autoScale.replicasBeforeScale.lightPika = beforeLightPika
          desiredObj.status.autoScale.replicasBeforeScale.lightPikaAll = beforeLightPikaAll
          desiredObj.status.autoScale.replicasBeforeScale.lessmore = beforeLessmore
          desiredObj.status.autoScale.replicasBeforeScale.lessmoreAll = beforeLessmoreAll

          desiredObj.status.autoScale.replicasAfterScale.pikaset = afterPikaset
          desiredObj.status.autoScale.replicasAfterScale.criuset = afterCriuset
          desiredObj.status.autoScale.replicasAfterScale.cosset = afterCosset
          desiredObj.status.autoScale.replicasAfterScale.total = afterTotal
          desiredObj.status.autoScale.replicasAfterScale.all = afterAll
          desiredObj.status.autoScale.replicasAfterScale.cos = afterCos
          desiredObj.status.autoScale.replicasAfterScale.offline = afterOffline
          desiredObj.status.autoScale.replicasAfterScale.cache = afterGCCache
          desiredObj.status.autoScale.replicasAfterScale.rescue = afterGCRescue
          desiredObj.status.autoScale.replicasAfterScale.unmount = afterGCUnmount
          desiredObj.status.autoScale.replicasAfterScale.stop = afterGCStop
          desiredObj.status.autoScale.replicasAfterScale.delete = afterGCDelete
          desiredObj.status.autoScale.replicasAfterScale.timeout = afterCosTimeout
          desiredObj.status.autoScale.replicasAfterScale.light = afterLight
          desiredObj.status.autoScale.replicasAfterScale.lightAll = afterLightAll
          desiredObj.status.autoScale.replicasAfterScale.lightPika = afterLightPika
          desiredObj.status.autoScale.replicasAfterScale.lightPikaAll = afterLightPikaAll
          desiredObj.status.autoScale.replicasAfterScale.lessmore = afterLessmore
          desiredObj.status.autoScale.replicasAfterScale.lessmoreAll = afterLessmoreAll

          desiredObj.status.collisionCount = collisionCount

          return desiredObj
        end
    statusReflection:
      luaScript: >
        function ReflectStatus (observedObj)
          status = {}
          if observedObj == nil or observedObj.status == nil then
            return status
          end
          status.observedGeneration = observedObj.status.observedGeneration
          status.conditions = observedObj.status.conditions
          status.annotations = observedObj.status.annotations
          status.phase = observedObj.status.phase
          status.revisions = observedObj.status.revisions
          status.mode = observedObj.status.mode
          status.replicas = observedObj.status.replicas
          status.serverlessEnable = observedObj.status.serverlessEnable
          status.autoScale = observedObj.status.autoScale
          status.collisionCount = observedObj.status.collisionCount

          return status
        end
    healthInterpretation:
      luaScript: >
        function InterpretHealth(observedObj)
          if observedObj.status.phase ~= "Ready" then
            return false
          end
          return true
        end
    dependencyInterpretation:
      luaScript: >
        local kube = require("kube")
        function GetDependencies(desiredObj)
          refs = kube.getPodDependencies(desiredObj.spec.template, desiredObj.metadata.namespace)
          return refs
        end

Environment:

RainbowMango commented 3 weeks ago

Hi Xiaofei, let me try to format the content and cc interpreter owners @chaunceyjiang @XiShanYongYe-Chang

XiShanYongYe-Chang commented 3 weeks ago

Hi @wangxf1987 Is it the kservice CRD resource that cannot be propagated or the CRD CR resource that cannot be propagated?

Have you checked the logs of karmada-controller-manager for errors?

wangxf1987 commented 3 weeks ago

Hi @wangxf1987 Is it the kservice CRD resource that cannot be propagated or the CRD CR resource that cannot be propagated?

Have you checked the logs of karmada-controller-manager for errors?

@XiShanYongYe-Chang the prepagatation is ok, but reflect status is not sync in the resource interper. i check autoscaling in the fedcluster, it's Ready in the subcluster actuallly. I try to modify resync-period for setupController, but no effect. image I think that the sync is caused by the resource not having an UPDATE EVENT.

wangxf1987 commented 3 weeks ago

the sync is work in here: image

wangxf1987 commented 3 weeks ago

Hi @wangxf1987 Is it the kservice CRD resource that cannot be propagated or the CRD CR resource that cannot be propagated? Have you checked the logs of karmada-controller-manager for errors?

@XiShanYongYe-Chang the prepagatation is ok, but reflect status is not sync in the resource interper. i check autoscaling in the fedcluster, it's Ready in the subcluster actuallly. I try to modify resync-period for setupController, but no effect. image I think that the sync is caused by the resource not having an UPDATE EVENT.

XiShanYongYe-Chang commented 3 weeks ago

I think that the sync is caused by the resource not having an UPDATE EVENT.

The work-status-controller watch to resource changes in member clusters. Events should not be lost. If an error occurs during status collection, the status cannot be collected properly. Therefore, I want to know whether the controller logs report errors.

XiShanYongYe-Chang commented 3 weeks ago

You can use the karmadactl interpret command to test whether the ResourceInterpreterCustomization lua configuration you wrote is correct.

wangxf1987 commented 3 weeks ago

I think that the sync is caused by the resource not having an UPDATE EVENT.

The work-status-controller watch to resource changes in member clusters. Events should not be lost. If an error occurs during status collection, the status cannot be collected properly. Therefore, I want to know whether the controller logs report errors.

Please wait a moment, I will reproduce it again

wangxf1987 commented 3 weeks ago

You can use the karmadactl interpret command to test whether the ResourceInterpreterCustomization lua configuration you wrote is correct.

I run resource interperter of lua in the local, it's ok.

wangxf1987 commented 3 weeks ago

I think that the sync is caused by the resource not having an UPDATE EVENT.

The work-status-controller watch to resource changes in member clusters. Events should not be lost. If an error occurs during status collection, the status cannot be collected properly. Therefore, I want to know whether the controller logs report errors.

I found error logs

E0411 07:00:26.895109 1 controller.go:329] "Reconciler error" err="Operation cannot be fulfilled on kservices.fed.jd.com \"andy-benchmarkdtest35-xcp884\": the object has been modified; please apply your changes to the latest version and try again" controller="resourceBinding_status_controller" namespace="andy" name="andy-benchmarkdtest35-xcp884-kservice" reconcileID=8e05ab7d-e1f9-4214-8438-0d18fa44958b
E0411 07:00:26.895044 1 common.go:78] Failed to update resource(fed.jd.com/v1, Resource=kservices/andy/andy-benchmarkdtest35-xcp884), Error: Operation cannot be fulfilled on kservices.fed.jd.com "andy-benchmarkdtest35-xcp884": the object has been modified; please apply your changes to the latest version and try again
E0411 07:00:26.225524 1 controller.go:329] "Reconciler error" err="Operation cannot be fulfilled on kservices.fed.jd.com \"andy-benchmarkdtest50-gdqdcg\": the object has been modified; please apply your changes to the latest version and try again" controller="resourceBinding_status_controller" namespace="andy" name="andy-benchmarkdtest50-gdqdcg-kservice" reconcileID=a10309ac-1cb2-4663-a85e-a48d1e5fe1bf
E0411 07:00:26.225457 1 common.go:78] Failed to update resource(fed.jd.com/v1, Resource=kservices/andy/andy-benchmarkdtest50-gdqdcg), Error: Operation cannot be fulfilled on kservices.fed.jd.com "andy-benchmarkdtest50-gdqdcg": the object has been modified; please apply your changes to the latest version and try again
E0411 07:00:02.238893 1 controller.go:329] "Reconciler error" err="Operation cannot be fulfilled on kservices.fed.jd.com \"andy-benchmarkdtest48-24lfct\": the object has been modified; please apply your changes to the latest version and try again" controller="resourceBinding_status_controller" namespace="andy" name="andy-benchmarkdtest48-24lfct-kservice" reconcileID=ee878d49-07c7-40d4-b1b9-5eecf2731305

but all resources are synced, i understand that the retry.RetryOnConflict will be hander this error.

XiShanYongYe-Chang commented 3 weeks ago

This error doesn't matter. The error indicates that the resource object obtained by the update has been modified.

but all resources are synced, i understand that the retry.RetryOnConflict will be hander this error.

The process of collecting resource status is as follows:

Work status -> RB/CRB status -> resource template status

How about seeing if the status of work and binding is collected correctly.

wangxf1987 commented 2 weeks ago

This error doesn't matter. The error indicates that the resource object obtained by the update has been modified.

but all resources are synced, i understand that the retry.RetryOnConflict will be hander this error.

The process of collecting resource status is as follows:

Work status -> RB/CRB status -> resource template status

How about seeing if the status of work and binding is collected correctly.

thx for your reply, and what role does the executation controller play?

XiShanYongYe-Chang commented 2 weeks ago

thx for your reply, and what role does the executation controller play?

It parses the resource template from the work and creates it in the member cluster.

XiShanYongYe-Chang commented 2 weeks ago

Hi @wangxf1987, any progress on your problem?

wangxf1987 commented 2 weeks ago

Hi @wangxf1987, any progress on your problem?

@XiShanYongYe-Chang

wangxf1987 commented 2 weeks ago

Hi @wangxf1987, any progress on your problem?

@XiShanYongYe-Chang

no probelm about sync, I performed modified kservice all night. All normally. I use the Resync for informer. https://github.com/karmada-io/karmada/pull/4825

XiShanYongYe-Chang commented 2 weeks ago

Hi @wangxf1987 do you mean that the content described in the current issue has been resolved by modifying #4825?

wangxf1987 commented 2 weeks ago

Hi @wangxf1987 do you mean that the content described in the current issue has been resolved by modifying #4825?

it seems that at present, i will be continue to test.

XiShanYongYe-Chang commented 2 weeks ago

Hi @wangxf1987, the problem didn't recur?