Skip to content

Remove ddot install if version >=7.78 (installer side)#415

Open
Stanislas167 wants to merge 11 commits intomainfrom
stanp/1-Correct_DDOT_install_for_7.78
Open

Remove ddot install if version >=7.78 (installer side)#415
Stanislas167 wants to merge 11 commits intomainfrom
stanp/1-Correct_DDOT_install_for_7.78

Conversation

@Stanislas167
Copy link
Copy Markdown

@Stanislas167 Stanislas167 commented Mar 31, 2026

For agent version >= 7.78, DDOT is installed by the installer from the DD_OTELCOLLECTOR_ENABLED flag. There is no need to install it separately.
It was done before by unsetting the DD_OTELCOLLECTOR_ENABLED variable but this was causing issues.
This PR keep DD_OTELCOLLECTOR_ENABLED set and add a ddot_installed_by_agent variable to check if we need to install ddot manually in the script or not. ddot_installed_by_agent is false for 7.69 <= version < 7.78, and true above. DDOT is then gated by [ -n "$DD_OTELCOLLECTOR_ENABLED" ] && [ "$ddot_installed_by_agent" = false ]

@Stanislas167 Stanislas167 self-assigned this Mar 31, 2026
@Stanislas167 Stanislas167 marked this pull request as ready for review March 31, 2026 13:05
@Stanislas167 Stanislas167 requested review from a team as code owners March 31, 2026 13:05
@Stanislas167 Stanislas167 requested review from swang392 and removed request for a team March 31, 2026 13:05
DD_OTELCOLLECTOR_ENABLED="${DD_OTELCOLLECTOR_ENABLED}" DD_API_KEY="${apikey}" DD_SITE="${site}" DD_INSTALLER_REGISTRY_URL="${DD_INSTALLER_REGISTRY_URL}" ZYPP_RPM_DEBUG="${ZYPP_RPM_DEBUG:-0}" SYSTEMD_OFFLINE=${SYSTEMD_OFFLINE:-0} zypper --non-interactive --no-refresh install "${packages[@]}" 2> >($sudo_cmd tee /tmp/ddog_install_error_msg >&2) ||:
else
$sudo_cmd ZYPP_RPM_DEBUG="${ZYPP_RPM_DEBUG:-0}" SYSTEMD_OFFLINE="${SYSTEMD_OFFLINE:-0}" zypper --non-interactive --no-refresh install "${packages[@]}" 2> >($sudo_cmd tee /tmp/ddog_install_error_msg >&2) ||:
$sudo_cmd DD_OTELCOLLECTOR_ENABLED="${DD_OTELCOLLECTOR_ENABLED}" DD_API_KEY="${apikey}" DD_SITE="${site}" DD_INSTALLER_REGISTRY_URL="${DD_INSTALLER_REGISTRY_URL}" ZYPP_RPM_DEBUG="${ZYPP_RPM_DEBUG:-0}" SYSTEMD_OFFLINE="${SYSTEMD_OFFLINE:-0}" zypper --non-interactive --no-refresh install "${packages[@]}" 2> >($sudo_cmd tee /tmp/ddog_install_error_msg >&2) ||:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The install here passes env vars directly, but the yum and apt install paths use a bash -c wrapper for the env vars. Should that be aligned here too for consistency?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't want to change that, this has probably been done on purpose...

Co-authored-by: Sarah Wang <sarah.wang@datadoghq.com>
Copy link
Copy Markdown
Contributor

@liustanley liustanley left a comment

Choose a reason for hiding this comment

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

Validated this install script works with rc.7

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.

4 participants