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

Add ecs-serviceconnect to CNI and Agent build scripts #3482

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

yinyic
Copy link
Contributor

@yinyic yinyic commented Nov 11, 2022

Summary

Add ecs-serviceconnect to CNI and Agent build scripts invoked by make target dockerfree-agent-image.

We are seeing below error when running SC:

error="add network failed: failed to find plugin \"ecs-serviceconnect\" in path [/amazon-ecs-cni-plugins]"

Implementation details

Testing

New tests cover the changes: no

% sudo make dockerfree-agent-image
...
Built ecs-serviceconnect plugin.
...
+ cp ./misc/plugins/ecs-serviceconnect rootfs/amazon-ecs-cni-plugins/ecs-serviceconnect
...

Using the generated ECS Agent image, I replaced the ECS Agent on an existing ECS Optimized AMI;

Before replacing, ecs-serviceconnect binary is missing

$ docker ps
CONTAINER ID   IMAGE                            COMMAND    CREATED          STATUS                    PORTS     NAMES
5f4144ccd269   amazon/amazon-ecs-agent:latest   "/agent"   47 minutes ago   Up 47 minutes (healthy)             ecs-agent
[ec2-user@ip-172-31-3-30 ~]$ docker export 5f4144ccd269 | tar -tf - | grep plugins
amazon-ecs-cni-plugins/
amazon-ecs-cni-plugins/aws-appmesh
amazon-ecs-cni-plugins/ecs-bridge
amazon-ecs-cni-plugins/ecs-eni
amazon-ecs-cni-plugins/ecs-ipam
amazon-ecs-cni-plugins/vpc-branch-eni
etc/docker/plugins/
run/docker/plugins/

After replacing, ecs-serviceconnect is now present

$ docker ps
CONTAINER ID   IMAGE                            COMMAND    CREATED         STATUS                            PORTS     NAMES
4fd68939ffba   amazon/amazon-ecs-agent:latest   "/agent"   3 seconds ago   Up 2 seconds (health: starting)             ecs-agent
[ec2-user@ip-172-31-3-30 ~]$ docker export 4fd68939ffba | tar -tf - | grep plugins
amazon-ecs-cni-plugins/
amazon-ecs-cni-plugins/aws-appmesh
amazon-ecs-cni-plugins/ecs-bridge
amazon-ecs-cni-plugins/ecs-eni
amazon-ecs-cni-plugins/ecs-ipam
amazon-ecs-cni-plugins/ecs-serviceconnect
amazon-ecs-cni-plugins/vpc-branch-eni
etc/docker/plugins/
run/docker/plugins/

Description for the changelog

Add ecs-serviceconnect to CNI and Agent build scripts

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yinyic yinyic requested a review from a team as a code owner November 11, 2022 23:01
@Realmonia
Copy link
Contributor

Can you change target to aws:dev?

@yinyic yinyic changed the base branch from master to dev November 11, 2022 23:09
@yinyic yinyic merged commit e8d24d7 into aws:dev Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants