apache / apache/cloudstack

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

オープン
#13,693 コメント 6 件 リアクション 0 件 担当者 0 名 @wido が担当を希望しています GitHub で見る
status:has-work-around status:needs-functional-definition
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
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_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

4つの再現手順から始め、現在の調査についてはオープンな PR #13719 を確認してください。物理サーバーが再起動した後、クラスターから削除されたホストが自動的に再検出または再作成されなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
cloud, infrastructure
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。