forked from zstackio/zstack
-
Notifications
You must be signed in to change notification settings - Fork 0
<fix>[storage]: ZSTAC-85462 prepare zbs hosts on attach #4092
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
Closed
ZStack-Robot
wants to merge
1
commit into
5.5.22
from
sync/haidong.pang/fix/ZSTAC-85462-zbs-attach-hosts
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
筛选条件应排除 Disabled 主机,避免被“不可调度主机”误阻塞附加流程。
当前仅排除了
PreMaintenance/Maintenance,Disabled仍会进入部署列表;若其deployClient失败,会直接导致 attach 失败,即使集群里还有可用主机。建议将可用主机收敛为Connected + Enabled + KVM。建议修改
List<HostVO> hosts = Q.New(HostVO.class) .eq(HostVO_.clusterUuid, clusterUuid) .eq(HostVO_.status, HostStatus.Connected) + .eq(HostVO_.state, HostState.Enabled) .eq(HostVO_.hypervisorType, VmInstanceConstant.KVM_HYPERVISOR_TYPE) - .notIn(HostVO_.state, Arrays.asList(HostState.PreMaintenance, HostState.Maintenance)) .list();🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment from haidong.pang:
Disable的主机也应当deploy。避免该主机enable后无法连接存储。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatheMatrix,感谢 haidong.pang 的解释!这个设计考量是合理的——Disabled状态只是管理员主动禁用调度,主机仍处于Connected状态,提前部署好 ZBS client 可以确保主机重新Enabled后立即能连接存储,不需要再等重连触发。与此同时deployClient是幂等操作,多次调用无副作用。我之前建议排除
Disabled主机是错误的,请忽略该建议。✏️ Learnings added
🧠 Learnings used