问题
I am trying to create an hourly bare metal server with the python CLI:
$ slcli hw create -H testhost -D blah.com -s S1270_8GB_2X1TBSATA_NORAID -o UBUNTU_16_64 -d dal01 --port-speed 100 --billing hourly -k mykey
This action will incur charges on your account. Continue? [y/N]: y
SoftLayerAPIError(SoftLayer_Exception_Public): Unable to add a Graphics Processing Unit price (178117) because it is not valid for the package (200).
I am trying to order a simple single core server and not one with a GPU. slcli hw create-options
does not show any options that are GPU-related.
I was also able to issue this exact same command yesterday and was able to create the server, so it seems like something changed in the SoftLayer API between yesterday and today.
If I try to create a similar configuration on https://control.softlayer.com, I get the same GPU package error.
I went into HardwareManager and dumped the price list JSON for the order being submitted and I also don't see any mention of this GPU price ID 178117:
{'presetId': 64, 'hardware': [{'domain': u'blah.com', 'hostname': u'testhost'}], 'useHourlyPricing': True, 'location': 'DALLAS', 'packageId': 200, 'prices': [{'id': 21}, {'id': 420}, {'id': 906}, {'id': 175791}, {'id': 1800}, {'id': 273}], 'sshKeys': [{'sshKeyIds': [655115]}], 'quantity': 1}
回答1:
There are some changes that are affecting to package: 200, this is an issue for GPUs which need to be defined for the preset that you are trying to order.
In your case you are trying to order without GPUs which refers the item price: 178117 (None product for gpu0 and gpu1, through API, this price is set by default when you don't define the gpus prices). Currently we are reporting this issue, but you can submit a ticket to get more information about it.
来源:https://stackoverflow.com/questions/39003084/gpu-related-api-errors-for-softlayer-hourly-bare-metal-server-creation