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

Assets from git tarballs cannot be extracted #1700

Closed
nikkictl opened this issue Jun 20, 2018 · 1 comment · Fixed by #1980
Closed

Assets from git tarballs cannot be extracted #1700

nikkictl opened this issue Jun 20, 2018 · 1 comment · Fixed by #1980
Assignees
Labels

Comments

@nikkictl
Copy link

nikkictl commented Jun 20, 2018

Assets from git tarballs cannot be extracted
Requires mholt/archiver#27

Expected Behavior

An asset with the url of an archived git tarball gets extracted, and a check can execute its scripts.

Current Behavior

An asset with the url of an archived git tarball cannot be extracted, therefore the check does not execute.

Possible Solution

mholt/archiver#66 gets merged and we update our dependency to that commit.

sensu-go/Gopkg.toml

Lines 64 to 66 in 2d07f04

[[constraint]]
name = "github.com/mholt/archiver"
revision = "e4ef56d48eb029648b0e895bb0b6a393ef0829c3"

Steps to Reproduce (for bugs)

  1. create an asset with the following configuration
{
  "type": "Asset",
  "spec": {
    "name": "check-cpu.sh",
    "url": "/~https://github.com/sensu-plugins/sensu-plugins-cpu-checks/archive/2.1.0.tar.gz",
    "sha512": "da4f4eb7b16d18c7e870efcb145b2b09234836e7bb3218f58adf376ba4cb84ddd2743356aa89c22509da8c5f552eaf98eb721bc7e18e1832f664142da67b06df",
    "metadata": null,
    "filters": [],
    "organization": "default"
  }
}
  1. create a check with the following configuration which invokes said asset
{
  "type": "CheckConfig",
  "spec": {
    "command": "check-cpu.sh -w 85 -c 95",
    "environment": "default",
    "handlers": [],
    "high_flap_threshold": 0,
    "interval": 10,
    "low_flap_threshold": 0,
    "name": "check-cpu-with-asset",
    "organization": "default",
    "publish": true,
    "runtime_assets": [
      "check-cpu.sh"
    ],
    "subscriptions": [
      "misc"
    ],
    "proxy_entity_id": "",
    "check_hooks": null,
    "stdin": false,
    "subdue": null,
    "ttl": 0,
    "timeout": 0,
    "round_robin": false,
    "output_metric_format": "",
    "output_metric_handlers": []
  }
}
  1. check output: error installing dependencies: error extracting asset: pax_global_header: unknown type flag: g

Context

Assets from git urls do not get extracted.

Your Environment

  • Sensu version used (sensuctl, sensu-backend, and/or sensu-agent): 6e1d8f7
  • Installation method (packages, binaries, docker etc.): packages
  • Operating System and version (e.g. Ubuntu 14.04): ubuntu-xenial-16.04-amd64
@nikkictl nikkictl added the bug label Jun 20, 2018
palourde pushed a commit to sensu/sensu-docs that referenced this issue Jun 20, 2018
Signed-off-by: Simon Plourde <simon@sensu.io>
palourde added a commit to sensu/sensu-docs that referenced this issue Jun 20, 2018
Adds a mention about a specific issue with GitHub archives when used as Sensu assets archives (sensu/sensu-go#1700).
@nikkictl nikkictl changed the title Assets from git tarbells cannot be extracted Assets from git tarballs cannot be extracted Jun 21, 2018
@nikkictl
Copy link
Author

Due to inactivity on mholt/archiver#66, I've opened mholt/archiver#76 to address mholt/archiver#27.

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 a pull request may close this issue.

1 participant