-
Notifications
You must be signed in to change notification settings - Fork 611
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 fault-injection capability #4325
Conversation
agent/app/agent_capability_unix.go
Outdated
@@ -236,3 +237,19 @@ func (agent *ecsAgent) getTaskENIPluginVersionAttribute() (*ecs.Attribute, error | |||
func defaultIsPlatformExecSupported() (bool, error) { | |||
return true, nil | |||
} | |||
|
|||
// var to allow mocking for checkNetworkTooling | |||
var isNetworkToolingAvailable = checkNetworkTooling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll probably need to implement a no-op/dummy function for non-linux as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented in 1a3ea5b
e3dd23e
to
1a3ea5b
Compare
Summary
Added support to advertise fault injection capability (ecs.capability.fault-injection) to ecs agent when the required network packages are present on the host.
Implementation details
checkNetworkTooling()
to check if the required network packages are available on the host for the capability to be advertised.Testing
iproute-tc
andiptables
package on the host and ranaws ecs describe-container-instances --cluster <cluster-name> --container-instances <instance-id>
ecs.capability.fault-injection
is enabled when the required packages are present on the host.ecs.agent.log
New tests cover the changes: yes
Description for the changelog
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
Does this PR include the addition of new environment variables in the README?
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.