Amazon ECS 배포 전략 업데이트 문제 해결
이 섹션에서는 배포 전략을 마이그레이션하는 경우 발생할 수 있는 일반적인 문제에 대한 솔루션을 제공합니다.
여러 서비스 개정 또는 태스크 세트
다음 문제는 배포에 대한 여러 서비스 개정이 있는 상황과 관련이 있습니다.
- ECS 배포 컨트롤러 업데이트하는 경우 여러 태스크 세트
-
오류 메시지:
Updating the deployment controller is not supported when there are multiple tasksets in the service. Please ensure your service has only one taskset and try again.솔루션: 이 오류는 활성 태스크 세트가 여러 개인 서비스의 배포 컨트롤러 유형을 변경하려는 경우 발생합니다.
CODE_DEPLOY또는EXTERNAL배포 컨트롤러에서 이 문제를 해결하는 방법:-
현재 태스크 세트를 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].taskSets" -
진행 중인 배포가 완료될 때까지 기다리세요.
-
새 배포를 강제로 실행하여 태스크 세트를 정리하세요.
aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--force-new-deployment -
필요한 경우 추가 태스크 세트를 수동으로 삭제하세요.
aws ecs delete-task-set --clusteryour-cluster-name--serviceyour-service-name--task-settask-set-id -
태스크 세트가 하나만 남게 되면 배포 컨트롤러 업데이트를 다시 시도하세요.
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
ECS배포 컨트롤러 업데이트 시 기본 태스크 세트 누락-
오류 메시지:
Updating the deployment controller requires a primary taskset in the service. Please ensure your service has a primary taskset and try again.솔루션: 이 오류는 기본 태스크 세트가 없는 서비스의 배포 컨트롤러 유형을 변경하려는 경우 발생합니다. 이 문제를 해결하려면:
-
서비스 상태 및 태스크 세트를 확인하세요. 서비스에 태스크 세트가 있으면
ACTIVE로 표시됩니다.aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].taskSets[*].[status,id]ACTIVE상태의 태스크 세트가 없으면 배포를 마이그레이션하세요. 자세한 내용은 마이그레이션 접근 방식을 참조하세요. -
서비스에 실행 중인 태스크가 없으면 서비스를 업데이트하여 하나 이상의 태스크를 배포하세요.
aws ecs update-service-primary-task-set --clusteryour-cluster-name--serviceyour-service-name--primary-task-set your-taskset-id그러면 서비스에서 이전에
ACTIVE상태였던 태스크 세트를PRIMARY상태로 표시합니다. -
태스크가 안정적인 실행 상태에 도달할 때까지 기다리세요. 다음을 통해 상태를 확인할 수 있습니다.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].deployments" -
서비스에 실행 중인 태스크가 포함된 기본 태스크 세트가 있으면 배포 컨트롤러 업데이트를 다시 시도하세요.
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
배포 실패 감지 유형과 배포 컨트롤러 간 불일치
다음 문제는 배포 실패 감지 유형과 배포 컨트롤러 간 불일치와 관련이 있습니다.
- 비ECS 컨트롤러와 배포 회로 차단기
-
오류 메시지:
Deployment circuit breaker feature is only supported with ECS deployment controller. Update to ECS deployment controller and try again.솔루션: 이 오류는
ECS배포 컨트롤러를 사용하지 않는 서비스에서 배포 회로 차단기 기능을 활성화하려는 경우 발생합니다. 배포 회로 차단기는ECS배포 컨트롤러와만 호환됩니다.-
서비스의 현재 배포 컨트롤러를 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].deploymentController" -
ECS배포 컨트롤러를 사용하도록 서비스를 업데이트하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-controller type=ECS -
서비스가
ECS배포 컨트롤러를 사용하면 배포 회로 차단기를 활성화하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}"
자세한 내용은 Amazon ECS 배포 회로 차단기가 장애를 감지하는 방법 섹션을 참조하세요.
-
- 비ECS 컨트롤러와 경보 기반 롤백
-
오류 메시지:
Alarm based rollback feature is only supported with ECS deployment controller. Update to ECS deployment controller and try again.솔루션: 이 오류는
ECS배포 컨트롤러를 사용하지 않는 서비스에서 경보 기반 롤백을 구성하려는 경우 발생합니다. 경보 기반 롤백 기능은ECS배포 컨트롤러와만 호환됩니다.-
서비스의 현재 배포 컨트롤러를 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].deploymentController" -
ECS배포 컨트롤러를 사용하도록 서비스를 업데이트하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-controller type=ECS -
서비스가
ECS배포 컨트롤러를 사용하면 경보 기반 롤백을 구성하세요.aws ecs update-service --clusteryour-cluster-name--servicesyour-service-name--deployment-configuration "alarms={alarmNames=[your-alarm-name],enable=true,rollback=true}"
자세한 내용은 CloudWatch 경보가 Amazon ECS 배포 장애를 감지하는 방법 섹션을 참조하세요.
-
Service Connect와 배포 컨트롤러 간 불일치
다음 문제는 Service Connect와 배포 컨트롤러 간 불일치와 관련이 있습니다.
- Service Connect에서
EXTERNAL컨트롤러 -
오류 메시지:
The EXTERNAL deployment controller type is not supported for services using Service Connect.솔루션: 이 오류는 Service Connect가 활성화된 서비스에서
EXTERNAL배포 컨트롤러를 사용하려는 경우 발생합니다.EXTERNAL컨트롤러는 Service Connect와 호환되지 않습니다.-
서비스에 Service Connect가 활성화되어 있는지 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--services your-service-name --query "services[0].serviceConnectConfiguration" -
EXTERNAL배포 컨트롤러를 사용해야 하는 경우 서비스를 업데이트하여 Service Connect를 비활성화하세요.aws ecs update-service --cluster your-cluster-name --service your-service-name --service-connect-configuration "{}" -
또는 Service Connect를 사용해야 하는 경우
ECS배포 컨트롤러를 대신 사용하세요.aws ecs update-service --cluster your-cluster-name --service your-service-name --deployment-controller type=ECS
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
- 비ECS 컨트롤러와 Service Connect
-
오류 메시지:
Service Connect feature is only supported with ECS (rolling update) deployment controller. Update to ECS deployment controller and try again.솔루션: 이 오류는
ECS배포 컨트롤러를 사용하지 않는 경우에 Service Connect를 활성화하려는 경우 발생합니다. Service Connect 기능은ECS배포 컨트롤러와만 호환됩니다.-
서비스의 현재 배포 컨트롤러를 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].deploymentController" -
ECS 배포 컨트롤러를 사용하도록 서비스를 업데이트하세요.
aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-controller type=ECS -
서비스가 ECS 배포 컨트롤러를 사용하면 Service Connect를 활성화하세요.
aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--service-connect-configuration "enabled=true,namespace=your-namespace"
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
컨트롤러 유형과 예약 전략 간 불일치
다음 문제는 컨트롤러 유형과 예약 전략 간 불일치와 관련이 있습니다.
DAEMON예약 전략과CODE_DEPLOY컨트롤러-
오류 메시지:
The CODE_DEPLOY deployment controller type is not supported for services using the DAEMON scheduling strategy.솔루션: 이 오류는
DAEMON예약 전략을 사용하는 서비스에서 CODE_DEPLOY 배포 컨트롤러를 사용하려는 경우 발생합니다.CODE_DEPLOY컨트롤러는REPLICA예약 전략과만 호환됩니다.-
서비스의 현재 예약 전략을 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].schedulingStrategy" -
블루/그린 배포가 필요한 경우
REPLICA예약 전략을 사용하도록 서비스를 변경하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--scheduling-strategy REPLICA -
또는
DAEMON예약 전략을 사용해야 하는 경우ECS배포 컨트롤러를 대신 사용하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-controller type=ECS
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
- DAEMON 예약 전략과 EXTERNAL 컨트롤러
-
오류 메시지:
The EXTERNAL deployment controller type is not supported for services using the DAEMON scheduling strategy.솔루션: 이 오류는 DAEMON 예약 전략을 사용하는 ECS 서비스에서 EXTERNAL 배포 컨트롤러를 사용하려는 경우 발생합니다. EXTERNAL 컨트롤러는 REPLICA 예약 전략과만 호환됩니다.
-
서비스의 현재 예약 전략을 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].schedulingStrategy" -
EXTERNAL배포 컨트롤러를 사용해야 하는 경우REPLICA예약 전략을 사용하도록 서비스를 변경하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--scheduling-strategy REPLICA -
또는
DAEMON예약 전략을 사용해야 하는 경우ECS배포 컨트롤러를 대신 사용하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--deployment-controller type=ECS
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
- 외부 시작 유형과 서비스 레지스트리
-
오류 메시지:
Service registries are not supported for external launch type.솔루션: 이 오류는
EXTERNAL시작 유형을 사용하는 서비스에서 서비스 검색(서비스 레지스트리)을 구성하려는 경우 발생합니다. 서비스 검색은EXTERNAL시작 유형과 호환되지 않습니다.-
서비스의 현재 시작 유형을 확인하세요.
aws ecs describe-services --clusteryour-cluster-name--servicesyour-service-name--query "services[0].launchType" -
서비스 검색이 필요한 경우
EC2또는FARGATE시작 유형을 사용하도록 서비스를 변경하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--launch-type FARGATE -
또는
EXTERNAL시작 유형을 사용해야 하는 경우 서비스 레지스트리 구성을 제거하세요.aws ecs update-service --clusteryour-cluster-name--serviceyour-service-name--service-registries "[]"
자세한 내용은 Amazon ECS 서비스 배포 컨트롤러 및 전략 섹션을 참조하세요.
-
배포 컨트롤러 업데이트 되돌리기
이전 배포 컨트롤러로 돌아가려는 경우 다음 중 하나를 수행할 수 있습니다.
-
CloudFormation를 사용하는 경우 이전 템플릿을 사용하여 새 스택을 생성할 수 있습니다. 자세한 내용은 CloudFormation 사용 설명서에서 스택 생성을 참조하세요.
-
Amazon ECS 콘솔 또는 AWS CLI를 사용한 경우 서비스를 업데이트할 수 있습니다. 자세한 내용은 Amazon ECS 서비스 업데이트 섹션을 참조하세요.
update-service 명령을 사용하는 경우
--deployment-controller옵션을 사용하고 이전 배포 컨트롤러로 설정합니다.