Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPUs limitation for Docker containers does not allow fractional values GNS3 3.0.0 beta1 #3572

Closed
cristian-ciobanu opened this issue Mar 29, 2024 · 1 comment · Fixed by GNS3/gns3-server#2364
Labels
Milestone

Comments

@cristian-ciobanu
Copy link

Before you start
According to this issue GNS3/gns3-web-ui#951 GNS3 should support fractional values for limiting CPU usage in Docker containers

  • cpus: maximum amount of CPU resources the container can use (float), for instance 0.5 will limit the container to 50% of a CPU core.

Describe the bug
When trying to use a fractional values for Maximum CPUs on the Docker container configuration page an error is displayed.

GNS3 version and operating system (please complete the following information):

  • OS: ArchLinux (Python 3.11.8 )
  • GNS3 version 3.0.0 beta1
  • GNS3 is installed on bare metal (no GNS3 VM)

To Reproduce
Steps to reproduce the behavior:

  1. Drag a Docker container on the topology, right click and select Configure
  2. In the Maximum CPU list type a fractional value like 0,5
  3. Click on Apply to save the changes
  4. The following error is displayed in the console.
  5. HTTP error 422 received from compute ' (controller)' for request
PUT /projects/696bf903-ecf1-460b-92ba-3f3976db0967/docker/nodes/26bff5f6-67f2-4409-accf-5eddefee48f9: 
{"detail":[{"type":"int_from_float","loc":["body","cpus"],
"msg":"Input should be a valid integer, got a number with a fractional part",
"input":0.5000000000000001,
"url":"https://errors.pydantic.dev/2.1.2/v/int_from_float"}]}

Screenshots or videos
N/A

Additional context
N/A

@grossmj
Copy link
Member

grossmj commented Apr 3, 2024

Fixed, thanks 👍

@grossmj grossmj closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants