Closed Bug 580047 Opened 15 years ago Closed 15 years ago

Duplicate key errors on upgrade

Categories

(Webtools Graveyard :: Litmus, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 588017

People

(Reporter: jed, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 Build Identifier: We (Participatory Culture Foundation, makers of Miro) moved our installation of Litmus to a new server. Our previous version was something along the lines of about 3 years old. Sys Admin did the following: I moved the existing DB to a new server, then downloaded Litmus source from Mozilla's CVS, ran populate.pl, put in DB information, ran populate.pl again, then tried to make install. Fixed some minor fails in the build scripts in templates/en/default/enter/enter.html.tmpl and templates/en/default/enter/enterComplete.html.tmpl These two lines: [% INCLUDE global/html_header.tmpl ] title='Enter Testcase' %] had an extra ] so I changed to: [% INCLUDE global/html_header.tmpl title='Enter Testcase' %] and built without an error on those two files. Build still complains about this database stuff like: DBD::mysql::db do failed: Duplicate entry '' for key 'irc_nickname' at Litmus/DBTools.pm line 127. DBD::mysql::db do failed: BLOB/TEXT column 'steps' used in key specification without a key length at DBD::mysql::db do failed: Duplicate key name 'contact_info_fulltext' at Litmus/DBTools.pm line 139. DBD::mysql::db do failed: Duplicate key name 'contact_info' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'recommended' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'version' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'sort_order' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'idtype' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Incorrect table definition; there can be only one TIMESTAMP column with DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creator_id' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'last_updated' at Litmus/DBTools.pm line 115. DBD::mysql::db do failed: Duplicate key name 'creation_date' at Litmus/DBTools.pm line 115. Schema update complete. Much in Litmus seems to work, but we have some specific issues like: Manage Testgroups We select a previously valid Product, Branch, and Testgroup Filtering doesn't first of all...all options are always showing up. Then the "edit testgroup" button is greyed out. In the Apache logs I see: Can't call method "email" on an undefined value at /var/www/litmus/json.cgi line 108., referer: http://litmus.pculture.org:8080/manage_testgroups.cgi Line 108 of json.cgi I marked below in this code snippet: # WORKAROUND: Class DBI is *supposed* to do cascading lookups for sub-objects # but it's not working here for users. As a result, we need to lookup the # subgroup creator data ourselves and put it where we expect it to be. We # then also have to call discard_changes after we json-ify it to avoid # filling the logs with "<object> destroyed without saving changes" error # messages. my $creator = Litmus::DB::User->retrieve($subgroup->creator_id->user_id); *** Line 108 is the following: *** eval{$subgroup->creator_id->email($creator->email);}; $js = $json->allow_unknown->convert_blessed->encode($subgroup); $subgroup->creator_id->discard_changes; Reproducible: Always
Haven't confirmed it, because I wouldn't like to mess with other people's databases, and this seems pretty real, so marking this one as NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Sadly, Litmus doesn't really have a maintainer at present. I do what I can on an ad-hoc basis. Janet: the first thing I notice is that you're still pulling from CVS. We moved litmus to hg back in 2008 and bug fixes are only happening there now. You can find the new code here: http://hg.mozilla.org/webtools/litmus/ A good number of the errors you've reported are already fixed in hg. If things are still failing after pulling the latest code, please post a new log and I'll have a look. Always willing to help out the Miro folks.
Thank you so much for the quick reply. I passed the info to our admin and will update the bug with whatever he reports.
iirc, the duplicate key errors are a known issue and nothing to worry about, just a side-effect of running populatedb.pl to upgrade an existing database. As for the other issues, let us know what's going on after you pull from hg. If there are still problems, I'm inclined to suspect something that changed in a more recent version of one of litmus's dependencies.
I tried last night and this morning just using our existing "litmus" directory on one of our remaining Fedora boxes, connected to the original database (not the one replicated to the Amazon cloud). Things look different -- better different -- but other things like manage testgroups still don't work. (litmus.pculture.org in DNS still points to the "new" installation; in hosts you can put 216.235.247.163 litmus.participatoryculture.org to reach the old version but copied from PCF1 to PCF5, the difference being PCF5 is a more recent release of Fedora then PCF1 had) Maybe I'm blind, or not good at Google, but I can't find a procedure how you're supposed to upgrade this successfully, or just move it from server to server, or even if Litmus has better logs then what it records under the error logs in Apache. In a brief, I'm stumped and blind Could you forward this to Chris and copy him? I'm guessing it's just something stupid that I'm just not getting, but I can't figure it out.
(In reply to comment #5) > In a brief, I'm stumped and blind > > Could you forward this to Chris and copy him? I'm guessing it's just something > stupid that I'm just not getting, but I can't figure it out. Unlikely that you're blind and/or stupid. We have the benefit here of having written the code, so when it breaks it's easy for us to dive in and fix it. We never went very far down the path of "productizing" Litmus, i.e. making it easy for others to install and/or upgrade. However, it's unclear from the above what you want me to look at. 216.235.247.163 is currently pointing to a Fedora new install test page, and litmus.pculture.org seems fine to me after casual digging without creating an account. Can you put some logs of the errors you're seeing in a pastebin (e.g. http://pastebin.mozilla.org/) somewhere and link them here, please? Alternatively, you could find me in #litmus on irc.mozilla.org.
This bug should probably be resolved as invalid as we were not using the most recent version in the original report. Since then - the Admin has attempted a fresh install, and it still encountering issues. Those errors are documented in bug #588017
(In reply to comment #7) > This bug should probably be resolved as invalid as we were not using the most > recent version in the original report. Since then - the Admin has attempted a > fresh install, and it still encountering issues. Those errors are documented > in bug #588017 OK, let's track it there.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.