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

cannot reschedule when propagationpolicy changed #1411

Closed
merryzhou opened this issue Feb 28, 2022 · 5 comments · Fixed by #1383
Closed

cannot reschedule when propagationpolicy changed #1411

merryzhou opened this issue Feb 28, 2022 · 5 comments · Fixed by #1383
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@merryzhou
Copy link

merryzhou commented Feb 28, 2022

What happened:

  1. two clusters: member1 and member2, both in ready status
  2. a deployment with 2 replicas, and the propagationpolicy spec is:
spec:
  placement:
    clusterAffinity:
      clusterNames:
      - member1
    replicaScheduling:
      replicaDivisionPreference: Weighted
      replicaSchedulingType: Divided
      weightPreference:
        dynamicWeight: AvailableReplicas
  1. wait pods of deployment deployed to member1. then update propagationpolicy to:
spec:
  placement:
    clusterAffinity:
      clusterNames:
      - member2                               # this line changed
    replicaScheduling:
      replicaDivisionPreference: Weighted
      replicaSchedulingType: Divided
      weightPreference:
        dynamicWeight: AvailableReplicas

i hope the deployment can be moved to member2 cluster, but nothing happend.
i think the problem may be here: https://github.com/karmada-io/karmada/blob/master/pkg/scheduler/core/division_algorithm.go#L36

Accoding to this logic, in the above case, assignedReplicas == spec.Replicas ==> the target clusters not changed ==> no need to reschedule

Environment:

  • Karmada version: v1.0.1
  • kubectl-karmada or karmadactl version (the result of kubectl-karmada version or karmadactl version):
  • Others:
@merryzhou merryzhou added the kind/bug Categorizes issue or PR as related to a bug. label Feb 28, 2022
@dddddai
Copy link
Member

dddddai commented Feb 28, 2022

I've just tested it

/assign

@RainbowMango
Copy link
Member

@Garrybest @huone1

@huone1
Copy link
Contributor

huone1 commented Mar 1, 2022

it is resolved in PR #1383

@dddddai dddddai removed their assignment Mar 1, 2022
@dddddai
Copy link
Member

dddddai commented Mar 1, 2022

Yeah I just took a look at #1383 and it should work

@RainbowMango
Copy link
Member

/assign @huone1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants