← Back to team overview

sloecode-dev team mailing list archive

Re: Sloecode deployment

 

Happy new year, coders of the berry bush,

I've got my basic deployment now pretty much sorted out, and it works.
However, there are still a few minor issues to address. But first, let
me sort out the replies I've gotten so far (from Thomi).

On 27/12/11 09:07, Thomi Richards wrote:
> There should be a way to tell apt-get / dpkg to ignore all but the most
> critical questions - you should also be able to give answers to these
> questions via a script. The questions are asked in the recommended
> debian package manner, although I personally have no experience dooing
> either of these things. I'll try and do a bit of research this evening.

That'd be awesome. I'll also see what I might be able to get from
Sebastien, the author of Cuisine. He might have had situations like that
to solve as well at some point.

>     Whenever I'm trying to log in, the Apache error log for the WSGI served
>     Sloecode spits out the following for every login request:
> 
>     Error - <type 'exceptions.AttributeError'>: 'NoneType' object has no
>     attribute 'login'
> 
> After viewing the stacktrace you sent through, this looks a lot like
> something's screwed up in the login process. The page you're trying to
> view '/me' is shown right after login, and yet your user object doesn't
> hav ea login parameter (since it's set to None). This should never
> happen, and is certainly a bug, I'll look into it ASAP.

That was apparently caused on the client side by stale cookies when
modding my deployment scheme to use reverse proxying. Still, it might be
good to handle this a bit more gracefully rather than dumping that type
of stack trace and leaving the client hang.

>     I've also tried to run the following command after making changes to
>     production.ini:
> 
>     paster setup-app /etc/sloecode/production.ini
> 
> 
> What was the output?

I'm a bit hesitant to run that again. But I'll look into it once I'm
back in the office.

> It might be worth removing the SQLite database file
> (just 'rm' is fine), and re-running 'paster setup-app /etc/blahblahblah'
> - make sure the command exits cleanly.

Did that. And after removing everything things worked out nicely again,
particularly above mentioned cookies.

But that leads me to the question: What does running the "paster
setup-app" do? When is it needed? It might be worth mentioning that in
the documentation. As I doubt that it's needed for a mod_wsgi served
site. However, maybe it's required for cases where parameters for the
SSH server have been altered? Additionally, is there any "danger" to the
(existing) database if its run (again)? This is a bit opaque to me at
the moment.

>     Looking around, I've noticed that quite a lot of the file permissions
>     for directories/files created by the sloecode package install have got
>     (for my taste) a bit too broad access permissions. For example:
> 
>     * /var/cache/pylons-sloecode
> 
>     * /var/log/sloecode and /var/log/sloecode/smartserver.
>     log
> 
>     * /var/sloecode/
> 
>     * /srv/sloecode/bzr-repos/
> 
> 
> That's a bug - and probabl my fault. If you're willing, could I get you
> to log a bug in launchpad for this, with what permissions you think they
> should have? That way I can edit the package scripts and get a new .deb
> built ASAP.

Will do.

Guy

-- 
Guy K. Kloss
School of Computing + Mathematical Sciences
Auckland University of Technology
Private Bag 92006, Auckland 1142
phone: +64 9 921 9999 ext. 5032
eMail: Guy.Kloss@xxxxxxxxx


Follow ups

References