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

fix gmsa,fsx capability bug #3540

Merged
merged 1 commit into from
Feb 13, 2023
Merged

fix gmsa,fsx capability bug #3540

merged 1 commit into from
Feb 13, 2023

Conversation

arun-annamalai
Copy link
Contributor

@arun-annamalai arun-annamalai commented Jan 23, 2023

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 use BooleanDefaultFalse

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.

Copy link
Contributor

@jterry75 jterry75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YashdalfTheGray
Copy link
Contributor

Reran the failed tests one more time.

Comment on lines -145 to +146
GMSACapable: true,
FSxWindowsFileServerCapable: true,
GMSACapable: BooleanDefaultFalse{Value: ExplicitlyDisabled},
FSxWindowsFileServerCapable: BooleanDefaultFalse{Value: ExplicitlyDisabled},
Copy link
Member

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?

Copy link
Contributor

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 {

Copy link
Contributor Author

@arun-annamalai arun-annamalai Feb 2, 2023

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.

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.

9 participants