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 Agent 6 & 7 install from beta repositories #42

Merged
merged 2 commits into from
Nov 19, 2019

Conversation

KSerrania
Copy link
Contributor

@KSerrania KSerrania commented Nov 18, 2019

What does this PR do?

Fixes the yum repository path for beta installs (Agent 6 betas are in beta/6, Agent 7 betas in beta/7).
Fixes the regex which checks if a beta version will be installed (there was a -[0-9]+ too much at the end of the regex). The previous regex would match 7.15.0~beta.1-1 and not 7.15.0~beta.1, which makes the install fail since we add the -1 again during the installation (giving 7.15.0~beta.1-1-1, which is not an existing version).

Motivation

Agent 7 testing.

@@ -29,7 +29,7 @@
{%- set latest_agent_version = true %}
{%- else %}
{%- set latest_agent_version = false %}
{%- set parsed_version = datadog_install_settings.agent_version | regex_match('(([0-9]+)\.[0-9]+\.[0-9]+)(?:~(rc|beta)\.([0-9]+-[0-9]+))?') %}
{%- set parsed_version = datadog_install_settings.agent_version | regex_match('(([0-9]+)\.[0-9]+\.[0-9]+)(?:~(rc|beta)\.([0-9]+))?') %}
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't have to specify the additional -1 at the end? I think this was matching that. Maybe it's optional? Then we should make it optional in the regex too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can make it optional, but right now the -1 is automatically appended to the version:

{%- elif grains['os_family'].lower() == 'debian' %}
- version: 1:{{ datadog_settings.agent_version }}-1
{%- elif grains['os_family'].lower() == 'redhat' %}
- version: {{ datadog_settings.agent_version }}-1
, so adding it by yourself will make the install fail

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's not make it optional if it breaks things :P

@KSerrania KSerrania merged commit 1a1fe31 into 3.x Nov 19, 2019
@KSerrania KSerrania deleted the kserrania/fix-yum-agent-beta-install branch November 19, 2019 16:26
@KSerrania KSerrania mentioned this pull request Nov 20, 2019
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.

None yet

2 participants