aws-otel-collector
aws-otel-collector copied to clipboard
ECS ec2 sidecar bug: "Links are not supported when networkMode=awsvpc."
Describe the bug Links are not supported when networkMode=awsvpc.
The link should beempty and the localhost reference should be used in the emitter section?
Thanks for creating this issue and bringing it to our attention. Can you provide some context please? Like, how can we reproduce it, version used, etc.
Here is our taskdefinition, we copied the wanted sections from the ecs-ecs-sidecar.json.
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::<hidden account id>:role/AWSOTelExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": {
"logDriver": "awslogs",
"secretOptions": null,
"options": {
"awslogs-group": "/ecs/aws-otel-EC2",
"awslogs-region": "eu-central-1",
"awslogs-create-group": "True",
"awslogs-stream-prefix": "ecs"
}
},
"entryPoint": null,
"portMappings": [
{
"hostPort": 2000,
"protocol": "udp",
"containerPort": 2000
},
{
"hostPort": 4317,
"protocol": "tcp",
"containerPort": 4317
},
{
"hostPort": 8125,
"protocol": "udp",
"containerPort": 8125
}
],
"command": [
"--config=/etc/ecs/ecs-default-config.yaml"
],
"linuxParameters": null,
"cpu": 0,
"environment": [],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "amazon/aws-otel-collector",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "aws-otel-collector"
},
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/aws-otel-EC2",
"awslogs-region": "{{region}}",
"awslogs-stream-prefix": "ecs",
"awslogs-create-group": "True"
}
},
"portMappings": [
{
"hostPort": 8000,
"protocol": "tcp",
"containerPort": 8000
}
],
"environment": [
{
"name": "AWS_XRAY_DAEMON_ADDRESS",
"value": "aws-otel-collector:2000"
}
],
"image": "public.ecr.aws/aws-otel-test/aws-otel-goxray-sample-app:latest",
"essential": false,
"links": [
"aws-otel-collector"
],
"name": "aws-otel-emitter",
"dependsOn": [
{
"containerName": "aws-otel-collector",
"condition": "START"
}
]
},
{
"dnsSearchDomains": [],
"environmentFiles": null,
"logConfiguration": {
"logDriver": "awslogs",
"secretOptions": null,
"options": {
"awslogs-group": "ECSLogGroup/ECS-TEST-CLUSTER-ECSCluster-nGiOlxFlEaod",
"awslogs-region": "eu-central-1",
"awslogs-stream-prefix": "dotnet-api"
}
},
"entryPoint": [],
"portMappings": [
{
"hostPort": 80,
"protocol": "tcp",
"containerPort": 80
}
],
"command": [],
"linuxParameters": null,
"cpu": 0,
"environment": [],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": [],
"mountPoints": [
{
"readOnly": null,
"containerPath": "/fileStorage",
"sourceVolume": "my-vol"
}
],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": [],
"memory": null,
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "<hidden account id>.dkr.ecr.eu-central-1.amazonaws.com/nginx:latest",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": [],
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": null,
"dockerLabels": {},
"systemControls": [],
"privileged": false,
"name": "nginx"
}
],
"placementConstraints": [],
"memory": "512",
"taskRoleArn": "arn:aws:iam::<hidden account id>:role/AWSOTelRole",
"family": "test-nginx",
"pidMode": null,
"networkMode": "awsvpc",
"runtimePlatform": null,
"cpu": null,
"inferenceAccelerators": null,
"proxyConfiguration": null,
"volumes": [
{
"fsxWindowsFileServerVolumeConfiguration": null,
"efsVolumeConfiguration": null,
"name": "my-vol",
"host": {
"sourcePath": null
},
"dockerVolumeConfiguration": null
}
],
"tags": []
}
And the ECS console gives me the following error when I want to create a task definition: "Unable to create a new revision of Task Definition test-nginx:1 Links are not supported when networkMode=awsvpc."
So i want to find a solution for this problem.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been marked as stale for 30 days with no activity.