Comments (8)
@sk1u You are using Debian or Ubuntu as well?
It seems the apt repository containing Telegraf only contains the latest available version. With every new Telegraf version, the old one is removed from their apt repository and thus new installation fails.
I've created an issue on the Telegraf project:
from ansible-telegraf.
Just wanted to chip in, that using telegraf_agent_version
only solves half the problem, as running the role again will fail if a new version comes out. It would be awesome if there was a way to "force" an update to the latest "minor/patch" version (e.g today it's 1.10.4).
I had the previous patch version before, and when I ran the role I saw this:
TASK [dj-wasabi.telegraf : Debian | Install Telegraf package] ******************************************************************************************************************************************************************************
Tuesday 28 May 2019 19:12:15 +0200 (0:00:00.040) 0:00:20.324 ***********
FAILED - RETRYING: Debian | Install Telegraf package (3 retries left).
FAILED - RETRYING: Debian | Install Telegraf package (2 retries left).
FAILED - RETRYING: Debian | Install Telegraf package (1 retries left).
fatal: [my-server.example.com]: FAILED! => {"attempts": 3, "cache_update_time": 1557211497, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'telegraf'' failed: E: Failed to fetch https://repos.influxdata.com/debian/pool/stable/t/telegraf/telegraf_1.10.3-1_amd64.deb 404 Not Found\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n", "rc": 100, "stderr": "E: Failed to fetch https://repos.influxdata.com/debian/pool/stable/t/telegraf/telegraf_1.10.3-1_amd64.deb 404 Not Found\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n", "stderr_lines": ["E: Failed to fetch https://repos.influxdata.com/debian/pool/stable/t/telegraf/telegraf_1.10.3-1_amd64.deb 404 Not Found", "E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages will be upgraded:\n telegraf\n1 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.\nNeed to get 18.1 MB of archives.\nAfter this operation, 0 B of additional disk space will be used.\nErr:1 https://repos.influxdata.com/debian stretch/stable amd64 telegraf amd64 1.10.3-1\n 404 Not Found\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages will be upgraded:", " telegraf", "1 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.", "Need to get 18.1 MB of archives.", "After this operation, 0 B of additional disk space will be used.", "Err:1 https://repos.influxdata.com/debian stretch/stable amd64 telegraf amd64 1.10.3-1", " 404 Not Found"]}
Do note that I was able to run apt install telegraf
manually just fine, and this unblocked me. Maybe we should consider using some of the parameters of the apt_module
? Such as autoclean
, force_apt_get
, update_cache
, etc ... if either of these works, we can hide it behind an optional toggle for extra safety / backward-compat.
from ansible-telegraf.
hm, with telegraf_agent_version: 1.10.2
everything works, but with default does not
from ansible-telegraf.
I have experienced the same issue.
Using default telegraf_agent_version
yields the same error message, even if I set it to telegraf_agent_version: 1.10.2
, I still get failed: E: Version '1.10.2-1' for 'telegraf' was not found
.
The workaround in my case was to use instead telegraf_agent_package_state: latest
as per docs.
Would be nice however to freeze the Telegraf version.
from ansible-telegraf.
That is right, it is a Debian 9 host.
Your explanation makes sense, thank you for that.
from ansible-telegraf.
This is still happening, even on "online" installs. This entire step is contradictory (the name is "==latest", the when is "!= latest"). It always sets the name, unless 'latest' is not set...
ansible-telegraf/tasks/Debian.yml
Lines 3 to 7 in 2687513
When combined with this, you can only use the defaults (which are a minor version behind 1.10 vs 1.11.5) because the destination "telegraf_agent_package" needs to be a full file path.
ansible-telegraf/tasks/Debian.yml
Lines 72 to 77 in 2687513
from ansible-telegraf.
When I set my version to 1.11.5 the "telegraf_agent_package" variable gets set to "telegraf=1.11.5-1" which is not a path as required by the get_url module.
These could be a typo:
Maybe this should be "== latest"?
ansible-telegraf/tasks/Debian.yml
Line 7 in 2687513
from ansible-telegraf.
Changing the conditional to match the task description fixed my problems (per the pull request I created). This pull request is a simple 1 character change which allows most installs to work, it should be an easy approval:
#108
from ansible-telegraf.
Related Issues (20)
- Setup the system for individual plugins HOT 2
- telegraf_agent_aws_tags creates an invalid Telegraf configuration HOT 1
- Newer versions of Telegraf fail on Windows
- Seconds assumptions in templates
- miss filter for telegraf_agent_output
- How to add the sub inputs into the same config file using telegraf_plugin_extra HOT 2
- Setting variable telegraf_agent_package does not work as expected HOT 2
- Don't install init script on SUSE/openSUSE systems running systemd HOT 1
- Fix Python package dependencies on SUSE releases HOT 1
- Add default repository handling for SUSE releases HOT 1
- armv7l.deb is now armhf.deb HOT 3
- Influxdb2 output HOT 1
- Unable to run against linux machines (redhat) HOT 2
- Influxdata key rotation causing failure
- Failure due to apt-key when run against newer Debian/Ubuntu releases HOT 1
- Use variables for repository in debian installation HOT 1
- Repo installation fails for Almalinux HOT 1
- Allow to have an empty plugins list
- Failing on Debian Bookwork, telegraf recomends stable main rather than specific release HOT 2
- amazon.aws.ec2_tag_info HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-telegraf.