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

ECS Deamon mode sets DesiredCount in CloudFormation yml #1197

Closed
alex-ring opened this issue Nov 16, 2018 · 2 comments · Fixed by #1199
Closed

ECS Deamon mode sets DesiredCount in CloudFormation yml #1197

alex-ring opened this issue Nov 16, 2018 · 2 comments · Fixed by #1199
Labels
bug This issue is a bug.

Comments

@alex-ring
Copy link

alex-ring commented Nov 16, 2018

When trying to use ECS daemon, i get an error saying

The daemon scheduling strategy does not support a desired count for services. Remove the desired count value and try again

When i do not have a specified DesiredCount.

new ecs.Ec2Service(parent, "EcsService", {
    cluster: ...,
    taskDefinition: ...,
    daemon: true,
});

Adds DesiredCount: 1 to cloud formation yml

@alex-ring
Copy link
Author

resolved by doing this

    const service = new ecs.Ec2Service(parent, "EcsService", {
        cluster: ...,
        taskDefinition: ...,
        daemon: true,
        maximumPercent: 100
    });

    const resource = service.findChild("Service") as any;
    resource.addPropertyDeletionOverride('DesiredCount');

@rix0rrr rix0rrr added the bug This issue is a bug. label Nov 17, 2018
@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 17, 2018

Thanks for reporting!

rix0rrr pushed a commit that referenced this issue Nov 17, 2018
When configuring a service in Daemon mode, DesiredCount
should not be emitted.

Fixes #1197.
eladb pushed a commit that referenced this issue Nov 18, 2018
When configuring a service in Daemon mode, DesiredCount
should not be emitted.

Fixes #1197.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants