Hi All,

I've written a Puppet recipe to install RB.
My problem is that the RB database (MariaDB) is already populated  and the 
'rb-site install' command results with an error:
Creating administrator account ... Traceback (most recent call last):
  File "/usr/local/bin/rb-site", line 11, in <module>
    sys.exit(main())
  File 
"/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", 
line 1922, in main
    command.run()
  File 
"/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", 
line 1247, in run
    self.show_install_status()
  File 
"/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", 
line 1587, in show_install_status
    site.create_admin_user)
  File 
"/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", 
line 1084, in step
    func()
  File 
"/usr/local/lib/python2.7/dist-packages/reviewboard/cmdline/rbsite.py", 
line 618, in create_admin_user
    self.admin_password)
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py", 
line 195, in create_superuser
    **extra_fields)
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py", 
line 186, in _create_user
    user.save(using=self._db)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, 
update_fields)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, 
raw)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", 
line 687, in _do_insert
    using=using, raw=raw)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", 
line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", 
line 1514, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", 
line 903, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", 
line 53, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 99, 
in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", 
line 53, in execute
    return self.cursor.execute(sql, params)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", 
line 124, in execute
    return self.cursor.execute(query, args)
  File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205
, in execute
    self.errorhandler(self, exc, value)
  File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", 
line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.IntegrityError: (1062, "Duplicate entry 'admin' for key 
'username'")

What is the way to install RB when the DB is already populated and the 
admin account exists in the DB?

Thanks in adance,
Yarden

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to