Skip to content

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

Merged
remeh merged 7 commits into
masterfrom
remeh/windows-dd-agent-user
Mar 18, 2019
Merged

Let the Windows installer set the correct rights on config files and directories.#588
remeh merged 7 commits into
masterfrom
remeh/windows-dd-agent-user

Conversation

@remeh

@remeh remeh commented Mar 7, 2019

Copy link
Copy Markdown
Contributor

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

olivielpeau commented Mar 8, 2019

Copy link
Copy Markdown
Member

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

remeh commented Mar 12, 2019

Copy link
Copy Markdown
Contributor Author

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.

@olivielpeau olivielpeau left a comment

Copy link
Copy Markdown
Member

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

remeh commented Mar 13, 2019

Copy link
Copy Markdown
Contributor Author
  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

remeh commented Mar 13, 2019

Copy link
Copy Markdown
Contributor Author

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

@olivielpeau olivielpeau left a comment

Copy link
Copy Markdown
Member

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

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread providers/monitor.rb Outdated
@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.

2 participants