Fix GCE volume parameters
We were ignoring the volume-type and volume-size parameters for GCE; correct that. Also add a release note. We forgot to do that. We may as well attach it to the next version since it's a new feature, and only with this change does it actually work as documented. Change-Id: I6cad4fa7a661997771f9c7ccf622a5f9828bd750
This commit is contained in:
parent
4e745dd835
commit
5d37a0a6e1
@ -2088,7 +2088,8 @@ section of the configuration.
|
||||
.. attr:: volume-type
|
||||
:type: string
|
||||
|
||||
If given, the root volume type (``standard`` or ``ssd``).
|
||||
If given, the root volume type (``pd-standard`` or
|
||||
``pd-ssd``).
|
||||
|
||||
.. attr:: volume-size
|
||||
:type: int
|
||||
|
@ -86,9 +86,13 @@ class GCEAdapter(SimpleTaskManagerAdapter):
|
||||
|
||||
def createInstance(self, task_manager, hostname, metadata, label):
|
||||
image_id = self._getImageId(task_manager, label.cloud_image)
|
||||
disk_init = dict(sourceImage=image_id,
|
||||
diskType='zones/{}/diskTypes/{}'.format(
|
||||
self.provider.zone, label.volume_type),
|
||||
diskSizeGb=str(label.volume_size))
|
||||
disk = dict(boot=True,
|
||||
autoDelete=True,
|
||||
initializeParams=dict(sourceImage=image_id))
|
||||
initializeParams=disk_init)
|
||||
machine_type = 'zones/{}/machineTypes/{}'.format(
|
||||
self.provider.zone, label.instance_type)
|
||||
network = dict(network='global/networks/default',
|
||||
|
@ -116,7 +116,7 @@ class ProviderPool(ConfigPool):
|
||||
cloud_image = None
|
||||
pl.cloud_image = cloud_image
|
||||
pl.instance_type = label['instance-type']
|
||||
pl.volume_type = label.get('volume-type', 'standard')
|
||||
pl.volume_type = label.get('volume-type', 'pd-standard')
|
||||
pl.volume_size = label.get('volume-size', '10')
|
||||
full_config.labels[label['name']].pools.append(self)
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Support for resources in Google Compute Engine (GCE) has been added.
|
Loading…
Reference in New Issue
Block a user