backend.ai-webui icon indicating copy to clipboard operation
backend.ai-webui copied to clipboard

Session can be created more than its limitation set by the resource policy

Open lizable opened this issue 4 years ago • 1 comments

⚠️ FYI: This bug was discovered thanks to @xyloon.

Describe the bug A clear and concise description of what the bug is. 문제가 발생하는 상황에 대한 요약 설명을 적어주세요.

When there have been several session that already exists and the user creates more sessions in updated session launcher (with Carousel UI), It creates more than its limits, and It brings sessions gauge and value in resource statistics panel goes more than 100%.

📌 FYI: To reproduce this issue, first you need to reduce the maximum value of session limits which can be updated via resource policy updating dialog. Please note that only superadmin role can change the values in resource policy.

To Reproduce Steps to reproduce the behavior: 문제를 재현하기 위한 순서를 자세히 적어주세요:

  1. Go to 'Sessions' page.
  2. Click on 'Start' button
  3. Session launcher dialog appears.
  4. Go to the third page and Click the Custom allocation section.
  5. Set the value of sessions section more than 1 but not exceeds the available CPU core in order to create multiple sessions once more.
  6. Click confirm and launch.
  7. Repeat from Step 2 to Step 6.
  8. See the error.

Expected behavior A clear and concise description of what you expected to happen. 원래 기대했던 동작은 어떤 것인지 명확하게 적어주세요. The number of sessions cannot exceed the limits which are set in the resource policy. Even if the user tries to create more than the maximum value of sessions, It has to be treated as a Pending session.

Screenshots If applicable, add screenshots to help explain your problem. Just take a screenshot in your clipboard or copy a picture file and paste it here (Ctrl+V/Cmd+V) so that GitHub automatically attach and insert it. 가능하다면, 문제 상황을 보여주는 스크린샷을 첨부해주세요. 클립보드에 스크린샷을 찍거나 이미지 파일을 복사해서 여기에 붙여넣으면(Ctrl+V/Cmd+V) GitHub이 자동으로 이곳에 첨부 및 삽입해줍니다.

Client:

  • OS: [e.g. macOS 10.14, Windows 10 (1903)]
  • App version: [e.g. 19.08.3] (if you are using a GUI client app)
  • Browser version: [e.g. Chrome 76, Safari, Edge] (if you are using a GUI web console)
  • Python version: [e.g. 3.7.4] (if you are using the Python SDK)
  • NodeJS version: [e.g. 12.0] (if you are using the Javascript SDK)

Server:

  • OS: [e.g. Ubuntu 18.04, CentOS 7.6, macOS 10.14]
    • Output of uname -a: [e.g. Linux node01 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux]
  • Backend.AI version: [e.g. 19.09.0]
  • Python version: [e.g. 3.6.8]
  • Installation method: [e.g. on-premise, using cloud.backend.ai service, used scripts/install-dev.sh]

Additional context Add any other context about the problem here. 추가적으로 문제 상황을 설명할 수 있는 다른 맥락을 기술해주세요. There's another related issue about session count after terminating sessions as well. When after terminating sessions right after the issue occurred the value of the current session goes to a negative number. That is another bug to be resolved.

lizable avatar Jul 15 '21 17:07 lizable

This issue was partially resolved via backend-ai-manager#455

lizable avatar Jul 19 '21 12:07 lizable