Remove ddot install if version >=7.78 (installer side)#415
Conversation
…age and prevent errors
…ean package and prevent errors" This reverts commit 8ee994e.
| 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) ||: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I don't want to change that, this has probably been done on purpose...
Co-authored-by: Sarah Wang <sarah.wang@datadoghq.com>
liustanley
left a comment
There was a problem hiding this comment.
Validated this install script works with rc.7
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
mergequeue build completed successfully, but the github api returned an error while merging the pr.
DetailsError: PUT https://api.github.com/repos/DataDog/agent-linux-install-script/pulls/415/merge: 405 9 of 9 required status checks are expected. [] (Request ID: D288:24AA8E:9E12B:27A41C:69DE01CC) FullStacktrace: |
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 ]