Comments (7)
Hello,
Thanks for pointing this out. We'll take a look at this in the near future.
from godo.
@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.
@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.
@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.
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.
@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.
@aybabtme care to follow up again? It looks like @wardviaene is trying to whip up some Kubernetes support.
from godo.
Related Issues (20)
- Add to fetch details of monitoring alert policies. HOT 1
- Add project information in response of list and get call of all resources. HOT 1
- Support for TTL in domain create
- Floating IP deleting only on second time HOT 3
- CVE-2021-27918 (High) detected in github.com/golang/net-e086a090c8fdb9982880f0fb6e3db47af1856533 HOT 1
- CVE-2021-31525 (Medium) detected in github.com/golang/net-e086a090c8fdb9982880f0fb6e3db47af1856533 HOT 1
- CVE-2021-33194 (High) detected in github.com/golang/net-e086a090c8fdb9982880f0fb6e3db47af1856533
- Account
- Create Snapshot Missing HOT 2
- [Feature Request] Add specifying image by name support to DropletCreateImage
- Kubernetes `surge_upgrade` field cannot be set to `false` HOT 3
- https://github.com/notxarb/openapi/tree/main
- App
- CVE-2022-27664 (High) detected in github.com/golang/net-290c469a71a567d354e4abd335577aba44c4bde4
- CVE-2022-41721 (High) detected in golang.org/x/net-v0.0.0-20220921155015-db77216a4ee9 HOT 1
- How to get error message HOT 1
- Typo in the Readme # Build Status is not showing an icon HOT 5
- Code of conduct was missing. I added it HOT 2
- move doctl config into this library? HOT 2
- Kubernetes.DeleteDangerous() does not delete PVC Volumes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godo.