Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jwreagor/abdec5751134b4e3a031fb1b92b3cebd to your computer and use it in GitHub Desktop.
Save jwreagor/abdec5751134b4e3a031fb1b92b3cebd to your computer and use it in GitHub Desktop.
Diagnosing "No Compute Resources Available" messages in Triton.

No Compute Resources Available

This error is somewhat ambiguious because there is seemingly no indication which resource is exhausted.

Triton chooses compute nodes with a subcomponent called sdc-designation (also refered to as , DAPI). The full DAPI log for a provision job is embedded in the CNAPI log file and can be extracted with the workflow job uuid and the following script.

#!/bin/bash

if [[ -n "$TRACE" ]]; then                                                      
    export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
    set -o xtrace                                                               
fi                                                                              

set -o errexit

job_id=${1:-}

req_id=$(sdc-workflow "/jobs/$job_id" | json -Ha params.x-request-id)
cnapi=$(sdc-vmname cnapi)
zlogin "$cnapi" "source ~/.profile
  bunyan -c this.snapshot -o bunyan --strict -c 'this.req_id==\"$req_id\"' \
  \$(svcs -L cnapi) /var/log/sdc/upload/cnapi_* | json -ga snapshot \
  | base64 -d | gunzip - | json steps"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment