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

Let the Windows installer set the correct rights on config files and directories. #588

Merged
merged 7 commits into from Mar 18, 2019

Conversation

remeh
Copy link
Contributor

@remeh remeh commented Mar 7, 2019

The .MSI to setup the Agent on Windows will soon run the Agent in a custom user with less privileges (than Administrator).

This commit removes the permissions change on datadog.yaml on Windows to let the installer set it itself.

I've tested that the Agent still runs while installing 6.8.0 and 6.10.0.

Note that this PR doesn't change the behavior for the Agent 5.

@remeh remeh added the windows label Mar 7, 2019
@remeh remeh added this to the 2.18.0 milestone Mar 7, 2019
@olivielpeau
Copy link
Member

olivielpeau commented Mar 8, 2019

need to check: whether earlier versions of the cookbook work with agents v6 >= 6.11 (on Windows)

@olivielpeau olivielpeau self-requested a review March 8, 2019 16:16
@remeh
Copy link
Contributor Author

remeh commented Mar 12, 2019

I've tested it with versions <6.11 (such as 6.8.0) and it worked well 👍
I've also tested upgrading from 6.8 to the 6.10 with the user.

Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

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

2 comments:

  • What about the similar logic in our datadog_monitor provider?
    if node['platform_family'] == 'windows'
    owner 'Administrators'
    rights :full_control, 'Administrators'
    inherits false
    else
  • I think there was a small misunderstanding on my earlier comment: I meant to ask if version 2.17.0 of the cookbook is able to successfully install a version of the Windows Agent running under dd-agent-user. If not, it means that users trying to install such a Windows Agent version with older versions of the cookbook will run into issues, so we should make sure it's documented in a very obvious way (here + in the Agent changelog + any other docs we may provide; we can discuss this in chat/offline if needed)

@remeh
Copy link
Contributor Author

remeh commented Mar 13, 2019

  1. Nice catch 👍
  2. Indeed, chef-datadog runs just fine but the Agent (with ddagentuser) is not able to run due to the Administrators permissions set on the directories/files by the cookbook. You're right we'll need to document this carefully because it's a very specific situation (specific OS + specific min version of the Agent v6 + specific version of chef-datadog).

@remeh remeh force-pushed the remeh/windows-dd-agent-user branch from c612ebc to 4b0cf11 Compare March 13, 2019 17:39
@remeh
Copy link
Contributor Author

remeh commented Mar 13, 2019

Please note that the CHANGELOG for release 2.18.0 has been updated accordingly: #589

Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

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

Left a few additional comments

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
providers/monitor.rb Outdated Show resolved Hide resolved
@remeh remeh merged commit 273df7e into master Mar 18, 2019
@remeh remeh deleted the remeh/windows-dd-agent-user branch March 18, 2019 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants