Public bug reported:

I have a cluster of machines where all the CPU's are 1, and the
following information is as follows:

Architecture: amd64/generic
CPU Count: 1
Memory: 8192 MB

Now, juju constraints, as specified by [1], default to 1 in the case of
CPU. Looking at the nodes, and being the constraints default to 1, it
leads you to believe that  nodes should be allocated to users given that
they do match the constraints "1 or more CPU's". However, when trying to
deploy a node, no node gets allocated.

Looking at the logs, it is because "NodesNotAvailable: No matching node
is available." A little investigation lead me to realize that the
constraint above only filter Nodes that are *greater than* instead of
*equal or greater than*:

This is what happens:

1. juju bootstrap -> works fine.

2. Obtain node constraints:
node@node:/var/log/maas$ juju get-constraints
[...]
{arch: amd64, cpu: 1.0, maas-name: zookeeper.hdl, maas-tags: null, mem: 512.0, 
provider-type: maas,
  ubuntu-series: null}

3. juju deploy ubuntu. Deployment seems to be successful.
2013-03-13 15:57:16,067 INFO Searching for charm cs:precise/ubuntu in charm 
store
2013-03-13 15:57:17,253 INFO Connecting to environment...
2013-03-13 15:57:18,804 INFO Connected to environment.
2013-03-13 15:57:19,302 INFO Charm deployed as service: 'ubuntu'
2013-03-13 15:57:19,303 INFO 'deploy' command finished successfully

4. After a successful deployment, there are *NO* allocated machines on the MAAS 
WebUI, however Juju does show the following:
juju status
[...]
  1:
    instance-id: pending
[..]

Look at maas.log, it shows he following error:

[...]
"NodesNotAvailable: No matching node is available."

5. Let's terminate to modify constraints.
juju destroy-service ubuntu && juju terminate-machine 1

6. We modify the constraints so that cpu=0.
node@node:/var/log/maas$ juju set-constraints cpu=0

7. WE obtain the constraints to check they are fine
node@node:/var/log/maas$ juju get-constraints
[...]
{arch: amd64, cpu: 0.0, maas-name: null, maas-tags: null, mem: 512.0, 
provider-type: maas,
  ubuntu-series: null}

8. Now, after setting the CPU constraint to 0, deploying a machines works just 
fine. 
juju deploy ubuntu ->> works just fine.

If you notice, it seems that the constraints should be satisfied by
being (>=1 CPU), however, this is not the case. If there's only 1 cpu
and the constraint is set to CPU=1, no node will be allocated. This
might be the same case with memory.

** Affects: maas
     Importance: High
         Status: New

** Affects: maas (Ubuntu)
     Importance: Undecided
         Status: New

** Changed in: maas
   Importance: Undecided => High

** Also affects: maas (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to maas in Ubuntu.
https://bugs.launchpad.net/bugs/1154803

Title:
  Default constraints prevents the allocation of nodes if they are equal
  to the HW.

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1154803/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to