Coder Social home page Coder Social logo

Comments (7)

bryanl avatar bryanl commented on August 17, 2024

Hello,

Thanks for pointing this out. We'll take a look at this in the near future.

from godo.

aybabtme avatar aybabtme commented on August 17, 2024

@omallo are you sure the volume ID you attempted to use existed? The docs are erroneously stating that a droplet ID is required, when in fact the argument is optional.

from godo.

omallo avatar omallo commented on August 17, 2024

@aybabtme I just tested it with the following curl commands and I'm getting an error if I don't pass the droplet_id to the detach action (if I pass it, everything works fine):

export DO_API_TOKEN=...

curl -sS -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_API_TOKEN" -d '{"size_gigabytes":1, "name": "example", "region": "fra1"}' "https://api.digitalocean.com/v2/volumes"
{
    "volume": {
        ...
        "id": "21f922a5-95da-11e6-9c0d-000f53304720",
        ...
    }
}

curl -sS -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_API_TOKEN" -d '{"type": "attach", "droplet_id": "29577663", "region": "fra1"}' "https://api.digitalocean.com/v2/volumes/21f922a5-95da-11e6-9c0d-000f53304720/actions"
{
    ...
}

curl -sS -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_API_TOKEN" -d '{"type": "detach", "volume_name": "example", "region": "fra1"}' "https://api.digitalocean.com/v2/volumes/actions"
{
    "id": "parameter_missing",
    "message": "param is missing or the value is empty: droplet_id"
}

from godo.

mjsteger avatar mjsteger commented on August 17, 2024

@omallo The problem there is that there is a bug in the API, where it requires either the volume_id or the droplet_id to be passed in. I'll fix that so that if either the volume_id or volume_name is passed it, it'll deduce the droplet from that.

from godo.

wardviaene avatar wardviaene commented on August 17, 2024

@mjsteger

I have the same issue with godo, but getting different results (still not working though):

This is how it is implemented right now in godo:

curl -sS -X POST -H "Content-Type: application/json" -d '{"type": "detach", "region": "fra1"}' -H "Authorization: Bearer $DO_API_TOKEN" https://api.digitalocean.com/v2/volumes/$VOLUMEID/actions

Which gives me:
{"id":"invalid","message":"Attachment not found"}

After adding droplet_id as argument it works.

from godo.

wardviaene avatar wardviaene commented on August 17, 2024

@bryanl @aybabtme Can the godo API at least get changed with an extra method that catches the droplet_id, as described in the docs? If DigitalOcean one day decides to have multiple droplets attached to one volume, then this API call will have bad consequences.

from godo.

bryanl avatar bryanl commented on August 17, 2024

@aybabtme care to follow up again? It looks like @wardviaene is trying to whip up some Kubernetes support.

from godo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.