-
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
RI-179 Make agent work on CentOS 7 #90
Conversation
The problem with this is that Ubuntu provides us a tool* that copies the tree and symlinks each individual .py file so that the .pyc files are distinct instead of being symlinks. * = https://github.com/PagerDuty/pdagent/blob/master/build-linux/deb/postinst#L49 Unfortunately, Redhat leaves the yak for us to shave. I can think of a bunch of solutions to this:
Your call on this. 3 & 4 are the "cleanest". 1 is the easiest. I'd recommend against #2. |
Also, we should check with ops about the solutions - probably @theckman |
This probably applies to all the options. :P |
Thanks Div. Hopefully ops has a good idea of which of your plans works best :) |
I avoid CentOS at all costs so I'm not sure I have any good suggestions on the CentOS/RHEL way. Is there a way to ship two separate packages? One for CentOS 6 and one for CentOS 7. Then we can guarantee our changes will not need to be tested on the other (as they won't exist there). My reason for this suggestion is that it would be wise to think that we'll need to also support CentOS 8 when it comes out in a few years. And based on their current release cycle, CentOS 6, 7 and 8 will all need to be supported at that time. If we were to split to separate packages, it may make our lives easier in the future when it comes to testing and deploying changes without worrying about CentOS exploding. It also feels cleaner. |
I intentionally left out that option. :) RPM per CentOS version will involve a lot of work to change our build process and repo layout and we'd also have to worry about classifying it correctly for other redhat based distros e.g. Fedora. The CentOS 8 consideration is not valid because python 2.7 is the last python 2. (Also, CentOS 8 is probably 5 years away from GA :) To me, option 3 is about equally clean, matches the layout in pdagent-integrations, and lets us keep the elegance of a single package for all CentOS versions. |
s/single package for all CentOS versions/single package for all versions of RH derived distros/ |
👍 Sweet! |
LGTM - can you add a CentOS 7 vagrant box for automated tests? |
I think I have to just put everything in python2.6 and python2.7, unfortunately. The rpm doesn't know about my symlinking shenanigans, so it assumes the files I've symlinked in are the old package's versions, and promptly deletes them after an upgrade. @divtxt |
Sounds good. (for future self: apparently, during upgrade, old version's obsolete files are removed after the new version's postinst is run) |
@divtxt Upgrade testing works with this solution (finally). I took a look at some existing CentOS 7 Vagrant boxes but I wasn't able to get any of them up and running. We will eventually need one (maybe even to build it ourselves), but I'm OK with putting that on the backlog for now since it is less pressing than getting it to work. |
LGTM - 🚢 Re CentOS 7 box, yeah we can defer it since we're not regressing on existing platforms. :) |
RI-179 Make agent work on CentOS 7
CentOS 7 is pretty new, but it uses Python 2.7 and does not have any Python paths in common with 2.6. So, post-install, we will check for the presence of a python2.7 lib directory and symlink it there.
Only the 64 bit version is available (as far as I can tell), so that's what I manually tested this on. There are a few Vagrant images, but none of them work, so I was unable to add integration tests for now, until CentOS 7 is a bit more mainstream.
Do you mind taking a look at this @divtxt ?