GithubHelp home page GithubHelp logo

Comments (7)

divtxt avatar divtxt commented on July 20, 2024

pdagent supports 2.6 as well for CentOS 6 support. This is why python is used rather than python2.7.

The simple workaround is to manually change the #!/usr/bin/python line in the various scripts in /usr/share/pdagent/bin after install. (I assume this is what you're doing)

from pdagent.

epyonavenger avatar epyonavenger commented on July 20, 2024

We're not using CentOS, we're using Debian, but I presume it's the same in any distro that has something other than 2.7 symlinked to "python" in /usr/bin.

That's why my thought was having either a centralized place in config it could be overridden (much like most Java programs allow), or having a post-install action in the packages that make sure it's pointed at 2.7 (and that 2.7 is a dependency of the package).

Also, to confirm your assumption, we are currently changing the top line after doing the install. That just means it's going to get clobbered every update though, which is less than ideal.

from pdagent.

divtxt avatar divtxt commented on July 20, 2024

Yeah - python is expected to be a symlink to the "default" python, and this is 2.6 or 2.7 on pdagent supported distros.

Both your suggested options work, but I think an explicit python2.7 dependency would be simpler by reducing code & permutations to test. It would start installing 2.7 for centos 6 users, but as long as the default python is untouched I think that should be ok.

Also, to confirm your assumption, we are currently changing the top line after doing the install. That just means it's going to get clobbered every update though, which is less than ideal.

Yup. Fortunately, pdagent releases are rare. :)

from pdagent.

divtxt avatar divtxt commented on July 20, 2024

Also, to confirm your assumption, we are currently changing the top line after doing the install. That just means it's going to get clobbered every update though, which is less than ideal.

Yup. Fortunately, pdagent releases are rare. :)

Well, not completely fortunate since rare = not worth automating, and will be forgotten. Hopefully we have this fixed in the next release and there should be no more need for the workaround.

Curious: do you have your pdagent set to auto-update or do you manually update?

from pdagent.

epyonavenger avatar epyonavenger commented on July 20, 2024

We do an aptitude safe-upgrade at least weekly, if not sooner, such as when there are important security patches released.

To be clear, I don't actually mind employing the workaround, and we have Zabbix making sure that the scripts have the changed line at the top now. I just figured we might not be the only ones who got dinged and was trying to be a good citizen and raise awareness in case it wasn't planned and/or unknown.

The real solution, of course, is for us to upgrade to the latest Debian and have a newer Python linked to by default, but easier said than done there. XD

from pdagent.

divtxt avatar divtxt commented on July 20, 2024

we have Zabbix making sure that the scripts have the changed line at the top now

👍 as long as you're not depending on pdagent for that zabbix alert :D

from pdagent.

epyonavenger avatar epyonavenger commented on July 20, 2024

Hah. No, that one goes to email, but thanks for the check regardless. XD

from pdagent.

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.