Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of secondary volumes size #361

Closed
moul opened this issue May 14, 2016 · 1 comment · Fixed by #403
Closed

Better handling of secondary volumes size #361

moul opened this issue May 14, 2016 · 1 comment · Fixed by #403
Assignees
Labels
enhancement instance Instance issues, bugs and feature requests
Milestone

Comments

@moul
Copy link
Contributor

moul commented May 14, 2016

Some new offers have size limits, we should as often as possible create a secondary volume if not manually filled. This is the default behavior on the console for instance.

See #360 and scaleway/docker-machine-driver-scaleway#40

@ViViDboarder
Copy link

This causes issues with image builder if you have a base image > 50GB.

scaleway/image-builder#14

It would be a lot more complicated, but it would be better, if possible to detect the size of the primary image first before adding in a secondary.

Easy repro steps:

root@scw-b6f9a0:~/image-ubuntu# scw -D run --commercial-type="VC1M" 100G
INFO[0000] Server creation ...
DEBU[0000] This server needs a least 50G
DEBU[0000] curl -X POST -d "{\"name\":\"50G\",\"size\":50000000000,\"volume_type\":\"l_ssd\",\"organization\":\"<org>\"}" -H "Content-Type: application/json" -H "User-Agent: scw/v1.10.1" -H "X-Auth-Token: <token>" 'https://api.scaleway.com/volumes'
DEBU[0000] [POST]: https://api.scaleway.com/volumes
DEBU[0002] [Response]: [201]
{"volume": {"size": 50000000000, "name": "50G", "modification_date": "2017-05-23T21:44:48.188970+00:00", "organization": "<orgid>", "export_uri": null, "creation_date": "2017-05-23T21:44:48.188970+00:00", "id": "4f4badba-6bd6-41e3-9ed6-c1c6da6a081b", "volume_type": "l_ssd", "server": null}}
DEBU[0002] curl -X POST -d "{\"name\":\"100G\",\"size\":100000000000,\"volume_type\":\"l_ssd\",\"organization\":\"<org>\"}" -H "Content-Type: application/json" -H "User-Agent: scw/v1.10.1" -H "X-Auth-Token: <token>" 'https://api.scaleway.com/volumes'
DEBU[0002] [POST]: https://api.scaleway.com/volumes
DEBU[0002] [Response]: [201]
{"volume": {"size": 100000000000, "name": "100G", "modification_date": "2017-05-23T21:44:50.385905+00:00", "organization": "<orgid>", "export_uri": null, "creation_date": "2017-05-23T21:44:50.385905+00:00", "id": "426e39f7-8475-4529-8ba6-9c6bff31932e", "volume_type": "l_ssd", "server": null}}
DEBU[0002] curl -X POST -d "{\"name\":\"lonely-snyder\",\"volumes\":{\"0\":\"426e39f7-8475-4529-8ba6-9c6bff31932e\",\"1\":\"4f4badba-6bd6-41e3-9ed6-c1c6da6a081b\"},\"dynamic_ip_required\":true,\"bootscript\":null,\"organization\":\"<org>\",\"commercial_type\":\"VC1M\"}" -H "Content-Type: application/json" -H "User-Agent: scw/v1.10.1" -H "X-Auth-Token: <token>" 'https://api.scaleway.com/servers'
DEBU[0002] [POST]: https://api.scaleway.com/servers
DEBU[0003] [Response]: [201]
{"server": {"state_detail": "", "image": null, "creation_date": "2017-05-23T21:44:50.636341+00:00", "public_ip": null, "private_ip": null, "id": "b25bf8fb-e177-479b-be3e-0529285b24d9", "dynamic_ip_required": true, "modification_date": "2017-05-23T21:44:50.636341+00:00", "enable_ipv6": false, "hostname": "lonely-snyder", "state": "stopped", "bootscript": {"kernel": "http://169.254.42.24/kernel/x86_64-4.9.20-std-1/vmlinuz-4.9.20-std-1", "initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.12.4.gz", "default": true, "bootcmdargs": "LINUX_COMMON ip=:::::eth0: boot=local", "architecture": "x86_64", "title": "x86_64 4.9.20 std #1 (longterm)", "dtb": "", "organization": "11111111-1111-4111-8111-111111111111", "id": "5a1091c5-6e7b-45d3-8afc-c1246b0a9913", "public": true}, "location": null, "ipv6": null, "commercial_type": "VC1M", "tags": [], "arch": "x86_64", "extra_networks": [], "name": "lonely-snyder", "volumes": {"0": {"size": 100000000000, "name": "100G", "modification_date": "2017-05-23T21:44:51.218447+00:00", "organization": "<orgid>", "export_uri": null, "creation_date": "2017-05-23T21:44:50.385905+00:00", "id": "426e39f7-8475-4529-8ba6-9c6bff31932e", "volume_type": "l_ssd", "server": {"id": "b25bf8fb-e177-479b-be3e-0529285b24d9", "name": "lonely-snyder"}}, "1": {"size": 50000000000, "name": "50G", "modification_date": "2017-05-23T21:44:51.218465+00:00", "organization": "<orgid>", "export_uri": null, "creation_date": "2017-05-23T21:44:48.188970+00:00", "id": "4f4badba-6bd6-41e3-9ed6-c1c6da6a081b", "volume_type": "l_ssd", "server": {"id": "b25bf8fb-e177-479b-be3e-0529285b24d9", "name": "lonely-snyder"}}}, "security_group": {"id": "31d0bdfe-7e16-4327-9616-3a3dec23ab9f", "name": "Default security group"}, "organization": "<orgid>"}}
INFO[0003] Server created: b25bf8fb-e177-479b-be3e-0529285b24d9
DEBU[0003] PublicDNS b25bf8fb-e177-479b-be3e-0529285b24d9.pub.cloud.scaleway.com
DEBU[0003] PrivateDNS b25bf8fb-e177-479b-be3e-0529285b24d9.priv.cloud.scaleway.com
INFO[0003] Server start requested ...
DEBU[0003] curl -X POST -d "{\"action\":\"poweron\"}" -H "Content-Type: application/json" -H "User-Agent: scw/v1.10.1" -H "X-Auth-Token: <token>" 'https://api.scaleway.com/servers/b25bf8fb-e177-479b-be3e-0529285b24d9/action'
DEBU[0003] [POST]: https://api.scaleway.com/servers/b25bf8fb-e177-479b-be3e-0529285b24d9/action
DEBU[0003] [Response]: [400]
{"message": "The total volume size of VC1M instances must be between 51GB and 100GB", "type": "invalid_request_error"}
DEBU[0003] StatusCode: 400, Type: invalid_request_error, APIMessage: The total volume size of VC1M instances must be between 51GB and 100GB
FATA[0003] cannot execute 'run': failed to start server b25bf8fb-e177-479b-be3e-0529285b24d9: StatusCode: 400, Type: invalid_request_error, APIMessage: The total volume size of VC1M instances must be between 51GB and 100GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement instance Instance issues, bugs and feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants