More issues: on a clean install (more or less :P I'm trying to get Young Oh's OpenStack module up and running - I'm providing the changes made to the database below but I doubt they are related) clicking either on Reservations or the Dashboard button immediatelly pops up an error: "Error encountered: Please try again later" (it doesn't get any more generic than this ;)). I traced it back to an exception caught at web/js/code.js:78 when calling dojo.fromJson(data), data actually includes the following string:
<h2>Error: Invalid Input</h2><br> You submitted expired data to this web site. Please restart the steps you were following without using your browser's <strong>Back</strong> button. Continuing up along the stack trace is virtually impossible though as the previous function calls originate deep from within the minified dojo.js. I was wondering - why exactly are we including an 'optimized' JS library in a development build of VCL? Another slight problem (this time really a feature and not a bug :)) - my browser was logging failed GET requests for /default/css/dojo/default.css. After digging around I found a copydojocss.sh script that Josh commited over 5 years ago (http://mail-archives.apache.org/mod_mbox/incubator-vcl-commits/200904.mbox/%[email protected]%3E ) that copies the Dijit thundra theme css files from dojo/dijit/themes/tundra to themes/$skin/css. Not sure I have seen this mentioned anywhere before so for all the testers of the bleeding edge web code from Josh: cd-ing into themes dir and running ./copydojocss.sh default should do the trick :). Now for the MySQL changes/additions I mentioned (btw, is there a conceptual/logical ER model available? I reverse engineered the physical data model from the vcl.sql script using MySQL Workbench and the results are quite messy - the auto-arrange function that Workbench provides fails miserably and I spent a couple of hours sorting out the diagram with usually 4 to 5 entities overlapping each other, not a pretty sight :). Also: are the current provisioning modules hard-coded in the Add Computer dialog? Even after all the database aditions shown below the Openstack provisioning option is missing, but it can be selected via "Actions for selected computers > Change Provisioning Engine" after a computer has already been created?) -- the first of the two new tables created as required by Young Oh's openstack module: CREATE TABLE IF NOT EXISTS `openstackComputerMap` ( `instanceid` varchar(50) NOT NULL, `computerid` smallint(5) unsigned, PRIMARY KEY (`instanceid`), UNIQUE KEY (`computerid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `openstackComputerMap` ADD CONSTRAINT `openstackComputerMap_ibfk_1` FOREIGN KEY (`computerid`) REFERENCES `computer` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; -- add the openstack module - let the DMBS assign an id INSERT INTO `vcl`.`module` (`name`, `prettyname`, `description`, `perlpackage`) VALUES ('provisioning_openstack', 'OpenStack Provisioning', '', 'VCL::Module::Provisioning::openstack'); -- also register it in the provisioning table INSERT INTO `vcl`.`provisioning` (`id`, `name`, `prettyname`, `moduleid`) VALUES (NULL, 'openstack', 'OpenStack Provisioning', (SELECT id FROM module WHERE name = 'provisioning_openstack')); -- aaand an extra entry in the OSinstalltype INSERT INTO `vcl`.`OSinstalltype` (`id` ,`name`) VALUES (NULL , 'openstack'); -- grab the ids of the new entries and insert them into the table -- that links provisioning with OSinstalltype INSERT INTO `vcl`.`provisioningOSinstalltype` (`provisioningid` ,`OSinstalltypeid` ) VALUES ((SELECT p.id FROM provisioning p WHERE p.name = 'openstack'), (SELECT ost.id FROM OSinstalltype ost WHERE ost.name = 'openstack')); -- conjure up an Ubuntu image out of thin air INSERT INTO `vcl`.`image` (`id`, `name`, `prettyname`, `ownerid`, `imagetypeid`, `platformid`, `OSid`, `imagemetaid`, `minram`, `minprocnumber`, `minprocspeed`, `minnetwork`, `maxconcurrent`, `reloadtime`, `deleted`, `test`, `lastupdate`, `forcheckout`, `maxinitialtime`, `project`, `size`, `architecture`, `description`, `usage`, `basedoffrevisionid`) VALUES (NULL, 'ubuntu1404-v0', 'Ubuntu 14.04', '1', '7', '1', '45', NULL, '2048', '1', '1000', '10', NULL, '10', '0', '0', NULL, '1', '0', 'vcl', '1450', 'x86', NULL, NULL, '0'); -- fake an image revision of the above image (TODO: use a subquery for grabbing imageid) INSERT INTO `imagerevision`(`id`, `imageid`, `revision`, `userid`, `datecreated`, `deleted`, `datedeleted`, `production`, `comments`, `imagename`, `autocaptured`) VALUES (NULL, '2', '0', '1', NOW(), '0', NULL, '1', NULL, 'ubuntu1404-v0', '0'); -- add the image to resource table INSERT INTO `vcl`.`resource` (`id`, `resourcetypeid`, `subid`) VALUES (NULL, (SELECT id FROM resourcetype WHERE name = 'image'), (SELECT id FROM image WHERE name = 'ubuntu1404-v0')); -- create another table for storing the mapping between VCL's idea of the -- image and the actual image already in OpenStack's Glance service CREATE TABLE IF NOT EXISTS `openstackimagerevision` ( `imagerevisionid` mediumint(8) unsigned NOT NULL, `imagedetails` longtext NOT NULL, `flavordetails` longtext NOT NULL, FOREIGN KEY (`imagerevisionid`) REFERENCES `imagerevision` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- manually fill in json data about the image and the instance flavor (IPs replaced with 'cloudmaster' and -- 'cloudmaster_private' hostnames) INSERT INTO `vcl`.`openstackimagerevision` ( `imagerevisionid`, `imagedetails`, `flavordetails`) VALUES ( (SELECT id FROM imagerevision WHERE imagename = 'ubuntu1404-v0'), '{"image": {"status": "ACTIVE", "updated": "2014-08-06T16:52:42Z", "links": [{"href": "http://cloudmaster:8774/v2/20cc1684668746fab952f3a1115d6118/images/b2a902b0-b6c5-4a2e-bd80-999e3a499dc0", "rel": "self"}, {"href": "http://cloudmaster:8774/20cc1684668746fab952f3a1115d6118/images/b2a902b0-b6c5-4a2e-bd80-999e3a499dc0", "rel": "bookmark"}, {"href": "http://cloudmaster_private:9292/20cc1684668746fab952f3a1115d6118/images/b2a902b0-b6c5-4a2e-bd80-999e3a499dc0", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "b2a902b0-b6c5-4a2e-bd80-999e3a499dc0", "OS-EXT-IMG-SIZE:size": 255066624, "name": "Ubuntu 14.04.1 LTS (Trusty Tahr) Daily Build 20140801", "created": "2014-08-06T16:52:39Z", "minDisk": 0, "progress": 100, "minRam": 0, "metadata": {}}}', '{"flavor": {"name": "m1.small", "links": [{"href": "http://cloudmaster:8774/v2/20cc1684668746fab952f3a1115d6118/flavors/2", "rel": "self"}, {"href": "http://cloudmaster:8774/20cc1684668746fab952f3a1115d6118/flavors/2", "rel": "bookmark"}], "ram": 2048, "OS-FLV-DISABLED:disabled": false, "vcpus": 1, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 20, "id": "2"}}' ); -- Bostjan On Thu, Sep 25, 2014 at 2:51 PM, Aaron Peeler <[email protected]> wrote: > Ditto - thanks for reporting that. > > Aaron > > On Thu, Sep 25, 2014 at 8:48 AM, Josh Thompson <[email protected]> wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Bostjan, >> >> We're not getting tired of your reports at all! We're quite happy for the >> testing and contributions. Thanks for the report. Keep them coming... >> >> Josh >> >> On Thursday, September 25, 2014 1:40:08 AM Bostjan Boric wrote: >>> Excellent, thanx for the update :). You must be getting tired of my >>> trivial bug reports, >>> but there are two tiny issues left: Aaron's removal of "KEY >>> `predictivemoduleid` (`predictivemoduleid`)" >>> left a trailing comma in vcl.sql:600 "KEY `IPaddress` (`IPaddress`)," >>> which is preventing >>> a successful import. >>> >>> Also vcl.sql:2202 - a semicolon is missing at the end of the ALTER >>> TABLE `semaphore`. >>> >>> > -----BEGIN PGP SIGNED MESSAGE----- >>> > Hash: SHA1 >>> > >>> > Bostjan, >>> > >>> > Oops - sorry about that. vcl.sql and update-vcl.sql are updated now. I >>> > had the changes in my working copy, but never committed them. >>> > >>> > Josh >>> > >>> > On Wednesday, September 24, 2014 5:49:15 PM Bostjan Boric wrote: >>> >> Woohoo, that was a swift reply & fix alright :). Thanx for pointing out >>> >> the update-vcl.sql script but neither this one nor the main vcl.sql seem >>> >> to contain the vcl.semaphore definition. Judging by your getSemaphore() >>> >> code the table definition hasn't changed since you last discussed it a >>> >> year >>> >> ago in the thread that you mention in your gigantic web code commit? >>> >> (http://mail-archives.apache.org/mod_mbox/vcl-dev/201307.mbox/%3C2232243. >>> >> J55 CAxcd2y@treebeard%3E) >>> >> >>> >> > -----BEGIN PGP SIGNED MESSAGE----- >>> >> > Hash: SHA1 >>> >> > >>> >> > Revision 1627322 fixes the loop problem when failing so that you don't >>> >> > get >>> >> > email bombed if you are missing the semaphore table (or have some other >>> >> > problem that would have resulted in abort getting called in a loop). >>> >> > >>> >> > Josh >>> >> > >>> >> > On Wednesday, September 24, 2014 8:57:46 AM Josh Thompson wrote: >>> >> >> Bostjan, >>> >> >> >>> >> >> Yikes! Obviously, the code did not fail very well there. :( I'll >>> >> >> look >>> >> >> at >>> >> >> making it fail without email bombing in the process. Thanks for >>> >> >> jumping >>> >> >> in >>> >> >> to test the latest code. >>> >> >> >>> >> >> You can run the update-vcl.sql script (in the mysql directory) to add >>> >> >> the >>> >> >> necessary bits to the database. Something like this: >>> >> >> >>> >> >> mysql -h localhost -u root -p < update-vcl.sql >>> >> >> >>> >> >> You'll also need to add >>> >> >> >>> >> >> define("SEMTIMEOUT", "45"); >>> >> >> >>> >> >> to your conf.php file. >>> >> >> >>> >> >> Josh >>> >> >> >>> >> >> On Wednesday, September 24, 2014 1:44:28 AM Bostjan Boric wrote: >>> >> >> > I decided to take the plunge and try to get fresh web code up & >>> >> >> > running >>> >> >> > on a clean install of VCL but failed miserably - the prime issue >>> >> >> > being >>> >> >> > the >>> >> >> > missing semaphore table. Before even being able to sign in I was >>> >> >> > greeted by a torrent of "An error has occurred. If this problem >>> >> >> > persists, >>> >> >> > please email...", with >>> >> >> > utils.pm:871 if(ONLINEDEBUG && checkUserHasPerm('View Debug >>> >> >> > Information')) >>> >> >> > supressing any meaningful information - great for production >>> >> >> > deployments, >>> >> >> > not so great for testing :). The fun part: the statements in the >>> >> >> > "else" >>> >> >> > clause of the above check actually managed to generate over 2000 >>> >> >> > messages >>> >> >> > (well, as long as it wasn't over 9000 ;)). I was sure the CentOS VM >>> >> >> > I >>> >> >> > was >>> >> >> > testing on wasn't running any MTAs. Turns out Postfix was running >>> >> >> > just >>> >> >> > fine... And that I was testing with an old config.php that had >>> >> >> > ERROREMAIL >>> >> >> > set to my actual Gmail address... Google's still delivering the >>> >> >> > error >>> >> >> > messages - 3 hours after I shut down the VM :P. That ought to teach >>> >> >> > me >>> >> >> > a >>> >> >> > lesson. >>> >> >> > >>> >> >> > In any case, I would be grateful if you could provide the necessary >>> >> >> > table >>> >> >> > creation statements for vcl.semaphore. >>> >> >> > >>> >> >> > Thanx in advance. Going back to cleaning up my inbox ;) >>> >> >> > >>> >> >> > > -----BEGIN PGP SIGNED MESSAGE----- >>> >> >> > > Hash: SHA1 >>> >> >> > > >>> >> >> > > Andy, >>> >> >> > > >>> >> >> > > Dojo provides a way to "compile" the code to make load times >>> >> >> > > faster. >>> >> >> > > "Compiling" takes a list of source files, sticks them all together >>> >> >> > > into >>> >> >> > > a >>> >> >> > > single file, removes unnecessary whitespace, and minimizes the >>> >> >> > > length >>> >> >> > > of >>> >> >> > > variable names. All of this is done so that page loads are >>> >> >> > > faster. >>> >> >> > > Without compiling it, each file is loaded individually. VCL works >>> >> >> > > fine >>> >> >> > > without having the compiled versions. We didn't start "compiling" >>> >> >> > > Dojo >>> >> >> > > stuff until the 2.3 release. >>> >> >> > > >>> >> >> > > There are two modules we've created that extend Dojo >>> >> >> > > functionality. >>> >> >> > > They >>> >> >> > > are in the web/js/vcldojo directory and have the necessary AFS >>> >> >> > > header >>> >> >> > > in >>> >> >> > > them. >>> >> >> > > >>> >> >> > > I didn't think we needed the ASF header in the vcl*.js files since >>> >> >> > > we're >>> >> >> > > not modifying the code. However, I didn't think about the two >>> >> >> > > modules >>> >> >> > > we've created being compiled in. They are only in four of the >>> >> >> > > vcl*.js >>> >> >> > > files (2 compressed, 2 uncompressed - vclViewRequests.js and >>> >> >> > > vclEditBlockAllocation.js + uncompressed versions). So, those >>> >> >> > > would >>> >> >> > > need >>> >> >> > > the ASF header in them. I'm not sure if the other files should >>> >> >> > > have >>> >> >> > > it >>> >> >> > > or not. >>> >> >> > > >>> >> >> > > I never commited the vcl*.js files to the repository since they >>> >> >> > > are >>> >> >> > > generated files. >>> >> >> > > >>> >> >> > > Josh >>> >> >> > > >>> >> >> > > On Monday, September 22, 2014 2:42:25 PM Andy Kurth wrote: >>> >> >> > >> Thank you for this information. I knew we were shipping dojo >>> >> >> > >> with >>> >> >> > >> the >>> >> >> > >> release but was unaware the dojo directory had custom source code >>> >> >> > >> under >>> >> >> > >> it. >>> >> >> > >> >>> >> >> > >> What is different between stock dojo and dojo-1.6.2vcl? >>> >> >> > >> >>> >> >> > >> I see several files in dojo-1.6.2vcl such as the vcl*.js files. >>> >> >> > >> Is >>> >> >> > >> this >>> >> >> > >> code in the repository somewhere? >>> >> >> > >> >>> >> >> > >> I looked back at the 2.3.2 packaged release and the see >>> >> >> > >> VCL-specific >>> >> >> > >> files >>> >> >> > >> under the dojo directory were included. These do not include an >>> >> >> > >> ASF >>> >> >> > >> header. Please address this for future releases. >>> >> >> > >> >>> >> >> > >> Thanks, >>> >> >> > >> Andy >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> On Mon, Sep 15, 2014 at 10:50 AM, Josh Thompson >>> >> >> > >> <[email protected]> >>> >> >> > >> >>> >> >> > >> wrote: >>> >> >> > >> > -----BEGIN PGP SIGNED MESSAGE----- >>> >> >> > >> > Hash: SHA1 >>> >> >> > >> > >>> >> >> > >> > As you may have seen, I did a rather large check in of the web >>> >> >> > >> > code >>> >> >> > >> > to >>> >> >> > >> > trunk. >>> >> >> > >> > Sorry for checking in so much at one time. I prefer not to >>> >> >> > >> > check >>> >> >> > >> > in >>> >> >> > >> > that >>> >> >> > >> > much >>> >> >> > >> > together, but it included a rewrite of both the reservations >>> >> >> > >> > pages >>> >> >> > >> > and >>> >> >> > >> > how >>> >> >> > >> > all >>> >> >> > >> > of the resources are handled. >>> >> >> > >> > >>> >> >> > >> > A few notable changes are that the New Reservation, Current >>> >> >> > >> > Reservations, >>> >> >> > >> > and >>> >> >> > >> > the reserving part of Server Profiles pages have been combined >>> >> >> > >> > into >>> >> >> > >> > one >>> >> >> > >> > page >>> >> >> > >> > named Reservations. Also, all of the pages for managing >>> >> >> > >> > resources >>> >> >> > >> > have >>> >> >> > >> > been >>> >> >> > >> > rewritten to be more dynamic. The Computer Utilities page has >>> >> >> > >> > been >>> >> >> > >> > incorporated into the Edit Computer Profiles page. >>> >> >> > >> > >>> >> >> > >> > If anyone wants to try out trunk, after getting the code, >>> >> >> > >> > you'll >>> >> >> > >> > need >>> >> >> > >> > to >>> >> >> > >> > either use a stock distribution of Dojo Toolkit 1.6.2 (i.e. not >>> >> >> > >> > one >>> >> >> > >> > from a >>> >> >> > >> > previous release) or download a custom compiled version from >>> >> >> > >> > >>> >> >> > >> > http://people.apache.org/~jfthomps/updates/dojo-1.6.2vcl.tar.gz >>> >> >> > >> > >>> >> >> > >> > Then, you'll need to go to the root directory of your web code >>> >> >> > >> > and >>> >> >> > >> > rename >>> >> >> > >> > the >>> >> >> > >> > existing dojo directory. Finally, untar the archive from above >>> >> >> > >> > which >>> >> >> > >> > will >>> >> >> > >> > create a new dojo directory. >>> >> >> > >> > >>> >> >> > >> > You'll also need a copy of Spyc 0.5.1 from: >>> >> >> > >> > >>> >> >> > >> > https://github.com/mustangostang/spyc/releases >>> >> >> > >> > >>> >> >> > >> > Extract the archive under your .ht-inc directory. Spyc handles >>> >> >> > >> > YAML >>> >> >> > >> > data >>> >> >> > >> > which may be stored in the variable table. >>> >> >> > >> > >>> >> >> > >> > Josh >>> >> >> > >> > - -- >>> >> >> > >> > - ------------------------------- >>> >> >> > >> > Josh Thompson >>> >> >> > >> > VCL Developer >>> >> >> > >> > North Carolina State University >>> >> >> > >> > >>> >> >> > >> > my GPG/PGP key can be found at pgp.mit.edu >>> >> >> > >> > >>> >> >> > >> > All electronic mail messages in connection with State business >>> >> >> > >> > which >>> >> >> > >> > are sent to or received by this account are subject to the NC >>> >> >> > >> > Public >>> >> >> > >> > Records Law and may be disclosed to third parties. >>> >> >> > >> > -----BEGIN PGP SIGNATURE----- >>> >> >> > >> > Version: GnuPG v2.0.22 (GNU/Linux) >>> >> >> > >> > >>> >> >> > >> > iEYEARECAAYFAlQW/LIACgkQV/LQcNdtPQPWngCfYHLUNRukjX0ObwTQ1EUm6Ta >>> >> >> > >> > 3 >>> >> >> > >> > BaQAmwZh2MVrv42ZtFoILeasxmqfOGsl >>> >> >> > >> > =BQ2N >>> >> >> > >> > -----END PGP SIGNATURE----- >>> >> >> > > >>> >> >> > > - -- >>> >> >> > > - ------------------------------- >>> >> >> > > Josh Thompson >>> >> >> > > VCL Developer >>> >> >> > > North Carolina State University >>> >> >> > > >>> >> >> > > my GPG/PGP key can be found at pgp.mit.edu >>> >> >> > > >>> >> >> > > All electronic mail messages in connection with State business >>> >> >> > > which >>> >> >> > > are sent to or received by this account are subject to the NC >>> >> >> > > Public >>> >> >> > > Records Law and may be disclosed to third parties. >>> >> >> > > -----BEGIN PGP SIGNATURE----- >>> >> >> > > Version: GnuPG v2.0.22 (GNU/Linux) >>> >> >> > > >>> >> >> > > iEYEARECAAYFAlQhyLIACgkQV/LQcNdtPQPQOgCeJgMZNWlgD1Tu3YwOqqgyTZpL >>> >> >> > > av0An1ADq+GWYCjDFQJKL8MPSiHIPqBy >>> >> >> > > =gI73 >>> >> >> > > -----END PGP SIGNATURE----- >>> >> >> >>> >> >> -- >>> >> >> ------------------------------- >>> >> >> Josh Thompson >>> >> >> VCL Developer >>> >> >> North Carolina State University >>> >> >> >>> >> >> my GPG/PGP key can be found at pgp.mit.edu >>> >> >> >>> >> >> All electronic mail messages in connection with State business which >>> >> >> are sent to or received by this account are subject to the NC Public >>> >> >> Records Law and may be disclosed to third parties. >>> >> > >>> >> > - -- >>> >> > - ------------------------------- >>> >> > Josh Thompson >>> >> > VCL Developer >>> >> > North Carolina State University >>> >> > >>> >> > my GPG/PGP key can be found at pgp.mit.edu >>> >> > >>> >> > All electronic mail messages in connection with State business which >>> >> > are sent to or received by this account are subject to the NC Public >>> >> > Records Law and may be disclosed to third parties. >>> >> > -----BEGIN PGP SIGNATURE----- >>> >> > Version: GnuPG v2.0.22 (GNU/Linux) >>> >> > >>> >> > iEUEARECAAYFAlQizIIACgkQV/LQcNdtPQOMKACfUTsFVZcGMbbNrIS0DeYKQAuz >>> >> > 2OIAljQBTR2AuJKoqkIWiGG7C1FPFHo= >>> >> > =qMEd >>> >> > -----END PGP SIGNATURE----- >>> > >>> > - -- >>> > - ------------------------------- >>> > Josh Thompson >>> > VCL Developer >>> > North Carolina State University >>> > >>> > my GPG/PGP key can be found at pgp.mit.edu >>> > >>> > All electronic mail messages in connection with State business which >>> > are sent to or received by this account are subject to the NC Public >>> > Records Law and may be disclosed to third parties. >>> > -----BEGIN PGP SIGNATURE----- >>> > Version: GnuPG v2.0.22 (GNU/Linux) >>> > >>> > iEYEARECAAYFAlQi7aoACgkQV/LQcNdtPQOmDQCdGCSanPr4jMqt9kNOglsN3L1c >>> > beMAmwWVfOELLFnGD8fuYbUcYW9TWg5e >>> > =BX2U >>> > -----END PGP SIGNATURE----- >> - -- >> - ------------------------------- >> Josh Thompson >> VCL Developer >> North Carolina State University >> >> my GPG/PGP key can be found at pgp.mit.edu >> >> All electronic mail messages in connection with State business which >> are sent to or received by this account are subject to the NC Public >> Records Law and may be disclosed to third parties. >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2.0.22 (GNU/Linux) >> >> iEYEARECAAYFAlQkDysACgkQV/LQcNdtPQMijACfaYmFmuqQU3MQaKBUdS/59zBs >> uMgAn36ltbcr3wmw33t4avLSot7DldJj >> =ez32 >> -----END PGP SIGNATURE----- >> > > > > -- > Aaron Peeler > Program Manager > Virtual Computing Lab > NC State University > > All electronic mail messages in connection with State business which > are sent to or received by this account are subject to the NC Public > Records Law and may be disclosed to third parties.
