Skip to content

Instantly share code, notes, and snippets.

@rjloura
Created October 1, 2018 20:08
Show Gist options
  • Save rjloura/55159c9c570e8ab7003c8b9498804a19 to your computer and use it in GitHub Desktop.
Save rjloura/55159c9c570e8ab7003c8b9498804a19 to your computer and use it in GitHub Desktop.

Marlin Image workaround

  1. cd /var/tmp

  2. Determine the UUID of the latest "manta-marlin" image on updates.joyent.com.

    muuid=$(updates-imgadm list name=manta-marlin --latest -H -o uuid)
    
  3. Download directly from a separate manual download area in Manta.

    curl -kO https://us-east.manta.joyent.com/Joyent_Dev/public/Manta/manta-marlin-image/$muuid.imgmanifest
    
  4. First ensure that the origin (i.e. parent) image is installed

    origin=$(json -f $muuid.imgmanifest origin)
    [[ -z "$origin" ]] \
        || sdc-imgadm get $origin >/dev/null \
        || sdc-imgadm import $origin -S https://updates.joyent.com
    
  5. If that failed, then the separate download area doesn't have a recent image. Please log an issue.

    [[ $? -ne 0 ]] && echo log an issue at https://github.com/joyent/manta/issues/
    
  6. If the following is interrupted, then re-run the same command to resume:

    curl -kO -C - https://us-east.manta.joyent.com/Joyent_Dev/public/Manta/manta-marlin-image/$muuid.file.gz
    
  7. Verify the download checksum

    [[ $(json -f $muuid.imgmanifest | json files.0.sha1) \
        == $(openssl dgst -sha1 $muuid.file.gz | awk '{print $2}') ]] \
        || echo "error downloading, please delete and retry"
    
  8. Then install this image into the DC's IMGAPI:

    sdc-imgadm import -m $muuid.imgmanifest -f $muuid.file.gz
    
  9. Import the image onto the respective CN:

    imgadm import $muuid
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment