Closed Bug 977487 Opened 10 years ago Closed 10 years ago

Update OS X nodes to Python 2.7.5

Categories

(Mozilla QA Graveyard :: Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: andrei, Assigned: cosmin-malutan)

References

Details

As seen in bug 972802 we had 2 python crashes on mm-osx-108-1
We should upgrade all python on all OSX machines to 2.7.6

This should be first done on the staging machines.
Lets handle all that in a single bug. I don't see a reason why it has to be split out to individual ones. Also given that we want to have the same version across all platforms and that Ubuntu doesn't have 2.7.6 yet, we should upgrade to 2.7.5 instead. For Windows I have to upgrade the mozmill-env, which will be handled separately.
OS: Mac OS X → All
Summary: Update all OSX machines to latest Python 2 version: 2.7.6 → Update OS X and Linux nodes to Python 2.7.5
Just as a side-note, for Windows we will base on Python 2.7.5 with the next release of mozmill-environment. A PR for the readme update has been pushed: https://github.com/mozilla/mozmill-environment/pull/73
Ok, all OS X nodes in staging have Python 2.7.5 now. Cosmin, can you please observe how the CI is working today? If all goes well, we can upgrade our production machines too.

Regaring Ubuntu I had nothing to do for 13.10. It is already on 2.7.5+. I have not upgraded 12.04 given that 2.7.5 is not distributed to this platform, and even the LTS version will go away soon. I don't see a reason why we have to find a solution for that version then. Lets upgrade to 14.04 LTS once it is out.
Assignee: nobody → hskupin
Flags: needinfo?(cosmin.malutan)
I will, I keep the flag for the end of the day.
Thanks
I haven't seen any issue on staging since the upgrade on staging.
Thanks
Flags: needinfo?(cosmin.malutan)
Status: NEW → ASSIGNED
I see this was done at least a couple of days ago.
That should have been mentioned in this bug.

All 10.7 nodes were broken (staging and production)
I fixed them by updating both `setuptools` and `distribute`.

I installed `pip` then ran:
> pip install --upgrade setuptools
> pip install --upgrade distribute

We were still using them from the old python installation as easy_install is used from /usr/bin/easy_install while python is used from /Library/Frameworks/Python.framework/Versions/2.7/bin/Python
Oh sorry. Cosmin and I talked on IRC and I missed to add a comment here late on Friday evening. Thanks for catching this issue. It's sad to see that it was even broken on staging. I was explicitly asking Cosmin to have a check for that and I got the go.

Anyway when I update the 10.8 machines now, I will check if they have the same issue and what we can do to prevent that. As it looks like the installation has not correctly updated the global binary scripts.
(In reply to Andrei Eftimie from comment #7)
> I installed `pip` then ran:
> > pip install --upgrade setuptools
> > pip install --upgrade distribute
> 
> We were still using them from the old python installation as easy_install is
> used from /usr/bin/easy_install while python is used from
> /Library/Frameworks/Python.framework/Versions/2.7/bin/Python

Actually we should never install something globally to get our environment working. If that is a problem, it's definitely an issue with mozmill-env. Also I don't see why distribute has been installed. This is not in use by us at all.

I will figure out the issue on the 10.8 machine in staging.
Summary: Update OS X and Linux nodes to Python 2.7.5 → Update OS X nodes to Python 2.7.5
When a custom version of Python is getting installed, the extra packages installed by default from an Apple shipped Python package are not available anymore. The Extras folder is getting deleted.

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/

So setuptools which was available before inside of that folder is gone, which also applies to pkg_resources.py. 

Not sure yet why our own version inside the environment is not used.
(In reply to Henrik Skupin (:whimboo) from comment #10)
> Not sure yet why our own version inside the environment is not used.

We don't have easy_install bundled...
It looks like that this is a problem with virtualenv 1.9.1. When I use that version the pkg_resources.py module is not getting placed into the site-packages folder of our environment. It works fine with v1.11.4. So I have to upgrade virtualenv to 1.11.4 for the creation of the mozmill-env. 

I logged https://github.com/mozilla/mozmill-environment/issues/75 for that.
(In reply to Andrei Eftimie from comment #11)
> (In reply to Henrik Skupin (:whimboo) from comment #10)
> > Not sure yet why our own version inside the environment is not used.
> 
> We don't have easy_install bundled...

We have but we remove the binary (script) during the creation. So this is not relevant here.
So I faced a problem when creating the venv with VirtualEnv 1.11 on Windows. Some major changes would have to be made to the build script. So we should only bump to version 1.10.1, which works perfectly. 

While the patch is still under review, I have created new environments and uploaded those to mozqa.com. After retriggering the get_mozmill-environments job in staging, and cleaning up the boxes from already installed packages, all is working fine.

That means I will have to do the same for production, when we upgraded to mozmill-automation 2.0.6.1.
Andrei will continue the work on production. I just pushed 2.0.6.1, and we are ready to go here.

So what to do:
1. Check already updated nodes (10.6, 10.7) for setuptools installed globally, and remove it
2. For 10.8 nodes run the Python installer, and restart Jenkins, and the terminal session to pick up 2.7.5
Assignee: hskupin → andrei.eftimie
I upgraded the python on mac osx 10.8 and 10.9 and removed the setuptools from mac osx 10.6 and 10.7.
I also ran an testrun on mm-osx-107-1 after I removed setuptools to be sure I didn't broke anything.
Thanks
Assignee: andrei.eftimie → cosmin.malutan
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Why did you upgrade Pyhton on OS X 10.9 when it already had 2.7.5 installed?
Flags: needinfo?(cosmin.malutan)
I missed to check that. Sorry.
Flags: needinfo?(cosmin.malutan)
The instructions were all in comment 15. So it should have been obvious. Anyway, it's too late now. One good thing is that we have the same kind of Python version, and also on 10.9 we do not have the Extras folder.
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.