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

[redshift] Single node cluster creation fails with cloudformation error #8887

Closed
dirkgomez opened this issue Jul 3, 2020 · 2 comments
Closed
Assignees
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md in-progress This issue is being actively worked on. p2

Comments

@dirkgomez
Copy link
Contributor

When trying to create a single-node cluster in our acceptance environment, creation fails at the cloudformation level:

Number of nodes must be not be supplied for cluster type single-node

Reproduction Steps

Here's the relevant code snippet that creates the erroneous cloudformation:

    new redshift.Cluster(this, 
      `Cluster${this.stackName}`,
      {
        ...
        clusterType: environment == 'prd' ? redshift.ClusterType.MULTI_NODE : redshift.ClusterType.SINGLE_NODE,
       ...

### Error Log

Number of nodes must be not be supplied for cluster type single-node


The created cloudformation templated indeed has a:      NumberOfNodes: 1

### Environment

  - **CLI Version      : ** 1.49.1
  - **Framework Version: ** 1.49.1
  - **Node.js Version:** 14.4.0
  - **OS               :** Mac OS
  - **Language (Version):** TypeScript

### Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->




--- 

This is :bug: Bug Report
@dirkgomez dirkgomez added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2020
@github-actions github-actions bot added the @aws-cdk/aws-redshift Related to Amazon Redshift label Jul 3, 2020
@nija-at
Copy link
Contributor

nija-at commented Jul 16, 2020

Looks like a bug coming from

const nodeCount = props.numberOfNodes !== undefined ? props.numberOfNodes : (clusterType === ClusterType.MULTI_NODE ? 2 : 1);
.

This can be worked around by using property overrides and explicitly unsetting the NumberOfNodes property.

@nija-at nija-at added good first issue Related to contributions. See CONTRIBUTING.md p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 16, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jul 27, 2020
@nija-at nija-at added the effort/small Small work item – less than a day of effort label Aug 10, 2020
@SomayaB SomayaB assigned njlynch and unassigned nija-at Aug 20, 2020
@njlynch
Copy link
Contributor

njlynch commented Sep 11, 2020

Dupe of #9961, which was merged two weeks ago and released in 1.62.0.

@njlynch njlynch closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md in-progress This issue is being actively worked on. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants