Closed Bug 1105332 Opened 11 years ago Closed 11 years ago

aus4 admin apps should use vendor library instead of system packages for everything in requirements/prod.txt

Categories

(Infrastructure & Operations Graveyard :: WebOps: Product Delivery, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: cturra)

Details

(Whiteboard: [kanban:webops:https://kanbanize.com/ctrl_board/4/1926] )

I get a 500 ISE error. Works fine with the old ui still. Not sure if this is an issue with the deployment, or something else. Will dive into more when I have time.
Traceback (most recent call last): File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1518, in __call__ return self.wsgi_app(environ, start_response) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/paste/auth/basic.py", line 95, in __call__ return self.application(environ, start_response) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1506, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1504, in wsgi_app response = self.full_dispatch_request() File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1264, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1262, in full_dispatch_request rv = self.dispatch_request() File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/app.py", line 1248, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/flask/views.py", line 151, in dispatch_request return meth(*args, **kwargs) File "/Users/peterbe/dev/MOZILLA/BALROG/balrog/auslib/admin/views/base.py", line 52, in post return self._post(*args, transaction=trans, **kwargs) File "/Users/peterbe/dev/MOZILLA/BALROG/balrog/auslib/admin/views/base.py", line 52, in post return self._post(*args, transaction=trans, **kwargs) File "/Users/peterbe/dev/MOZILLA/BALROG/balrog/auslib/admin/views/base.py", line 18, in decorated return f(*args, changed_by=username, **kwargs) File "/Users/peterbe/dev/MOZILLA/BALROG/balrog/auslib/admin/views/base.py", line 30, in decorated elif request.get_json() and opt in request.json: File "/Users/peterbe/virtualenvs/balrog/lib/python2.6/site-packages/werkzeug/local.py", line 336, in __getattr__ return getattr(self._get_current_object(), name) AttributeError: 'Request' object has no attribute 'get_json'
This problem went away after doing a fresh `pip install -r requirements/prod.txt`. In my virtualenv I have flask==0.10.1 and flask_wtf==0.10.2. I can't reproduce it any more. Some old *.pyc files in place?
(In reply to Peter Bengtsson [:peterbe] from comment #2) > This problem went away after doing a fresh `pip install -r > requirements/prod.txt`. In my virtualenv I have flask==0.10.1 and > flask_wtf==0.10.2. > > I can't reproduce it any more. > > Some old *.pyc files in place? Yup, looks like it's a deployment issue. Looking on the server, I see that we have Flask deployed in the system, so we're probably using that one instead of the one in the vendor library. I think the right solution here is to remove everything listed in https://github.com/mozilla/balrog/blob/master/requirements/prod.txt from the system packages. I'm not really sure how IT's deployment works (I don't see an RPM or anything, so I guess it was pip installed into the system?), so I'm not going to go poking at this.
Assignee: nobody → server-ops-webops
Component: Balrog: Frontend → WebOps: Product Delivery
Flags: needinfo?(cturra)
Product: Release Engineering → Infrastructure & Operations
QA Contact: bhearsum → nmaul
Summary: can't add releases with new balrog ui → aus4 admin apps should use vendor library instead of system packages for everything in requirements/prod.txt
Version: unspecified → other
Whiteboard: [kanban:webops:https://kanbanize.com/ctrl_board/4/1926]
we have an opsec requirement for all packages to be managed by RPMs on these hosts. :bhearsum - lets chat about the required packages tomorrow? [root@aus1.webapp.phx1 ~]# yum list installed | grep -i flask Flask.noarch 0.7.2-1 @mozilla
Flags: needinfo?(cturra)
Chris and I talked about this today. Turns out that what we're doing is fine, it's just that there was a flask package installed into the system (but none of the other packages we have in the vendor lib). He went ahead and removed that from dev, and I'm going to verify that things work there before we do the same for prod. Thanks Chris!
OK, dev looks good. If there's still time today, can we push this out to stage and prod, too? If not, it can wait - it's not urgent.
Flags: needinfo?(cturra)
(In reply to Ben Hearsum [:bhearsum] from comment #6) > OK, dev looks good. If there's still time today, can we push this out to > stage and prod, too? If not, it can wait - it's not urgent. Hm, actually. It's 3pm my time on Friday...let's hold off on this for now, just in case. Maybe we can huddle next week (or the following one, if this is subject to change freeze).
Flags: needinfo?(cturra)
i agree, lets hold on this change until after the work week. infra is currently in a change freeze for production (for obvious reasons :) grabbing this bug.
Assignee: server-ops-webops → cturra
Peter ended up finding a better fix for this by adjusting sys.path in the app. He fixed it in https://github.com/mozilla/balrog/pull/18. Sorry about any unnecessary work here!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.