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

Exec stsc add #2671

Merged
merged 1 commit into from
Oct 21, 2020
Merged

Exec stsc add #2671

merged 1 commit into from
Oct 21, 2020

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Oct 11, 2020

Summary

This adds state updates to the exec command manager, and emits a container event for the monitoring of the exec command in the docker task engine.

Implementation details

Exec Command agent status is tracked in the container. I added fields to the ExecCommandAgentMetadata, but kept the actual agent status directly in the container itself. (This might migrate to the Metadata in future, but it breaks a whole lot of tests so I'd prefer to leave it where it is for now.)
Via the execcmd manager, the docker task engine will update the container and metadata state with the StartedAt time as well as the reason for any error (StoppedReason-> ManagedAgent.Reason).
The docker task engine will emit the container event during its monitoring cycle.

Testing

Ran All unit tests locally and updated in place.
I'm letting MACIS run the rest and will update as necessary.

New tests cover the changes: yes

Description for the changelog

Update Execute Command Agent state and emit container events for that state.

Licensing

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

@fierlion fierlion force-pushed the exec_STSC_add branch 2 times, most recently from f51948d to 987b478 Compare October 13, 2020 23:04
@fierlion fierlion changed the title [draft] Exec stsc add Exec stsc add Oct 13, 2020
agent/engine/docker_task_engine_test.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine_test.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine_test.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
@fierlion fierlion changed the title Exec stsc add [Revision WIP] Exec stsc add Oct 15, 2020
@fierlion fierlion force-pushed the exec_STSC_add branch 2 times, most recently from 5830ccb to 3d11623 Compare October 15, 2020 20:14
@fierlion fierlion changed the title [Revision WIP] Exec stsc add Exec stsc add Oct 15, 2020
@fierlion fierlion changed the title Exec stsc add [WIP] Exec stsc add Oct 17, 2020
@fierlion fierlion changed the title [WIP] Exec stsc add Exec stsc add Oct 19, 2020
agent/engine/docker_task_engine_test.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine_test.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine.go Show resolved Hide resolved
agent/engine/docker_task_engine.go Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Outdated Show resolved Hide resolved
agent/engine/execcmd/manager_start_linux.go Show resolved Hide resolved
@fierlion fierlion force-pushed the exec_STSC_add branch 2 times, most recently from cb0d6f6 to 19ea5d2 Compare October 20, 2020 21:58
agent/engine/docker_task_engine.go Show resolved Hide resolved
agent/engine/docker_task_engine.go Outdated Show resolved Hide resolved
agent/engine/docker_task_engine.go Outdated Show resolved Hide resolved
@fierlion fierlion merged commit e5bf1b6 into aws:feature/ecs_exec Oct 21, 2020
@fierlion fierlion deleted the exec_STSC_add branch October 21, 2020 23:34
fierlion added a commit to fierlion/amazon-ecs-agent that referenced this pull request Dec 3, 2020
fierlion added a commit to fierlion/amazon-ecs-agent that referenced this pull request Dec 3, 2020
angelcar pushed a commit to angelcar/amazon-ecs-agent that referenced this pull request Dec 29, 2020
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.

4 participants