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

Data sources hang with Node >=12.11.0 #3309

Closed
clstokes opened this issue Oct 8, 2019 · 4 comments
Closed

Data sources hang with Node >=12.11.0 #3309

clstokes opened this issue Oct 8, 2019 · 4 comments
Assignees
Labels
p0 A bug severe enough to interrupt existing work
Milestone

Comments

@clstokes
Copy link
Contributor

clstokes commented Oct 8, 2019

After upgrading to macOS Catalina my Pulumi applications that use data sources (e.g. aws.getAmi()) hang on these data sources call and never complete.

Downgrading to Node 10 (LTS) resolves this.

Output

% uname -a
Darwin Camerons-MacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64
% pulumi version
v1.2.0
% node -v
v12.11.1
% pulumi up
Previewing update (dev):

     Type                 Name                       Plan        Info
     pulumi:pulumi:Stack  demo-aws-ts-webserver-dev  running...  about to invoke

Repro code

import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

console.log("about to invoke");

export const amiId = aws.getAmi({
    owners: ["099720109477"], // Ubuntu
    mostRecent: true,
    filters: [
        { name: "name", values: ["ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"] },
    ],
}).id;

console.log("after ami");

/**
 * Resources
 */
const privateNetwork = "10.0.0.0/16";

// create a vpc
const vpc = new awsx.ec2.Vpc("web-vpc", {
    numberOfAvailabilityZones: 1,
    subnets: [{ type: "public" }],
    tags: {
        Name: "web-vpc",
    }
});

console.log("after vpc");

// create a security group
const webSg = new aws.ec2.SecurityGroup("web-firewall", {
    vpcId: vpc.id,
    name: "web-firewall",
    ingress: [
        { protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: [privateNetwork] },
    ],
});

console.log("after websg");

const webServer = new aws.ec2.Instance("web-server", {
    tags: {
        "project": "demo",
        "Name": "web-server",
    },
    instanceType: aws.ec2.T2InstanceMedium,
    associatePublicIpAddress: false,
    ami: amiId,                   // reference from "./ami"
    subnetId: vpc.publicSubnetIds[0], // reference the subnet created by awsx
    vpcSecurityGroupIds: [webSg.id],  // reference the group created above
});

console.log("after webserver");

export const instanceIp = webServer.publicIp;
@lukehoban lukehoban added the p1 A bug severe enough to be the next item assigned to an engineer label Oct 8, 2019
@lukehoban lukehoban added this to the 0.28 milestone Oct 9, 2019
@lukehoban
Copy link
Member

We’ve heard reports of this on CentOS as well - so this does not appear to be limited to Catalina.

@lukehoban lukehoban changed the title Data sources hang with macOS Catalina and Node 12 Data sources hang with Node 12 Oct 11, 2019
@lukehoban
Copy link
Member

I confirmed that for at least one test program, the hangs occur on >=12.11.0, but not on 12.10.0. So it appears there is some change specifically in Node 12.11.0 that triggered this.

@lukehoban lukehoban changed the title Data sources hang with Node 12 Data sources hang with Node >=12.11.0 Oct 11, 2019
@lukehoban
Copy link
Member

Link to changelog for Node 12.11.0. If we could build a repro outside of Pulumi - it's theoretically possible we could report and get this fixed in Node for a future patch release.

https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#2019-09-25-version-12110-current-bridgear

@lukehoban lukehoban added p0 A bug severe enough to interrupt existing work and removed p1 A bug severe enough to be the next item assigned to an engineer labels Oct 11, 2019
@CyrusNajmabadi
Copy link
Contributor

CyrusNajmabadi commented Oct 15, 2019

Fixed with #3325.

Customers running into this should upgrade their Pulumi to the latest version and should use @pulumi/pulumi v1.3.2 or higher.

Note: because @pulumi/pulumi can be pulled in from multiple places in a project, ensure your lock file isn't pinning this to an older version in some other package (i.e. through @pulumi/aws or @pulumi/awsx).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 A bug severe enough to interrupt existing work
Projects
None yet
Development

No branches or pull requests

3 participants