Skip to content

Conversation

@trawler
Copy link
Contributor

@trawler trawler commented Oct 8, 2018

resolves #85

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 8, 2018
@frobware frobware changed the title remove hard-coding of AWS instnace type remove hard-coding of AWS instance type Oct 8, 2018
@enxebre
Copy link
Member

enxebre commented Oct 8, 2018

is the installer passing this value? what happens if this is empty?

@trawler
Copy link
Contributor Author

trawler commented Oct 8, 2018

/test e2e

@enxebre
Copy link
Member

enxebre commented Oct 8, 2018

@trawler this is probably a legit fail based on my comment above as the test config don't set that value

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 8, 2018
@smarterclayton
Copy link
Contributor

/test e2e-aws

@trawler
Copy link
Contributor Author

trawler commented Oct 9, 2018

/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 Oct 9, 2018
@enxebre
Copy link
Member

enxebre commented Oct 10, 2018

@trawler The installer is currently not setting this value, we'll want a counter part PR to set this from the installer config.
How everr looking at the actuator https://github.com/openshift/cluster-api-provider-aws/blob/master/cloud/aws/actuators/machine/actuator.go#L381
type RunInstancesInput struct would use a default value

// The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
	// in the Amazon Elastic Compute Cloud User Guide.
	//
	// Default: m1.small
	InstanceType *string `type:"string" enum:"InstanceType"

and the e2e-aws shows green, so not sure why our e2e was failing in your previews commit when the value was not set in the config, can you please verify this to ensure there's no gaps from installer->actuator?

@trawler
Copy link
Contributor Author

trawler commented Oct 11, 2018

@trawler The installer is currently not setting this value, we'll want a counter part PR to set this from the installer config.
How everr looking at the actuator https://github.com/openshift/cluster-api-provider-aws/blob/master/cloud/aws/actuators/machine/actuator.go#L381
type RunInstancesInput struct would use a default value

// The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
	// in the Amazon Elastic Compute Cloud User Guide.
	//
	// Default: m1.small
	InstanceType *string `type:"string" enum:"InstanceType"

and the e2e-aws shows green, so not sure why our e2e was failing in your previews commit when the value was not set in the config, can you please verify this to ensure there's no gaps from installer->actuator?

@enxebre I can confirm that when the instanceType is not being set, installation fails with this reply from the server:

time="2018-10-11T12:55:03Z" level=error msg="error creating EC2 instance: InvalidParameterValue: Invalid value '' for InstanceType.\n\tstatus code: 400, request id: 7b516eca-f3f4
-40cb-b6c7-5d3b87057ccb" controller=awsMachine machine=openshift-cluster-api/worker-xkpbr

I'm not sure why the comment you quoted claims to set a default value, but actually, the aws-sdk will fail the install for an empty InstanceType with an InvalidParams error:
https://github.com/aws/aws-sdk-go/blob/master/service/ec2/api.go#L23606

// Validate inspects the fields of the type to determine if they are valid.
func (s *AllocateHostsInput) Validate() error {
  invalidParams := request.ErrInvalidParams{Context: "AllocateHostsInput"}
  if s.AvailabilityZone == nil {
    invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
  }
  if s.InstanceType == nil {
    invalidParams.Add(request.NewErrParamRequired("InstanceType"))
  }

@trawler
Copy link
Contributor Author

trawler commented Oct 11, 2018

/test e2e-aws

@paulfantom paulfantom closed this Oct 11, 2018
@paulfantom paulfantom reopened this Oct 11, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: trawler

If they are not already assigned, you can assign the PR to them by writing /assign @trawler in a comment when ready.

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

The pull request process is described here

Details 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 removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2018
@trawler
Copy link
Contributor Author

trawler commented Oct 12, 2018

/test e2e-aws

@trawler
Copy link
Contributor Author

trawler commented Oct 12, 2018

e2e-aws test failing for:

* aws_eip.nat_eip.3: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: 2f81367d-af16-4462-b41e-84b7fc3ba5a2

@paulfantom
Copy link
Contributor

paulfantom commented Oct 12, 2018

/test e2e-aws
/test images

@openshift-ci-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
ci/prow/images 9c94eee link /test images
ci/prow/e2e-aws 9c94eee link /test e2e-aws

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.

Details

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
Copy link
Member

wking commented Oct 12, 2018

is the installer passing this value? what happens if this is empty?

Where do we want the default value to live? If it's here, that's great. If it's in the installer, what happens if a user later bumps the config to remove the property (in an attempt to revert to the default value)? Or will that sort of adjustment be blocked somehow?

@wking
Copy link
Member

wking commented Oct 12, 2018

Also, it may not be worth sinking time into this if the installer starts creating worker machine-sets directly.

@enxebre
Copy link
Member

enxebre commented Nov 5, 2018

closing as specs are now moved to the installer

@enxebre enxebre closed this Nov 5, 2018
ingvagabund pushed a commit to ingvagabund/machine-api-operator that referenced this pull request Jul 11, 2019
germanparente pushed a commit to germanparente/machine-api-operator that referenced this pull request Sep 23, 2025
OCPCLOUD-2565: Revendor MAO Pausing changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable instance types on AWS?

7 participants