Open haijianyang opened 3 months ago
Attention: Patch coverage is 68.96552%
with 9 lines
in your changes are missing coverage. Please review.
Project coverage is 68.45%. Comparing base (
d5d7b1d
) to head (4b1a0fb
).
Files | Patch % | Lines |
---|---|---|
pkg/util/network.go | 66.66% | 4 Missing and 2 partials :warning: |
controllers/elfmachine_controller.go | 72.72% | 1 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issue
如果 IPPool 中有些 IP 已经被非 ElfMachine 使用了,IP 分配到 ElfMachine 后,创建虚拟机会导致 IP 冲突,且需要花一定的时间排查。
Change
目前从 IPPool 过滤被非 ElfMachine 使用的 IP 实现难道较大。 简单起见,从 IPPool 获取到 IP 后,先 ping 一下 IP 是否已经被使用,如果还没有被使用继续正常的创建流程。如果 IP 已经被使用,给 ElfMachine 设置
WaitingForStaticIPAllocationReason
和相关的错误信息。用户发现该错误后,可以处理已经被使用的 IP,之后 ElfMachine 的创建流程会继续正常进行。workflow 运行
make test
报错listen ip4:icmp : socket: operation not permitted
,因此改成 sudo -E sh -c 'make test',Test
WaitingForStaticIPAllocationReason