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

Fails to upgrade from 5 to 6 #2721

Closed
yuhaoju opened this issue Nov 29, 2018 · 3 comments
Closed

Fails to upgrade from 5 to 6 #2721

yuhaoju opened this issue Nov 29, 2018 · 3 comments
Assignees

Comments

@yuhaoju
Copy link

yuhaoju commented Nov 29, 2018

Output of the info page (if this is a bug)

sudo service datadog-agent status
● datadog-agent.service - "Datadog Agent"
   Loaded: loaded (/lib/systemd/system/datadog-agent.service; enabled; vendor preset:
   Active: active (running) since Thu 2018-11-29 08:01:54 UTC; 1h 29min ago
 Main PID: 1406 (supervisord)
    Tasks: 14
   Memory: 178.9M
      CPU: 47.883s
   CGroup: /system.slice/datadog-agent.service
           ├─1406 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/bin/superv
           ├─1446 /opt/datadog-agent/bin/trace-agent
           ├─1447 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/ddag
           ├─1448 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/dogs
           └─1451 /opt/datadog-agent/embedded/bin/python /opt/datadog-agent/agent/agen

Nov 29 08:01:52 web-2 systemd[1]: Starting "Datadog Agent"...
Nov 29 08:01:54 web-2 systemd[1]: Started "Datadog Agent".
Nov 29 08:01:57 web-2 dd.forwarder[1447]: INFO (ddagent.py:146): Done with custom emit

Describe what happened:
Can't fetch version 6 (datadog-agent is already the newest version (1:5.29.0-1)).

Part of the output:

* Installing the Datadog Agent package

Ign:1 https://apt.datadoghq.com stable InRelease
Hit:2 https://apt.datadoghq.com stable Release
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
datadog-agent is already the newest version (1:5.29.0-1).
...
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
W: Duplicate sources.list entry https://apt.datadoghq.com stable Release
sudo: datadog-agent: command not found
Automatic import failed, you can still try to manually run: datadog-agent import /etc/dd-agent /etc/datadog-agent

cp: cannot stat '/etc/datadog-agent/datadog.yaml.example': No such file or directory

Describe what you expected:
Upgrade to agent 6.

Steps to reproduce the issue:
Execute:

DD_UPGRADE=true bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"

Additional environment details (Operating System, Cloud provider, etc):

NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
@olivielpeau
Copy link
Member

Hi @yuhaoju, thanks for reporting this issue.

It looks like the script failed to upgrade your Agent because of this line:

W: Duplicate sources.list entry https://apt.datadoghq.com stable Release

The script assumes the Agent 5 apt repo is defined in /etc/apt/sources.list.d/datadog.list and overrides that file to make it point to the Agent 6 apt repo, but apparently that's not the case on your environment.

Could you check your apt entries in the /etc/apt/sources.list and /etc/apt/sources.list.d/*.list files, remove any Datadog-related entries, and try to run the script again?

@olivielpeau olivielpeau self-assigned this Nov 30, 2018
@yuhaoju
Copy link
Author

yuhaoju commented Dec 3, 2018

@olivielpeau Hi, I removed datadog relevant .list files and it solved the problem, thank you!

FYI the files are:

/etc/apt/sources.list.d/datadog.list
/etc/apt/sources.list.d/apt_datadoghq_com.list

@yuhaoju yuhaoju closed this as completed Dec 3, 2018
@olivielpeau
Copy link
Member

Great, thanks for confirming this worked @yuhaoju 👍

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

No branches or pull requests

2 participants