Commit Graph

35 Commits

Author SHA1 Message Date
Joe Topjian e31269d721 provider/openstack: Fix Instance Metadata Deletion (#11252)
This commit fixes a bug where instance metadata removed from the
configuration was not removed from the actual instance.
2017-01-18 11:50:59 +00:00
Joe Topjian 64051f9214 provider/openstack: Updating Compute acceptance tests (#10954) 2016-12-29 16:01:30 +00:00
Joe Topjian c8ac1f7f4e provider/openstack: Acceptance Test Cleanup: Provider & Block Storage (#10839)
* provider/openstack: Updating provider test configuration

* provider/openstack: Updating Block Storage acceptance tests
2016-12-28 16:56:49 +00:00
Joe Topjian 504407c1cb provider/openstack: Block Device Tests and Docs (#10830)
This commit adds some basic tests for block device functionality. It also
expands the existing block device documentation as well references the
new "volume attach" resources for further block storage functionality.
2016-12-19 10:29:37 +00:00
Joe Topjian 27b86ac220 provider/openstack: gophercloud migration: metadata update 2016-10-23 02:38:22 +00:00
Joe Topjian c11a4ef214 provider/openstack: gophercloud migration: updating error responses 2016-10-23 02:38:22 +00:00
Joe Topjian a33256706c provider/openstack: gophercloud migration: compute instance 2016-10-23 02:38:18 +00:00
Joe Topjian beee89c521 provider/openstack: Fix Volume Attachment Detection in Instances
This commit is changing the `volumes` block from being computed to non-computed.
This change makes the Terraform configuration the source of truth about volumes
attached to the instance and therefore is able to correctly detect when a user
detaches a volume during an update.

One thing to be aware of is that if a user attached a volume out of band of an
instance controlled by Terraform, that volume will be detached upon the next
apply. The best thing to do is add a `volume` entry in the instance's
configuration of any volumes that were attached out of band.

This commit also explicitly detaches volumes from an instance before the
instance terminates. Most Block Storage volume drivers account for this
scenario internally, but there are a few that don't. This change is to support
those that don't.

In addition, when volumes are read by the instance, volumes configured in the
Terraform configuration are the source of truth. Previously, a call was being
made to OpenStack to provide the list of attached volumes.

It also adds a few new tests and fixes existing tests for various volume
attach-related scenarios.
2016-08-24 15:21:59 +00:00
Giovanni Paolo Gibilisco ba42737e26 add acceptance test for issue #8040 2016-08-10 12:35:53 +02:00
Joe Topjian 30273faf20 Merge pull request #7649 from jtopjian/openstack-boot-volume-fix
provider/openstack: Fixing boot volume interference
2016-07-20 08:23:09 -06:00
Joe Topjian 411ad21fd8 provider/openstack: Fixing boot volume interference
This commit fixes the situation where instances with both a
bootable volume and attached block storage volumes were reporting
an inconsistent state.
2016-07-15 15:29:44 +00:00
Joe Topjian bc6be73c1d provider/openstack: Fix Security Group EOF Error
When applying or removing 2+ security groups from an instance, an EOF
error will be triggered even though the action was successful. This
patch accounts for and ignores the EOF error. It also adds a test
case.

Security Group and Port documentation are also updated in this
commit.
2016-07-02 14:18:04 +00:00
Dmytro Aleksandrov c32d152495 Implemented stop_before_destroy behavior
Docs and acceptance test included
2016-06-23 09:20:41 +03:00
Joe Topjian ead1fed897 provider/openstack: Enforce ForceNew on Instance Block Device
This commit causes openstack_compute_instance_v2 resources to be
destroyed and recreated upon changes to any block_device argument.
2016-06-03 02:16:40 +00:00
Joe Topjian 803522a7ce provider/openstack: Rebuild On Network Changes
This commit makes it so that openstack_compute_instance_v2 resources
are recreated when any network setting (except Floating IPs) is
changed.
2016-05-24 03:47:27 +00:00
Joe Topjian 9d10028d43 provider/openstack: Fix Access Address Detection
This commit fixes how access ip addresses are detected. The previous
logic used was flawed and would detect the IPs in the wrong order.
2016-04-17 04:38:49 +00:00
Joe Topjian e872c3d8ba provider/openstack: Instance Block Device cleanup
This commit fixes and cleans up instance block_device configuration.

Reverts #5354 in that `volume_size` is only required in certain
block_device configuration combinations. Therefore, the actual
attribute must be set to Optional and later checks done.

Doc upates, too.
2016-02-27 06:05:01 +00:00
Joe Topjian ed9e7de901 provider/openstack: multi ephemeral support
This commit adds the ability to create instances with multiple
ephemeral disks. The ephemeral disks will appear as local block
devices to the instance.
2016-02-27 04:56:27 +00:00
Joe Topjian df660a26a1 provider/openstack: Per-network Floating IPs
This commit adds the ability to associate a Floating IP to a specific
network. Previously, there only existed a top-level floating IP
attribute which was automatically associated with either the first
defined network or the default network (when no network block was
used).

Now floating IPs can be associated with networks beyond the first
defined network as well as each network being able to have their own
floating IP.

Specifying the floating IP by using the top-level floating_ip
attribute and the per-network floating IP attribute is not possible.

Additionally, an `access_network` attribute has been added in order
to easily specify which network should be used for provisioning.
2016-01-31 22:17:51 +00:00
Joe Topjian 4a4f2ad9e5 provider/openstack: Add Instance Personality
This commit adds the "personality" attribute which is used to provision
destination files on the instance.
2016-01-11 03:53:30 +00:00
Joe Topjian 4716451617 provider/openstack: Convert block_device from TypeSet to TypeList
This change better reflects how block devices are passed to the Nova API
and allows for future enablement of block_device features. It also resolves
an interpolation bug.
2015-12-12 22:18:23 +00:00
Joe Topjian 3d3f8122a9 provider/openstack: Volume Cleanup
This commit cleans up the volume and block device handling in the instance
resource. It also adds more acceptance tests to deal with different workflows
of attaching and detaching a volume through the instance's lifecycle.

No new functionality has been added.
2015-10-31 22:45:34 +00:00
Joe Topjian e75553fd9d provider/openstack: Fixes Boot From Volume
This commit fixes the previously broken "boot from volume" feature. It also
adds an acceptance test to ensure the feature continues to work.

The "delete_on_termination" option was also added.
2015-10-31 22:45:28 +00:00
Joe Topjian 776f15f0f3 provider/openstack: added acceptance test to test security group order 2015-10-30 22:31:41 +00:00
Joe Topjian 4daaacd292 Minor volume fixes
This commit follows suit of #1897 by fixing volume-related
parameters which allow the volume attach acceptance test
to work. It also re-enables the volume attach test.
2015-05-14 02:59:21 +00:00
Joe Topjian 04d694fe53 Disabling volume attach test for now 2015-05-09 17:07:50 +00:00
Joe Topjian 219c86ef93 Fixing TestAccComputeV2Instance_floatingIPAttach 2015-05-06 05:53:17 +00:00
Joe Topjian e76dca9756 Fixing TestAccComputeV2Instance_basic 2015-05-06 05:50:21 +00:00
Joe Topjian 1693767922 Compute Instance basic acceptance test
A change was made to account for clouds with multiple networks.
2015-04-02 00:10:46 +00:00
Joe Topjian 99ac8b4410 Compute Floating IP Test Update
Changes the test to require a network UUID rather than a name.
2015-04-01 21:39:54 +00:00
Joe Topjian 67e33a7ac9 Updated compute_instance acceptance tests for floating IPs 2015-04-01 15:39:36 +00:00
Joe Topjian e5f2315bfe Instance volume attach
This commit adds the ability for instances to attach volumes from within their resource.
2015-03-31 09:54:48 -06:00
Jon Perritt b9395b36d2 update client methods 2015-03-31 09:54:47 -06:00
Jon Perritt 17b137c972 go fmt 2015-03-31 09:54:47 -06:00
Jon Perritt a707f8414c compute instance v2 acceptance tests 2015-03-31 09:54:46 -06:00