ecs-deploy icon indicating copy to clipboard operation
ecs-deploy copied to clipboard

Failing to change organization

Open jeremypumphrey opened this issue 8 years ago • 2 comments

When I use ecs-deploy to change organization and tag, such as from ctrp/ctrp-frontend:XXX to fnlcr/ctrp-frontend:05-02-17-1654 I end up running ctrp/ctrp-frontend:05-02-17-1044. Seems it doesn't change the organization passed to it, just the tag?

screen shot 2017-05-03 at 1 15 34 pm

Appears to work from the docker output, but in AWS it only changed the tag.

$ docker run -it --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION=us-east-1 silintl/ecs-deploy --cluster CTRP-IntTest-Frontend --service-name CTRP-ctrp-frontend-INTTEST -i $DOCKER_IMAGE:$DATE
Unable to find image 'silintl/ecs-deploy:latest' locally
latest: Pulling from silintl/ecs-deploy
Status: Downloaded newer image for silintl/ecs-deploy:latest
Using image name: **fnlcr/ctrp-frontend:05-02-17-1654**
Current task definition: arn:aws:ecs:us-east-1:127516845550:task-definition/CTRP-ctrp-frontend-INTTEST:64
New task definition: arn:aws:ecs:us-east-1:127516845550:task-definition/CTRP-ctrp-frontend-INTTEST:65
ERROR: New task definition not running within 90 seconds

jeremypumphrey avatar May 03 '17 18:05 jeremypumphrey

@jeremypumphrey You're right, it will only updates the tag for a container found in the task definition with the same image name you provided. Early on it did not do that and if you have a multi-container task definition it was updating the image on all containers which was a problem. So now it only updates the container found with the same image name. Perhaps some better output is needed when creating the new task definition to be clear about if any containers were actually updated. I'll keep this issue open to remind me to do that.

At this time to change the org or overall image you'd need to update it directly through ECS web interface or CLI. Since ecs-deploy is really intended for CI/CD I'm not sure the use case of fully changing the image is very common. I'm open to a new feature/flag to replace an image with a new one, so it would match for current and replace with a new one.

fillup avatar May 05 '17 16:05 fillup

Ran into this issue too, would be useful to have some kind of output of what the image is on the new task definition

ebramanti avatar May 18 '17 06:05 ebramanti