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

GitAuto: [网络]SpiderPool当子网不对等,创建应用时,需要给workload手动添加节点亲和性,并且匹配子网的节点亲和的信息 #5948

Closed

Conversation

gitauto-ai[bot]
Copy link
Contributor

@gitauto-ai gitauto-ai bot commented Nov 18, 2024

Resolves #3220

为什么会出现这个bug

当子网配置不匹配时,SpiderPool在创建应用程序时未能自动为workload添加节点亲和性。这导致新创建的应用无法正确调度到与子网对应的节点上,影响应用的正常运行和资源分配。

如何复现

  1. 配置多个子网,其中某些子网之间不对应。
  2. 使用SpiderPool创建一个新的应用程序。
  3. 检查生成的workload配置,发现缺少节点亲和性设置。
  4. 观察应用程序无法调度到预期的子网节点,导致运行异常。

如何修复

在SpiderPool的应用创建流程中,添加逻辑以自动检测子网配置的匹配情况。当发现子网不对应时,自动为workload附加相应的节点亲和性规则。这包括:

  1. 检测子网对应关系:在应用创建时,检查所选子网与集群中节点的子网配置是否匹配。
  2. 生成节点亲和性规则:根据匹配的子网信息,生成适当的节点亲和性配置。
  3. 应用到workload:将生成的节点亲和性规则添加到workload的定义中,确保调度器能够将应用程序正确分配到匹配的节点上。

通过以上修改,SpiderPool将在创建应用时自动处理节点亲和性,避免手动添加,提升用户体验并确保应用的正常调度。

Test these changes locally

git checkout -b gitauto/issue-3220-e430cf98-c22b-4d5c-968e-fde87c874c2a
git pull origin gitauto/issue-3220-e430cf98-c22b-4d5c-968e-fde87c874c2a

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for daocloud-docs ready!

Name Link
🔨 Latest commit 1c09169
🔍 Latest deploy log https://app.netlify.com/sites/daocloud-docs/deploys/673a8c9595a0860008b60aa6
😎 Deploy Preview https://deploy-preview-5948--daocloud-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the size/XS A PR that changes 0-9 lines label Nov 18, 2024
@windsonsea windsonsea removed the network network of DCE label Nov 18, 2024
@windsonsea
Copy link
Member

not sure correct or not

@windsonsea windsonsea closed this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en English docs i18n translation issues about english size/XS A PR that changes 0-9 lines
Projects
None yet
1 participant