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

dd-agent: fix compatibility issue with iostat #41035

Merged
merged 1 commit into from May 31, 2018

Conversation

tazjin
Copy link
Member

@tazjin tazjin commented May 24, 2018

Motivation for this change

Applies a patch to the dd-agent derivation that fixes a compatibility
issue with the current version of iostat, which no longer contains a
colon after its table headers.

This patch is applied in order for the fix to be backportable to
existing stable releases. A final "proper" fix will be an upgrade to a
newer version of dd-agent, but that requires several other changes.

This fixes #40103.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

cc: @bflyblue

Applies a patch to the dd-agent derivation that fixes a compatibility
issue with the current version of iostat, which no longer contains a
colon after its table headers.

This patch is applied in order for the fix to be backportable to
existing stable releases. A final "proper" fix will be an upgrade to a
newer version of dd-agent, but that requires several other changes.

This fixes NixOS#40103.
@@ -38,6 +38,8 @@ in stdenv.mkDerivation rec {
sha256 = "1iqxvgpsqibqw3vk79158l2pnb6y4pjhjp2d6724lm5rpz4825lx";
};

patches = [ ./40103-iostat-fix.patch ];
Copy link
Member

Choose a reason for hiding this comment

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

Can you use fetchpatch of this commit instead? DataDog/dd-agent@bfc3057

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll test that

Copy link
Member Author

Choose a reason for hiding this comment

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

@Mic92 The diff of the test does not apply cleanly (dd-agent is at a much newer version upstream than what we have packaged). Not sure if it's worth pursuing that vs. having the patch in nixpkgs for a short while (I'll follow up with a proper fix by updating the package version eventually, see #39808)

@xeji
Copy link
Contributor

xeji commented May 31, 2018

@GrahamcOfBorg build dd-agent

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: dd-agent

Partial log (click to expand)

/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/dogstatsd.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/q3ncxyf9ql0wffblk758a2790mjfvan6-python-2.7.15/bin/python"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/datadog-agent/smartos/dd-agent: interpreter directive changed from "/bin/sh -x" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh -x"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/datadog-agent/source/agent: interpreter directive changed from "/usr/bin/env sh" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/datadog-agent/source/install_agent.sh: interpreter directive changed from "/bin/bash" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/bash"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/datadog-agent/source/setup_agent.sh: interpreter directive changed from "/bin/sh" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/debian/datadog-agent.init: interpreter directive changed from "/bin/sh" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/packaging/osx/datadog-agent: interpreter directive changed from "/usr/bin/env sh" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/agent/utils/pip-allow-failures.sh: interpreter directive changed from "/bin/sh" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/sh"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2/bin/.dd-jmxfetch-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/i9g6883w05pyj9aa4sl8hn945qyy6j53-bash-4.4-p19/bin/bash"
/nix/store/xc6d6cy2nqlivnygxk7a53ai8chv8gxn-dd-agent-5.11.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: dd-agent

Partial log (click to expand)

/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/packaging/debian/datadog-agent.init: interpreter directive changed from "/bin/sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/packaging/datadog-agent/source/setup_agent.sh: interpreter directive changed from "/bin/sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/packaging/datadog-agent/source/install_agent.sh: interpreter directive changed from "/bin/bash" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/bash"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/packaging/datadog-agent/source/agent: interpreter directive changed from "/usr/bin/env sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/packaging/datadog-agent/smartos/dd-agent: interpreter directive changed from "/bin/sh -x" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh -x"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/dogstatsd.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/1xkxxrd2sd8q78icm687ac8si9miak45-python-2.7.15/bin/python"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/ddagent.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/1xkxxrd2sd8q78icm687ac8si9miak45-python-2.7.15/bin/python"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/agent/agent.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/1xkxxrd2sd8q78icm687ac8si9miak45-python-2.7.15/bin/python"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2/bin/.dd-jmxfetch-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/bash"
/nix/store/6a6l6kpnlhjz8ixwlzv4v8n298gks2my-dd-agent-5.11.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: dd-agent

Partial log (click to expand)

/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/ddagent.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/xlc7ld1xd57ha3x9mbx11c84j290va0f-python-2.7.15/bin/python"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/dogstatsd.py: interpreter directive changed from "/opt/datadog-agent/embedded/bin/python" to "/nix/store/xlc7ld1xd57ha3x9mbx11c84j290va0f-python-2.7.15/bin/python"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/datadog-agent/smartos/dd-agent: interpreter directive changed from "/bin/sh -x" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh -x"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/datadog-agent/source/agent: interpreter directive changed from "/usr/bin/env sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/datadog-agent/source/install_agent.sh: interpreter directive changed from "/bin/bash" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/bash"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/datadog-agent/source/setup_agent.sh: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/debian/datadog-agent.init: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/packaging/osx/datadog-agent: interpreter directive changed from "/usr/bin/env sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2/agent/utils/pip-allow-failures.sh: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/npi3b6ryic0dr1a8pxfm0ny0hm7hqsms-dd-agent-5.11.2

@xeji xeji merged commit aee19ca into NixOS:master May 31, 2018
@tazjin tazjin deleted the fix/dd-agent-iostat branch May 31, 2018 20:59
@tazjin
Copy link
Member Author

tazjin commented May 31, 2018

@xeji Thanks! Is there some kind of "process" for getting the fix released into 18.03?

@xeji
Copy link
Contributor

xeji commented May 31, 2018

No, just mention in the PR that you'd like this backported to 18.03 (which you just did).

xeji pushed a commit that referenced this pull request May 31, 2018
Applies a patch to the dd-agent derivation that fixes a compatibility
issue with the current version of iostat, which no longer contains a
colon after its table headers.

This patch is applied in order for the fix to be backportable to
existing stable releases. A final "proper" fix will be an upgrade to a
newer version of dd-agent, but that requires several other changes.

This fixes #40103.

(cherry picked from commit aee19ca)
@tazjin
Copy link
Member Author

tazjin commented May 31, 2018

@xeji Thanks again :)

@xeji
Copy link
Contributor

xeji commented May 31, 2018

backported in c11a4a5

@xeji xeji mentioned this pull request Jun 2, 2018
8 tasks
rvl added a commit to input-output-hk/iohk-ops that referenced this pull request Jun 11, 2018
365andreas pushed a commit to input-output-hk/iohk-ops that referenced this pull request Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

datadog 5: fails to parse newer iostat output
5 participants