-
Notifications
You must be signed in to change notification settings - Fork 613
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
fix gmsa,fsx capability bug #3540
Conversation
9e6e33f
to
94fe265
Compare
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.
LGTM
Reran the failed tests one more time. |
GMSACapable: true, | ||
FSxWindowsFileServerCapable: true, | ||
GMSACapable: BooleanDefaultFalse{Value: ExplicitlyDisabled}, | ||
FSxWindowsFileServerCapable: BooleanDefaultFalse{Value: ExplicitlyDisabled}, |
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.
Here we are changing the default FSsWindowsCapability from true to false, but I don't see where it's being enabled. This is a behavior change, (as FSx Windows has been available for 2 years). Can you point out where this is being enabled?
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.
I found the following initialization code for FSxWindowsFileServerCapable, can we confirm that this is still applicable?
func parseFSxWindowsFileServerCapability() bool { |
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.
yes the area that Yash has linked is the exact area where we determine whether to advertise the FXs and gMSA capabilities. We should not default advertise gMSA and FSx because not all machines are domain joined.
Summary
This pull request fixes how the Agent determines whether it is gMSA and fsx capable. Currently when either of these capabilities are set to false, the
config.mergeDefaultConfig(errs)
line will set these back to true on Windows since the lhs is the boolean false and the default config (rhs) contains the boolean true.Implementation details
This fix is done by changing the native
boolean
to now useBooleanDefaultFalse
Testing
This change was tested both by using unit tests and a custom ecs agent installed on a windows ec2 instance which was connected to a cluster. The logs were viewed to see what capabilities were advertised upon agent startup.
New tests cover the changes:
yes
Description for the changelog
Bug - Fixed a bug that incorrectly advertised the gMSA and fsx capability
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.