-
Notifications
You must be signed in to change notification settings - Fork 15
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
local_disk flag seemingly does nothing #63
Comments
@ju2wheels Hey Julio, any advice? |
I have seen this many times too but it's not consistent. I always assume it's some SoftLayer flakiness. I was getting it a lot last week and had to give up. I find the smaller the drive you request the less likely you are to get this error. If you log a bug with SL they won't do anything unless you give them the full API calls/debug trace. |
This would be a bug in the SoftLayer API upstream. We arent querying for prices directly because the advanced ordering for virtual servers hasnt been implemented and we are doing simplified ordering through SoftLayer_Virtual_Gust::createobject. With this we only tell it whether the disk should be local vs SAN and then the sizes of the disks. One thing to note is that the disks/sizes available may vary (by DC I think IIRC and sometimes machine type) so you have to use the sl-cli tool to look at what is available as well. If you still hit this bug, please post the error message you get but the only thing I can do is help push the bug upstream most likely. |
I will test to see if we can recreate. |
So, theres a few tricky things with ordering through createObject. The FIRST disk can only be 25G or 100G. For both local and SAN. http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getCreateObjectOptions/ in the section for disks, you'll see those are the only ones with "device = 0"' Second, make sure you are using the literal FALSE. not "false" or anything else like that. That value is getting parsed by PHP, so you'll run into its boolean problems if you don't specify the correct FALSE. If that doesn't fix your problem let me know. If this helps, heres how you would order a Virtual_Guest with 2 SAN disks. client = SoftLayer.Client()
guest = {}
guest['startCpus'] = 1
guest['maxMemory'] = 1024
guest['localDiskFlag'] = False
guest['hostname'] = 'partition-test'
guest['domain'] = 'softlayer.com'
guest['hourlyBillingFlag'] = True
guest['datacenter'] = {}
guest['datacenter']['name'] = 'sjc01'
guest['operatingSystemReferenceCode'] = 'UBUNTU_LATEST'
guest['blockDevices'] = [{
'device' : 0,
'diskImage' : { 'capacity' : 100}
},{
'device' : 2,
'diskImage' : { 'capacity' : 75}
}]
result = client['SoftLayer_Virtual_Guest'].createObject(guest) |
Works:
resp:
Does not work:
|
I think I may have a bug. When setting "local_disk = false" and ordering second & third SAN disks with advertised capacities (1000GB, 75GB, etc) The api reports it cannot find price info for the disks, and provisioning fails.
Maybe I am just misunderstanding this flag? I checked what occurs when setting it to false & a single 100GB disk, and the resulting VSI still shows a local disk type for the primary 100gb.
The text was updated successfully, but these errors were encountered: