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

for dividing scheduling, manifest changes should not directly trigger the updates of base objects #775

Open
dixudx opened this issue Dec 13, 2023 · 1 comment
Labels
kind/bug Something isn't working
Milestone

Comments

@dixudx
Copy link
Member

dixudx commented Dec 13, 2023

What happened:

func (deployer *Deployer) handleManifest(manifestCopy *appsapi.Manifest) error {
klog.V(5).Infof("handle Manifest %s", klog.KObj(manifestCopy))
if manifestCopy.DeletionTimestamp != nil {
if err := deployer.protectManifestFeed(manifestCopy); err != nil {
return err
}
// remove finalizers
manifestCopy.Finalizers = utils.RemoveString(manifestCopy.Finalizers, known.AppFinalizer)
manifestCopy.Finalizers = utils.RemoveString(manifestCopy.Finalizers, known.FeedProtectionFinalizer)
_, err := deployer.clusternetClient.AppsV1alpha1().Manifests(manifestCopy.Namespace).Update(context.TODO(), manifestCopy, metav1.UpdateOptions{})
if err != nil {
if apierrors.IsNotFound(err) {
return nil
}
klog.WarningDepth(4,
fmt.Sprintf("failed to remove finalizers from Manifest %s: %v", klog.KObj(manifestCopy), err))
}
return err
}
// find all referred Base UIDs
var baseUIDs []string
for key, val := range manifestCopy.Labels {
if val == baseKind.Kind {
baseUIDs = append(baseUIDs, key)
}
}
return deployer.resyncBase(baseUIDs...)
}

What you expected to happen:

Only for Replication scheduling strategy, we could directly trigger the updates of base objects.
For Dividing scheduling strategy, we can only update/trigger base objects after the scheduling finishes. xref #688 and #772

It seems resyncBase are only invoked by the updates of manifests and helmcharts. Maybe we could add a check on subscription scheduling strategy inside func resyncBase.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Clusternet version:
    • Clusternet-agent version (user clusternet-agent --version=json):
    • Clusternet-hub version (user clusternet-hub --version=json):
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:
@dixudx dixudx added the kind/bug Something isn't working label Dec 13, 2023
@dixudx dixudx added this to the v0.17.0 milestone Dec 13, 2023
@dixudx
Copy link
Member Author

dixudx commented Dec 13, 2023

@abstractmj will work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant