Coder Social home page Coder Social logo

Broken uninstall script about dd-agent HOT 6 CLOSED

datadog avatar datadog commented on June 30, 2024
Broken uninstall script

from dd-agent.

Comments (6)

alq666 avatar alq666 commented on June 30, 2024

Repro

  1. Install agent
  2. Remove or move /etc/dd-agent/supervisor_ddagent.conf away
  3. Restart supervisord
  4. Stop agent with sudo service datadog-agent stop

from dd-agent.

alq666 avatar alq666 commented on June 30, 2024

Here's a patch to unstuck apt-get:

wget -O - https://raw.github.com/gist/2890110/e44a07a62f787405f23163daf13743231488c98e/datadog-agent.diff 2> /dev/null | sudo patch /etc/init.d/datadog-agent

from dd-agent.

solkennedy avatar solkennedy commented on June 30, 2024

Same issue:
Errors were encountered while processing:
datadog-agent-base
E: Sub-process /usr/bin/dpkg returned an error code (1)

Patch does not work anymore.
patching file /etc/init.d/datadog-agent
Hunk #1 FAILED at 54.
1 out of 1 hunk FAILED -- saving rejects to file /etc/init.d/datadog-agent.rej

which contains:
--- datadog-agent.init
+++ datadog-agent.init
@@ -54,8 +54,15 @@

     echo -n "Stopping $DESC: "
     if [ -f $USE_SUPERVISOR ]; then
  •        echo -n "(using supervisorctl) "
    
  •        supervisorctl stop datadog-agent:*
    
  •       # Prevent errors if not under actual supervision
    
  •       supervised=$(supervisorctl avail | grep datadog-agent | wc -l)
    
  •       if [ $supervised -gt 1 ]; then
    
  •           echo -n "(using supervisorctl) "
    
  •           supervisorctl stop datadog-agent:*
    
  •       else
    
  •           # Should have been
    
  •            echo -n "(warning: datadog-agent supervisor config is missing) "
    
  •        fi
     else
         su $AGENTUSER -c "$AGENTPATH stop init"
     fi
    

from dd-agent.

solkennedy avatar solkennedy commented on June 30, 2024

Was able to solve with:
mv /etc/init.d/datadog-agent.orig /etc/init.d/datadog-agent

from dd-agent.

ssbarnea avatar ssbarnea commented on June 30, 2024

Pleaser reopen this bug, moving the file doesn't solve a product bug, see #1130

from dd-agent.

ssbarnea avatar ssbarnea commented on June 30, 2024

Maybe is different because in my case removing the file didn't solve the problem.

from dd-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.