You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Storage controller support (ddcloud_storage_controller) (#86)
* Expose SCSI bus number for inline disks on ddcloud_server.
* If both IPv4 and VLAN Id are specified for a network adapter, ignore VLAN Id.
* Handle the fact that ExpandDisk is part of the v2.x API and therefore returns ResponseCodeInProgress rather than ResultSuccess.
* Only build master and development/vXXX.
* Initial sketch of implementation for ddcloud_storage_controller (this is a prototype of option 1 for #84).
* Mark all storage controller properties as ForceNew.
* Start implementing update / delete for ddcloud_storage_controller resource.
* Fix bugs and improve diagnostic logging for deployment of ddcloud_storage_controller.
* Fix incorrectly-propagated scsi_bus_number on ddcloud_storage_controller.disk.
* Log server remaining disk count before removing a disk.
* Refactor access to target storage controller.
* Create initial acceptance test for ddcloud_storage_controller (default controller, single image disk).
* Fix broken cleanup checks for ddcloud_storage_controller acceptance tests.
* Add acceptance test for ddcloud_storage_controller (default controller, 1 additional disk).
* Remove SCSI controller when ddcloud_storage_controller is destroyed (unless it's the last storage controller in the target server).
* Fix buggy handling for removal of server's last disk.
* Add refresh step before verifying server disk configuration in acceptance tests for ddcloud_storage_controller.
* Fix broken ddcloud_storage_controller acceptance test (default controller with 1 image disk and 1 additional disk).
* Fix another broken acceptance test for ddcloud_storage_controller, and improve output from testCheckXXX functions.
* Add docs for ddcloud_storage_controller.
* Update version info and change log (v1.3.0-alpha2).
* Fix failing unit tests due to CloudControl schema change.
* Add ddcloud_storage_controller to provider documentation
log.Printf("Configuration for server '%s' specifies %d disks: %#v.", serverID, len(configuredDisks), configuredDisks)
78
84
iflen(configuredDisks) ==0 {
85
+
log.Printf("Configuration for server '%s' does not specify any disks; the provider will assume all disks are either image-only, or configured via ddcloud_storage_controller.", serverID)
86
+
79
87
propertyHelper.SetDisks(actualDisks)
80
88
propertyHelper.SetPartial(resourceKeyServerDisk)
81
89
@@ -84,6 +92,8 @@ func createDisks(imageDisks []compute.VirtualMachineDisk, data *schema.ResourceD
84
92
returnnil
85
93
}
86
94
95
+
log.Printf("Configuration for server '%s' specifies %d disks: %#v.", serverID, len(configuredDisks), configuredDisks)
96
+
87
97
propertyHelper.SetDisks(configuredDisks)
88
98
propertyHelper.SetPartial(resourceKeyServerDisk)
89
99
@@ -99,7 +109,7 @@ func createDisks(imageDisks []compute.VirtualMachineDisk, data *schema.ResourceD
99
109
100
110
// After initial server deployment, we only need to handle disks that were part of the original server image (and of those, only ones we need to modify after the initial deployment completed deployment).
101
111
log.Printf("Configure image disks for server '%s'...", serverID)
// Switched to inline declaration of server disks.
160
+
log.Printf("Disks for server '%s' are now configured inline, but were previously unspecified or configured via one or more ddcloud_storage_controllers.",
161
+
serverID,
162
+
)
163
+
164
+
// Can only switch to inline disks if there is a single (default) SCSI controller.
165
+
iflen(server.SCSIControllers) >1 {
166
+
returnfmt.Errorf("server '%s' has multiple SCSI controllers, so disks cannot be configured inline",
// Switched to external declaration of server disks.
172
+
173
+
log.Printf("Disks for server '%s' are now unspecified or configured via one or more ddcloud_storage_controllers, but were previously configured inline.",
// Cannot target non-default SCSI controllers if disks are declared directly on the server.
576
+
ifdisk.SCSIBusNumber!=0 {
577
+
returnfmt.Errorf("unsupported configuration: disk configured to use non-default SCSI bus %d (declare the disk on a ddcloud_storage controller if targeting a SCSI bus other than 0)", disk.SCSIBusNumber)
0 commit comments