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

Bug 1738354: pkg/asset/machines/aws/machines: Request encrypted root volumes #2160

Closed
wants to merge 2 commits into from

Conversation

wking
Copy link
Member

@wking wking commented Aug 5, 2019

The AWS cluster-API provider just started respecting this property in openshift/cluster-api-provider-aws@99de8f2015 (openshift/cluster-api-provider-aws#245). By asking for it, we'll get encrypted root volumes for compute machines and remove the need for copy-and-encrypting the control-plane machines.

This PR also partially reverts 0c370dd (#1296). This isn't a clean revert; for example, I left the ability to destroy images which are tagged as owned by the cluster. And we're still copy-and-encrypting for the bootstrap machine until the AWS Terraform provider supports requesting encrypted root volumes (hashicorp/terraform-provider-aws#8624). But with this commit, we no longer use the copied AMI for control-plane nodes, which gets us one step closer to having the cluster API provision them without installer intervention.

The AWS cluster-API provider just started respecting this property in
openshift/cluster-api-provider-aws@99de8f2015 (Wire provider spec EBS
volume Encrypted field into ec2.EbsBlockDevice.Encrypted field,
2019-08-05, openshift/cluster-api-provider-aws#245).  By asking for
it, we'll get encrypted root volumes for compute machines and remove
the need for copy-and-encrypting the control-plane machines.
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 5, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2019
@wking wking force-pushed the request-encrypted-root-volumes branch from 441eb9f to dc74ef7 Compare August 5, 2019 18:31
@abhinavdahiya
Copy link
Contributor

The control-plane is still created by the installer right, so this change is a regression that control-plane is not encrypted anymore...

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2019
@wking
Copy link
Member Author

wking commented Aug 5, 2019

e2e-aws failed on:

[Feature:Image][triggers] Image change build triggers TestSimpleImageChangeBuildTriggerFromImageStreamTagSTI [Suite:openshift/conformance/parallel]

fail [k8s.io/kubernetes/test/e2e/framework/framework.go:338]: Aug 5 19:37:52.094: Couldn't delete ns: "e2e-test-image-change-build-triggger-75f82": namespace e2e-test-image-change-build-triggger-75f82 was not deleted with limit: timed out waiting for the condition, namespace is empty but is not yet removed (&errors.errorString{s:"namespace e2e-test-image-change-build-triggger-75f82 was not deleted with limit: timed out waiting for the condition, namespace is empty but is not yet removed"})

Seems unrelated (and like rhbz#1713135).

/retest

@abhinavdahiya
Copy link
Contributor

Also looking at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default and other docs it looks like the setting needs to be enabled region level before the API can use this??

@wking
Copy link
Member Author

wking commented Aug 5, 2019

The control-plane is still created by the installer right, so this change is a regression that control-plane is not encrypted anymore...

Ah, right :p. I'll roll that part back and keep passing the encrypted AMI to Terraform for those machines.

... other docs it looks like the setting needs to be enabled region level before the API can use this??

Yeah, and that's obviously not great. But this PR isn't about that setting (although I've mentioned it in the past in this space); this PR is about explicitly setting a given root volume encrypted. Which Terraform doesn't support yet (hashicorp/terraform-provider-aws#8624), but which the cluster-API provider now does support.

Partially reverts 0c370dd (data/aws: Encrypt the AMI used by the
bootstrap and master machines, 2019-02-22, openshift#1296).  This isn't a clean
revert; for example, I left the ability to destroy images which are
tagged as owned by the cluster.  And we're still copy-and-encrypting
for the bootstrap machine and control-plane machines until the AWS
Terraform provider supports requesting encrypted root volumes [1].
But with this commit, we're now documenting the encryption in a way
that covers both the previous AMI-based encryption used for
bootstrap/control-plane and the new root-volume-based encryption used
for the compute machines, because they come down to encrypted root
volumes regardless of their approach.

[1]: hashicorp/terraform-provider-aws#8624
@wking wking force-pushed the request-encrypted-root-volumes branch from dc74ef7 to 58c6413 Compare August 5, 2019 21:11
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 5, 2019
@wking
Copy link
Member Author

wking commented Aug 5, 2019

Back to copy-and-encrypt AMI IDs for control-plane machines with dc74ef7c5 -> 58c6413.

@abhinavdahiya
Copy link
Contributor

58c6413

doesn't capture the reality that we are still copying AMIs.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 5, 2019

@wking: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-openstack 58c6413 link /test e2e-openstack
ci/prow/e2e-aws-scaleup-rhel7 58c6413 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wking wking changed the title pkg/asset/machines/aws/machines: Request encrypted root volumes Bug 1738354: pkg/asset/machines/aws/machines: Request encrypted root volumes Aug 6, 2019
@openshift-ci-robot
Copy link
Contributor

@wking: This pull request references a valid Bugzilla bug. The bug has been moved to the POST state.

In response to this:

Bug 1738354: pkg/asset/machines/aws/machines: Request encrypted root volumes

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 6, 2019
@sdodson
Copy link
Member

sdodson commented Aug 19, 2019

/close
deferred until PM asks for this

@openshift-ci-robot
Copy link
Contributor

@sdodson: Closed this PR.

In response to this:

/close
deferred until PM asks for this

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wking
Copy link
Member Author

wking commented Nov 15, 2019

Terraform 2.23.0 (which we're pulling in with #2676) is getting us hashicorp/terraform-provider-aws#7757 which might also let us drop the copy-and-encrypt. Worth reopening this now that we have that on the table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants