cpu-cores constraint no longer respected

Bug #1755580 reported by Jeff Pihach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Juju version: 2.3.4-xenial-amd64

When making a request over the API for a 4 core CPU if the call uses the legacy key 'cpu-cores' it will disregard that constraint when requesting a new machine. If you send the request using the 'cores' constraint then it will create a machine with the appropriate number of cores.

This has caused a regression in the GUI: https://github.com/juju/juju-gui/issues/3560 as we must support multiple versions of Juju and there doesn't appear to have been a facade bump for this change.

DOESN'T WORK (cpu-cores)
{"type":"Client","request":"AddMachines","params":{"params":[{"jobs":["JobHostUnits"],"series":null,"parent-id":null,"container-type":null,"constraints":{"cpu-cores":4}}]},"version":1,"request-id":17}

WORKS (cores)
{"type":"Client","request":"AddMachines","params":{"params":[{"jobs":["JobHostUnits"],"series":null,"parent-id":null,"container-type":null,"constraints":{"cores":4}}]},"version":1,"request-id":7}

Revision history for this message
Jeff Pihach (hatch) wrote :

The GUI issue is for vsphere but the issue also happens on GCE (possibly others as well)

description: updated
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Can you provide a log confirming this? It seems like this is an API issue with your call, but not an issue on the cli.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: bitesize
Revision history for this message
Jeff Pihach (hatch) wrote :

@nskaggs the calls are outlined in the original description.

It's also interesting to note that the machine values returned by the megawatcher use 'cpu-cores' and not the newer 'cores'. So it seems like this change was made but never finalized throughout the codebase with an incremented facade.

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.