apache / apache/cloudstack

Deleted KVM host is automatically re-added to the cluster after reboot

未关闭
#13,693 6 条评论 0 个 reaction 已指派 0 人 已被 @wido 认领 在 GitHub 查看
status:has-work-around status:needs-functional-definition
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

We removed a host from a CloudStack cluster containing multiple KVM hosts. Before deletion, the host was placed into maintenance mode, as required by CloudStack in order to remove it safely.

After the host had been deleted from CloudStack, the underlying physical server was rebooted because updates had been applied. The reboot itself was not expected to have any effect on CloudStack, since the host had already been removed from the management plane.

Unexpectedly, after the reboot, CloudStack rediscovered the machine and added it back to the same cluster as a new host. We also verified in the CloudStack database that the host entry had first been deleted and then recreated as a new record.

This behavior suggests that CloudStack is still able to rediscover a previously removed KVM host when the machine comes back online, even though it had already been deleted from CloudStack.

Expected behavior:

Once a host has been removed from CloudStack, rebooting the underlying physical server should not cause the host to be automatically rediscovered and re-added to the same cluster.

Actual behavior:

The deleted host was automatically added back to the cluster as a new host after the physical server reboot.

Environment:

CloudStack: 4.22.1.0

Hypervisor: KVM

Cluster: multiple hosts

Host state before deletion: maintenance mode

Host status after deletion: removed from CloudStack

Database observation: host entry was deleted and later recreated as a new entry

Additional details:

We did not manually re-add the host after deletion.

The host appears to have been rediscovered automatically by CloudStack after the reboot.

The issue occurred in a multi-host cluster environment.

### versions

CloudStack version: 4.22.1.0

OS and database versions:
We observed this behavior in two CloudStack installations:

Management Server OS: Ubuntu 24.04 LTS

Database: MySQL 8.x

KVM Host OS: AlmaLinux 9.8 and Ubuntu 24.04 LTS

### The steps to reproduce the bug

1. Migrate all VMs off the host.

2. Put the host into maintenance mode.

3. Remove the host from the cluster in CloudStack.

4. Reboot the physical server.

### What to do about it?

_No response_

贡献指南

打开贡献指南

调研方向

从四个复现步骤开始,并查看开放的 PR #13719 以了解当前的调查。完成的标准是:从集群中移除的主机在其物理服务器重启后不会被自动重新发现或重新创建。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
cloud, infrastructure
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。