← Back to team overview

graphite-dev team mailing list archive

troubleshooting "IntegrityError: column username is not unique"

 

I am packaging Graphite 0.9.13-pre1 for CentOS 7. I got pretty much everything working, I think, with one exception.

As part of the RPM post-install script, the package manager runs this:

cd /opt/graphite/webapp/graphite
python manage.py syncdb --noinput

...and the output is this:

https://gist.github.com/FlorinAndrei/87d774c1e45c973ac223

After all packages are installed, when I launch Apache, I get the "IntegrityError: column username is not unique" message in the graphite error log:

https://gist.github.com/FlorinAndrei/0647de36d850b9d1f181

So, what I do then is, I stop Apache, then I run manage.py again, manually this time, as root:

cd /opt/graphite/webapp/graphite
python manage.py syncdb --noinput

...and the output is this:

https://gist.github.com/FlorinAndrei/c1b51351faa2f0dd9126

...and this time everything works fine. There are no errors in the error log, except the SECRET_KEY warning.

My question is - what is the difference? Why when I'm running manage.py from the post-install script, it's not enough, but then when I run it manually as root, it's fine?

Installing the graphite-web RPM is the last step of the process, nothing is installed after that.

I assume this is all about the graphite.db file - what do I need to look for in that file, to figure out what goes wrong with the first run of manage.py?

--
Florin Andrei
http://florin.myip.org/