Skip to content
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

r/virtual_machine: Fix broken acceptance tests and CD drives #427

Merged
merged 2 commits into from
Mar 9, 2018

Conversation

vancluever
Copy link
Contributor

This does a few things:

  • Looks like some acceptance test were broken - first one was due to
    something changing in RancherOS that does not allow for the proper
    hot-remove of virtual NICs anymore. I've adjusted this test so it
    powers off the VM first, which is not so much an issue as we aren't
    testing for a hot-remove anyway, but more to make sure that things are
    consistent in state.
  • The vApp property tests were missing settings for thin_provisioned and
    eagerly_scrub, which should be coming from the template data sources.
    These were failing as a result as the CoreOS OVA does not use thin
    provisioned disks.
  • Finally, r/virtual_machine: Add support for remote backed CDROMs #421 introduced a change where we were actually failing if we
    didn't recognize the CD drive type. There are a few we still don't
    support, namely passthrough CD drives. I've changed this to a debug log
    message, and a unsetting of all parameters. This should ensure that
    devices that aren't recognized but need to be changed to a recognized
    device are properly accounted for in the diff, in addition to removing
    unrecognized devices in the event no CDROM drive is necessary.

This does a few things:

* Looks like some acceptance test were broken - first one was due to
something changing in RancherOS that does not allow for the proper
hot-remove of virtual NICs anymore. I've adjusted this test so it
powers off the VM first, which is not so much an issue as we aren't
testing for a hot-remove anyway, but more to make sure that things are
consistent in state.
* The vApp property tests were missing settings for thin_provisioned and
eagerly_scrub, which should be coming from the template data sources.
These were failing as a result as the CoreOS OVA does not use thin
provisioned disks.
* Finally, #421 introduced a change where we were actually failing if we
didn't recognize the CD drive type. There are a few we still don't
support, namely passthrough CD drives. I've changed this to a debug log
message, and a unsetting of all parameters. This should ensure that
devices that aren't recognized but need to be changed to a recognized
device are properly accounted for in the diff, in addition to removing
unrecognized devices in the event no CDROM drive is necessary.
@vancluever vancluever added the bug Type: Bug label Mar 9, 2018
@vancluever vancluever requested a review from a team March 9, 2018 01:50
Copy link

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM 👍

// devices, this ensures we don't fail on CDROM device types we don't
// support right now, such as passthrough devices. We might support these
// later.
log.Printf("%s: [DEBUG] Unknown CDROM type %T, clearing all attributes", r, backing)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this behaviour should probably also be specified in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Added an extra blurb on this one in the docs.

* Added some monospace to some spots that should have had it.
* Added a blurb about how we handle drives currently unsupported by
Terraform.
@vancluever vancluever merged commit 7114d44 into master Mar 9, 2018
@vancluever vancluever deleted the b-fix-acceptance-tests-and-unknown-cdrom branch March 31, 2018 17:41
@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants