TritonDataCenter / sdc-docker

Docker Engine for Triton
Mozilla Public License 2.0
183 stars 49 forks source link

no resources for running a Docker Container #48

Closed phaus closed 8 years ago

phaus commented 9 years ago

I have created a non-COAL Setup of sdc-docker. I am able to do a docker pull successfully, but I am not able to start a Docker Container:

# docker run e85de6baa069
Error response from daemon: (DockerNoComputeResourcesError) No compute resources available.     (0b0e6df4-3be6-4628-9fa6-3d1747a8abb2)

Docker Info shows me no availible resources:

# docker info
Containers: 0
Images: 19
Storage Driver: sdc
 SDCAccount: philipp
Execution Driver: sdc-0.3.0
Logging Driver: json-file
Kernel Version: 3.12.0-1-amd64
Operating System: SmartDataCenter
CPUs: 0
Total Memory: 0 B
Name: myloc
ID: 72363257-98ec-4d21-a921-167d83a7a724
Username: phaus
Registry: https://index.docker.io/v1/
rmustacc commented 9 years ago

Do you have any compute nodes set up and configured to run Docker? If you look at the workflow jobs, you should find one that corresponds to the provisioning request and you should be able to get the steps that the designation system used to rule out compute nodes.

askfongjojo commented 9 years ago

You may want to check the package prefix configuration if you have created your own packages. See https://github.com/joyent/sdc-docker/blob/master/docs/guide/README.md

specifically the Package Selection and Service Comfiguration sections.

phaus commented 9 years ago

Do you have any compute nodes set up and configured to run Docker?

At the moment I am just using one Headnode, but I have enough free Resources there and VMs just start nice. I used "Make the head-node provisionable" from here https://github.com/joyent/sdc/wiki/FAQ to be able to start VMs on the Headnode

You may want to check the package prefix configuration if you have created your own packages.

I just went with the default "sample" packages, so I guess that isn't an issue.

I had a look into the Job:

screenshot 2015-08-02 20 24 56

I don't know what is the reason for that error. I have attached the Parameters and the Output of the Job here https://gist.github.com/phaus/616c8f9fbf24f85168ee

cmacrae commented 8 years ago

Not sure if this is still an ongoing issue @phaus, but the following may help.
Run the below string of commands, after attempting to deploy a Docker container using the Triton Docker endpoint, to determine if it see's any compute nodes (presumably, the headnode would actually show up here if you've set it to be provisionable):

sdc-login cnapi
grep -h snapshot `svcs -L cnapi` /var/log/sdc/upload/cnapi_* \
   | bunyan -c this.snapshot -o bunyan --strict \
   | tail -1 \
   | json -ga snapshot \
| while read snap; do echo "$snap" | base64 -d | gunzip - | json ; done

You should see an output similar to the following:

  "steps": [
    {
      "step": "Received by DAPI",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers which have been setup",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers which are currently running",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers objects which are valid",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers containing VMs required for volumes-from",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Add VMs which have open provisioning tickets",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Calculate localities of owner's VMs",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers which are not reserved",
      "remaining": [
        "80a1abd2-d434-e111-82ac-c03fd56f115a"
      ]
    },
    {
      "step": "Servers which are not headnodes",
      "remaining": []
    }
  ]

Note the last log entry.

As you've noted, if you're using a single node set-up, be sure you've run sdcadm post-setup dev-headnode-prov.

I know this hasn't been updated since Aug 2015, but I figured I'd drop this in, just in case it could be of help.

misterbisson commented 8 years ago

@cmacrae's answer here seems correct: make the head node provisionable using the sdcadm post-setup dev-headnode-prov command. It's recommended in https://github.com/joyent/sdc-docker#installation.