-
Notifications
You must be signed in to change notification settings - Fork 29
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
Issues On Systems With Multiple Python Versions Installed #101
Comments
pdagent supports 2.6 as well for CentOS 6 support. This is why The simple workaround is to manually change the |
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. |
Yeah - 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.
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? |
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 |
👍 as long as you're not depending on pdagent for that zabbix alert :D |
Hah. No, that one goes to email, but thanks for the check regardless. XD |
tl;dr: If you have multiple version of Python installed and 2.7 isn't the default, you can have issues.
More specifically, we were happily chugging along on the older version of pdagent, upgraded, and saw that it was failing.
Upon looking at the docs, they said Python 2.7 was required, which we have.
After some amount of head scratching, I found that all the files are pointing at "python" instead of "python2.7" and thus assuming that the system defaults to 2.7.
It'd be nice if either /etc/pdagent.conf or some other place allowed you to override which Python was being called. Potentially this could also be done as part of the apt/yum install actions, to see what should be there and sed it in or some such.
The text was updated successfully, but these errors were encountered: