Juju bootstrap

When I run juju bootstrap --constraints tags =juju mymaas maas-controller I get the error

ERROR failed to bootstrap model: cannot start bootstrap instance in availability zone “default”: failed to acquire node: No available machine matches constraints: [(‘agent_name’, [‘39287c02-44be-4f78-89e9-b40d8d25c332’]), (‘mem’, [‘3584’]), (‘zone’, [‘default’])] (resolved to “mem=3584.0 zone=default”)

For my lab I’ve used the Interactive Mode of JUJU and run the following command, obviously you’ve to change with your data. From MAAS:

$: juju add-cloud
Since Juju 2 is being run for the first time, downloading latest cloud information. Fetching latest public cloud list... Your list of public clouds is up to date, see `juju clouds`. Cloud Types
   maas
   manual
   openstack
   oracle
   vsphere
 Select cloud type: maas
Enter a name for your maas cloud: maas-cloud 
Enter the API endpoint url: http://your_Maas_IP:5240/MAAS
Cloud "maas-cloud" 

In order to access our cloud, JUJU needs to know how to authenticate itself with MAAS and the way to make that is use the following command:

$: juju add-credential maas-cloud 
Enter credential name: rich 
Using auth-type "oauth1". 
Enter maas-oauth: (paste the MAAS Keys copied) 
Credential "rich" added locally for cloud "maas-cloud".
to list our credentials use:

then run the bootstrap

$: juju bootstrap --constraints tags=juju maas-cloud maas-controller --debug

I realize this reply is over a year after OP’s post, but I had the same issue as well. For me it turned out to be the baremetal server i was bootstrapping the controller to. In MaaS it has to be in a “Ready” state, waiting to be acquired for deployment. I simply left the baremetal server powered off after the initial commissioning and ran the bootstrap command again.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.