karmada icon indicating copy to clipboard operation
karmada copied to clipboard

karmada did not reconciling ResourceBinding for deploy

Open ArenaSu opened this issue 3 years ago • 2 comments
trafficstars

What happened: karmada did not handle resource and looks like stuck.

What you expected to happen: Deployment created successfully in cluster1 and cluster2.

How to reproduce it (as minimally and precisely as possible): Operator controller create deploy and pp.

Anything else we need to know?: It's ok befor and it was encountered occasionally.

Environment:

  • Karmada version: v1.2.1
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:

Deployment config:

# kk get deploy -n su-test nginx -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: "2022-08-15T11:37:16Z"
  generation: 1
  labels:
    app: nginx
    kubearena.io/app: test-app
    kubearena.io/render-hash: 1c1d938738a76ffc
    propagationpolicy.karmada.io/name: test-app
    propagationpolicy.karmada.io/namespace: su-test
  name: nginx
  namespace: su-test
  resourceVersion: "1571379"
  uid: 92336747-0c27-46d6-9e50-e5b31be8519b
spec:
  progressDeadlineSeconds: 600
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: nginx
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx
        imagePullPolicy: Always
        name: nginx
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status: {}

PropagationPolicy config:

# kk get pp -n su-test test-app -o yaml
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  creationTimestamp: "2022-08-15T11:37:16Z"
  generation: 1
  labels:
    kubearena.io/app: test-app
    kubearena.io/render-hash: ee2b9200ae82d023
  name: test-app
  namespace: su-test
  resourceVersion: "1571377"
  uid: c81ab9ed-aade-49c0-ab0e-a41ab08f7b51
spec:
  placement:
    clusterAffinity:
      clusterNames:
      - cluster1
      - cluster2
    replicaScheduling:
      replicaDivisionPreference: Weighted
      replicaSchedulingType: Divided
      weightPreference:
        staticWeightList:
        - targetCluster:
            clusterNames:
            - cluster1
          weight: 1
        - targetCluster:
            clusterNames:
            - cluster2
          weight: 1
  resourceSelectors:
  - apiVersion: apps/v1
    kind: Deployment
    name: nginx
    namespace: su-test

ArenaSu avatar Aug 15 '22 12:08 ArenaSu

karmada controller log filter with nginx :

I0815 11:37:17.014583       1 execution_controller.go:53] Reconciling Work karmada-es-cluster2/nginx-7fc4ff4475
I0815 11:37:17.014861       1 service_export_controller.go:66] Reconciling Work karmada-es-cluster2/nginx-7fc4ff4475
I0815 11:37:17.014875       1 workstatus_controller.go:61] Reconciling status of Work karmada-es-cluster2/nginx-7fc4ff4475.
I0815 11:37:17.015712       1 interpreter.go:89] Begin to get replicas for request object: apps/v1, Kind=Deployment su-test/nginx.
I0815 11:37:17.020561       1 objectwatcher.go:196] Deleted resource(kind=Deployment, su-test/nginx) on cluster: cluster2
I0815 11:37:17.026656       1 detector.go:489] Update ResourceBinding(su-test/nginx-deployment) successfully.
I0815 11:37:17.026756       1 detector.go:210] Reconciling object: apps/v1, kind=Deployment, su-test/nginx
I0815 11:37:17.026856       1 detector.go:362] attempts to match policy for resource(apps/v1, kind=Deployment, su-test/nginx)
I0815 11:37:17.027085       1 detector.go:394] Matched policy(su-test/test-app) for resource(apps/v1, kind=Deployment, su-test/nginx)
I0815 11:37:17.027101       1 detector.go:438] Applying policy(su-testtest-app) for object: apps/v1, kind=Deployment, su-test/nginx
I0815 11:37:17.027155       1 interpreter.go:89] Begin to get replicas for request object: apps/v1, Kind=Deployment su-test/nginx.
I0815 11:37:17.027847       1 detector.go:491] ResourceBinding(su-test/nginx-deployment) is up to date.
I0815 11:37:17.043972       1 workstatus_controller.go:61] Reconciling status of Work karmada-es-cluster1/nginx-7fc4ff4475.
I0815 11:37:17.043992       1 service_export_controller.go:66] Reconciling Work karmada-es-cluster1/nginx-7fc4ff4475
I0815 11:37:17.044100       1 execution_controller.go:53] Reconciling Work karmada-es-cluster1/nginx-7fc4ff4475
I0815 11:37:17.067534       1 objectwatcher.go:196] Deleted resource(kind=Deployment, su-test/nginx) on cluster: cluster1
I0815 11:37:17.088746       1 binding_controller.go:59] Reconciling ResourceBinding su-test/nginx-deployment.
I0815 11:37:17.088818       1 binding_controller.go:72] Begin to delete works owned by binding(su-test/nginx-deployment).
I0815 11:37:17.101929       1 execution_controller.go:53] Reconciling Work karmada-es-cluster1/nginx-7fc4ff4475
I0815 11:37:17.102001       1 workstatus_controller.go:61] Reconciling status of Work karmada-es-cluster1/nginx-7fc4ff4475.
I0815 11:37:17.102103       1 workstatus_controller.go:61] Reconciling status of Work karmada-es-cluster2/nginx-7fc4ff4475.
I0815 11:37:17.102170       1 execution_controller.go:53] Reconciling Work karmada-es-cluster2/nginx-7fc4ff4475
I0815 11:37:17.114689       1 binding_controller.go:59] Reconciling ResourceBinding su-test/nginx-deployment.

ArenaSu avatar Aug 15 '22 12:08 ArenaSu

Looking forward to more information to help locate.

XiShanYongYe-Chang avatar Aug 22 '22 11:08 XiShanYongYe-Chang

As a lack of activity, let's close this first, feel free to reopen it if you still need it. /close

XiShanYongYe-Chang avatar Mar 01 '24 10:03 XiShanYongYe-Chang

@XiShanYongYe-Chang: Closing this issue.

In response to this:

As a lack of activity, let's close this first, feel free to reopen it if you still need it. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

karmada-bot avatar Mar 01 '24 10:03 karmada-bot