<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Stuart,<br><br></div><div class="gmail_quote">I think I got this problem solved by cleaning up the entries in the nohist_domainroles.db. Tested it on the development server and now the move_construction moves the usernames to the correct domain. Thanks for your help -hk<br>

<br><br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
> Thanks for following this up. The failure was on the development machine.<br>
<br>
</div>You will encounter the same issue when you update your production<br>
server, if nohist_domainroles.db on the production server is the same<br>
as on the development server (I assume you rsync files from one to the<br>
other).<br>
<br>
A quick way to check for this issue, via the web GUI on the production<br>
server, is to log-in and select the Domain Coordinator role in the fsu<br>
domain, and use:<br>
<div class=""><br>
Main Menu -> "Create users or modify the roles and privileges of<br>
</div>users" -> "Manage Users", and select "Author" in the "Role" dropdown<br>
list, then click "Display List of Users"<br>
<br>
to see if ADAPT, HighSchoolBioLib, PhysAuthors, and PhysicalScienceLib<br>
are indeed listed (erroneously) as authors in the fsu domain.<br>
<br>
Alternatively, via the command line you could use:<br>
<br>
/home/httpd/perl/debug/<a href="http://dump_db.pl" target="_blank">dump_db.pl</a> -u<br>
/home/httpd/lonUsers/fsu/nohist_domainroles.db |grep ^au:<br>
<div class=""><br>
> Looking at your check list of looking up for usernames, all the usernames<br>
> assigned to fsu do not exist on mysql entries (step (e)) on the development<br>
> machine but they all show up on the production machine.<br>
<br>
</div>The fact that the names exist in the allusers table on the production<br>
server is not going to help, if nohist_domainroles.db for the fsu<br>
domain contains bad data, because if a domain has been found at step<br>
(a) from that GDBM file, then the script will not use (d) or (e) to<br>
determine domain.<br>
<br>
On a separate note, if you wish to use your dev server as an upgrade<br>
testbed then I recommend including entries for the fsuK12 domain in<br>
both /home/httpd/lonTabs/hosts.tab and /home/httpd/lonTabs/domain.tab<br>
(just make sure you have the dev server hostname in place of the<br>
production server hostname).<br>
<br>
Currently, when cron runs <a href="http://searchcat.pl" target="_blank">searchcat.pl</a> (if you have that enabled), the<br>
allusers table will only be populated from /home/httpd/lonUsers/fsu,<br>
because lonnet::machine_domains() will only list fsu, given the<br>
current domains/hosts it knows about.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Stuart Raeburn<br>
LON-CAPA Academic Consortium<br>
<br>
Quoting "H. K. Ng" <<a href="mailto:hkng@fsu.edu">hkng@fsu.edu</a>>:<br>
<br>
> Hi Stuart,<br>
><br>
> Thanks for following this up. The failure was on the development machine.<br>
> Looking at your check list of looking up for usernames, all the usernames<br>
> assigned to fsu do not exist on mysql entries (step (e)) on the development<br>
> machine but they all show up on the production machine. So your script may<br>
> be fine the way it is. My plan is to upgrade (second week of Aug) after the<br>
> summer term ends.<br>
><br>
> Regards,<br>
> -hk<br>
><br>
><br>
><br>
> On Mon, Jul 7, 2014 at 1:40 PM, Stuart Raeburn <<a href="mailto:raeburn@msu.edu">raeburn@msu.edu</a>> wrote:<br>
><br>
>> Hi Hon-Kie,<br>
>><br>
>> > Only one of them has published resources - the others do not.<br>
>><br>
>> Whether or not an author has published resources is not especially<br>
>> relevant, since we want to be able to move authoring spaces for<br>
>> authors to the correct domain on a multi-domain server, regardless of<br>
>> whether they have published anything.<br>
>><br>
>> The issue here is that there is incorrect data in the GDBM file:<br>
>> /home/httpd/lonUsers/fsu/nohist_domainroles.db<br>
>> on your server.<br>
>><br>
>> That file contains fsu author role entries for the following fsuK12<br>
>> domain users:<br>
>><br>
>> ADAPT<br>
>> HighSchoolBioLib<br>
>> PhysAuthors<br>
>> PhysicalScienceLib<br>
>><br>
>> which should not be there.<br>
>><br>
>> There are no author role entries for those same users in the<br>
>> corresponding GDBM file for the fsuK12 domain:<br>
>><br>
>> /home/httpd/lonUsers/fsuK12/nohist_domainroles.db<br>
>><br>
>> (which actually makes sense, based on role creation and log-in history<br>
>> -- see below).<br>
>><br>
>> Anyway, as a consequence of this bizarre situation, the interactive<br>
>> <a href="http://move_construction_spaces.pl" target="_blank">move_construction_spaces.pl</a> script determined these four users were<br>
>> solely fsu authors, and as a result did not prompt you to choose a<br>
>> domain.<br>
>><br>
>> The role start times recorded in fsu/nohist_domainroles.db for those<br>
>> four users are strange namely:<br>
>><br>
>> Thu Jun 5 08:04:11 am 2008 (EDT)<br>
>> Thu Jun 5 08:22:13 am 2008 (EDT)<br>
>> Thu Jun 5 08:28:57 am 2008 (EDT)<br>
>> Thu Jun 5 08:30:46 am 2008 (EDT)<br>
>><br>
>> whereas the expected values would be:<br>
>><br>
>> Wed Mar 17 04:29:38 pm 2004 (EST)<br>
>> Wed Jun  9 04:23:12 pm 2004 (EDT)<br>
>> Thu Oct 13 02:50:04 pm 2005 (EDT)<br>
>> Tue Dec 21 02:08:36 pm 2004 (EST)<br>
>><br>
>> if these corresponded to the start times for those author roles in the<br>
>> fsuK12 domain.<br>
>><br>
>> The solution here is to clean up the nohist_domainroles.db files for<br>
>> the fsu domain before running the <a href="http://move_construction_spaces.pl" target="_blank">move_construction_spaces.pl</a> script.<br>
>> I will contact you off-list, to provide you with a script to do that.<br>
>><br>
>> To my knowledge there are four multi-domain servers in the LON-CAPA<br>
>> network:<br>
>> <a href="http://loncapa10.fsu.edu" target="_blank">loncapa10.fsu.edu</a>, <a href="http://educog.com" target="_blank">educog.com</a>, <a href="http://capa4.phy.ohiou.edu" target="_blank">capa4.phy.ohiou.edu</a>, and <a href="http://loncapa.mit.edu" target="_blank">loncapa.mit.edu</a>.<br>


>><br>
>> I tested authoring space migration on <a href="http://educog.com" target="_blank">educog.com</a> some months ago and<br>
>> saw no issues in moving spaces for 702 authors in 140 domains, and<br>
>> Mark Lucas reported authoring space migration worked OK on capa4 a few<br>
>> weeks ago.<br>
>><br>
>> Checking nohist_domainroles.db files on <a href="http://educog.com" target="_blank">educog.com</a> I see no<br>
>> inconsistencies of the type seen for the fsuK12 domain.<br>
>><br>
>> Use of nohist_domainroles.db was included for the first time in<br>
>> LON-CAPA rev. 2.1.0 (December 2005). Population of that GDBM file<br>
>> occurs at role assignment, and also when a user logs-in.<br>
>><br>
>> According to the activity.log data for these four users, it is not<br>
>> unsurprising that there are no entries in<br>
>> /home/httpd/lonUsers/fsuK12/nohist_domainroles.db<br>
>> given that the last log-ins are recorded as follows:<br>
>><br>
>> Thu Mar 18 07:31:10 2004<br>
>> Wed Jun  9 16:24:18 2004<br>
>> Thu Oct 13 14:50:26 2005<br>
>> Thu Feb 10 16:09:07 2005<br>
>><br>
>> What is odd, however, are that the datestamps for the spurious entries<br>
>> in /home/httpd/lonUsers/fsu/nohist_domainroles.db are all from June 5,<br>
>> 2008.<br>
>> I do wonder what was going on that day (I would expect you would have<br>
>> been running LON-CAPA 2.6.3 at that time).<br>
>><br>
>> For those who are interested the logic in <a href="http://move_construction_spaces.pl" target="_blank">move_construction_spaces.pl</a><br>
>> is as follows:<br>
>><br>
>> (a) author role information is retrieved from the<br>
>> nohist_domainroles.db GDBM file in /home/httpd/lonUsers/<domain> for<br>
>> each domain hosted on that library server.<br>
>><br>
>> (b) If the same username is used for an author from more than one<br>
>> domain then you are prompted to either skip that username, or choose<br>
>> from one of the domains.<br>
>><br>
>> (c) If there is a directory: /home/<username>/public_html (the<br>
>> pre-2.11 location of Authoring Spaces), and <username> was not found<br>
>> in nohist_domainroles.db for any domains, then, at that stage a check<br>
>> is made for publications in /home/httpd/html/res to determine the<br>
>> user's domain.<br>
>><br>
>> (d) If we still don't know the domain, then roles.db files for<br>
>> <username> are checked for all domains hosted on the server, to look<br>
>> for au roles for that user.<br>
>><br>
>> (e) If we still don't know the domain, then a query (username =<br>
>> '<username>') is made to the allusers MySQL table.<br>
>><br>
>> (f) If we still don't know the domain, then a message will be<br>
>> displayed: "WARNING: <username> has no domain" and you will be<br>
>> prompted to skip, or enter a domain.<br>
>><br>
>><br>
>> Stuart Raeburn<br>
>> LON-CAPA Academic Consortium<br>
>><br>
>><br>
>> Quoting "H. K. Ng" <<a href="mailto:hkng@fsu.edu">hkng@fsu.edu</a>>:<br>
>><br>
>> > Only one of them has published resources - the others do not.<br>
>> ><br>
>> > I did an undo, and rerun the script. It didn't prompt me to move the<br>
>> ADAPT<br>
>> > directory to fsuK12 even though there are published resources under<br>
>> > res/fsuK12<br>
>> ><br>
>> > rerun <a href="http://move_construction_spaces.pl" target="_blank">move_construction_spaces.pl</a><br>
>> > ...<br>
>> > Moved '/home/ADAPT/public_html' to '/home/httpd/html/priv/fsu/ADAPT'.<br>
>> > Removed empty directory: '/home/ADAPT/'<br>
>> ><br>
>> ><br>
>> > ls -l /home/httpd/html/res/fsuK12/<br>
>> > total 20<br>
>> > drwxr-xr-x 10 www www 4096 Jul  7  2004 ADAPT<br>
>> > drwxr-xr-x 15 www www 4096 May 28 13:51 AlgebraILib<br>
>> > drwxr-x---  5 www www 4096 Aug 15  2011 fsuK12-domainconfig<br>
>> > drwxr-xr-x 24 www www 4096 Sep 23  2010 HighSchoolPhysicsLib<br>
>> > drwxr-xr-x 20 www www 4096 Aug  9  2005 middleScienceLib<br>
>> ><br>
>> ><br>
>> > Thanks,<br>
>> > -hk<br>
>> ><br>
>> ><br>
>> > On Tue, Jul 1, 2014 at 9:24 AM, Gerd Kortemeyer <<a href="mailto:korte@lite.msu.edu">korte@lite.msu.edu</a>><br>
>> wrote:<br>
>> ><br>
>> >> Hi,<br>
>> >><br>
>> >> On Jul 1, 2014, at 9:17 AM, H. K. Ng <<a href="mailto:hkng@fsu.edu">hkng@fsu.edu</a>> wrote:<br>
>> >><br>
>> >> > I am pretty sure it didn?t prompt me - there were a few prompts for<br>
>> some<br>
>> >> other construction spaces but not these ones.<br>
>> >><br>
>> >> That is slightly disturbing. Do you find the respective resources spaces<br>
>> >> under /res/fsuK12/(username) - or did these people maybe never publish?<br>
>> >><br>
>> >> - Gerd.<br>
>> >> _______________________________________________<br>
>> >> LON-CAPA-admin mailing list<br>
>> >> <a href="mailto:LON-CAPA-admin@mail.lon-capa.org">LON-CAPA-admin@mail.lon-capa.org</a><br>
>> >> <a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin</a><br>
>><br>
>> _______________________________________________<br>
>> LON-CAPA-admin mailing list<br>
>> <a href="mailto:LON-CAPA-admin@mail.lon-capa.org">LON-CAPA-admin@mail.lon-capa.org</a><br>
>> <a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin</a><br>
<br>
_______________________________________________<br>
LON-CAPA-admin mailing list<br>
<a href="mailto:LON-CAPA-admin@mail.lon-capa.org">LON-CAPA-admin@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin" target="_blank">http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>