test_mm_domain_limits fails intermittently due to unhandled memory resource limit error (errorCode 535)

オープン 初心者向け
#13,516 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
testing

調査の方向性

test/integration/component/test_mm_domain_limits.py から始めて test_03_delete_vm を調査し、その後、高度なシミュレーター構成に対して対象を絞った nosetests コマンドを実行します。errorCode 535 が想定される結果として扱われること、想定外の API エラーでは引き続き失敗すること、VM の作成が成功した場合にのみ削除が試行されることを確認してください。

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

説明

component:integration-test status:marvin-tests-failing type:technical-debt
problem

While working on PR #13490, I noticed the Simulator CI / test job intermittently fails on test_mm_domain_limits (test_03_delete_vm).

The test calls deployVirtualMachine, which fails with CloudStack API errorCode 535: "Maximum amount of resources of Type = 'memory' ... is exceeded". Because the VM was never created, the test then attempts to delete a VM that doesn't exist, causing test_03_delete_vm to fail.

The test does not currently handle this resource-limit API error as a valid/expected outcome.

versions

Apache CloudStack version: main branch (4.23.0.0-SNAPSHOT)
Environment: GitHub Actions Simulator CI (advanced zone), simulator hypervisor — not a real deployment

The steps to reproduce the bug
  1. Run the Simulator CI test suite including component/test_mm_domain_limits.py
  2. Observe test_03_delete_vm
  3. deployVirtualMachine fails with errorCode 535 (memory limit exceeded)
  4. Test then attempts to delete a VM that was never created, causing a failure

Can also be reproduced locally with:
nosetests-3.4 --with-marvin --marvin-config=setup/dev/advdualzone.cfg test/integration/component/test_mm_domain_limits.py:test_03_delete_vm -s -a tags=advanced

What to do about it?

Update test_03_delete_vm in test/integration/component/test_mm_domain_limits.py to treat the CloudStack API errorCode 535 (memory resource limit exceeded) as an expected outcome, and only attempt VM deletion if creation succeeded. Example:

try:
vm = VirtualMachine.create(self.apiclient, ...)
vm_created = True
except CloudstackAPIException as ex:
if "errorCode: 535" in str(ex) or "Maximum amount of resources of Type = 'memory'" in str(ex):
vm_created = False
else:
raise

if vm_created:
vm.delete(self.apiclient)

Alternatively, the domain/project memory limit could be raised in test setup if VM creation is expected to succeed in this test.

主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
7日 5時間
マージ済み PR(30日)
28

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/cloudstack のほかの issue

apache/cloudstack の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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