Skip to content

Instantly share code, notes, and snippets.

@bahamat
Last active December 5, 2021 07:14
  • Star 10 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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.

Note: The script below is no longer necessary because cnapi now includes /opt/smartdc/cnapi/bin/alloc-reasons.sh which does the same thing.

#!/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