Re: OFW access from linux

2009-09-17 Thread Paul Fox
deepak wrote:
  On Sep 15 2009, at 17:31, Paul Fox was caught saying:
   john wrote:
  there's no SysRq key on the XO keyboard, so you'll need to use a
  break on the serial console to invoke it...
 
 Please.  If you're going to put this hook in, which I think is a great
 idea, at least make it work on the standard hardware!  And when the
 operating system is not very responsive.  That's when you'll need it
 for debugging or resetting the system.  Without taking the plastic
 apart, finding a part with no known suppliers, and soldering it to
 your motherboard.
   
   i agree.  getting the hook in place was a first step, and
   satisfies my immediate need for wanting to be able to look at and
   modify h/w registers during development -- the /proc trigger
   is sufficient for that.  we have a constant tension between just
   make it work on the XO and make it so we have a prayer of
   merging it upstream without lots of pushback, and i confess i
   erred towards the latter, this time.  custom key combinations
   would require more extensive changes to the input drivers than i
   was willing to take on last night.
  ...
 
 There are some pretty obscure keys on the XO keyboard -- howabout
 something like holding down the leftmost and rightmost gradually
 increasing sized dots keys in the top row, and then pressing the
 M-for-Mitch key?
   
   i would applaud, encourage, and otherwise buy beer for anyone that
   could help out in making something like this happen.  (i might get
   to it someday, myself, but that will no doubt be _after_ i need it.)
  
  
  I disagree. sysrq is the standard way of trapping keyboard
  sequences to cause special kernel actions. If you want another set

but the issue is that there's no such key on the XO keyboard:  SysRq/PrtSc
doesn't exist.

  of key sequences to make this happen, you probably want to trap
  it in X and have that send the proper sequnce to the /proc. I
  guess don't see the benefit of moving from a simple two key 
  combination to some multi-key command.

it did occur to me earlier that adding a hook such as you describe to
olpc-kbdshim (which is watching all mouse and keyboard traffic
anyway) might be useful.  if the system is hung, it won't help, but
it might in many cases.

  
  In the case that the kernel is hung to the point that we can't
  talk to it at all, if the hang is caused by an oops, we can
  have a patch that traps calls to die() and bug() and jumps to
  OFW. This is what KGDB does, so there is some precedent.
  We could also have some magic in the EC to look for a sequence
  of keys that signals a low-level handler to kick into OFW in
  the case of major lockup (assuming there's enough space in
  EC code space to do this...).

interesting idea:  an EC solution would be the most failsafe, but
i don't believe it currently actually looks at any of the
keystroke data as it passes through.  (except for the keys on the
screen bezel, which it has complete responsibility for.)  i think
we'd have to see a pretty strong need to go down this path, though.

  
  I've not seen many total hangs that can't be fixed with some
  printk debugging + KGDB when it works. Or a JTAG unit, but
  I don't think we can do that on the XO, right?

right, no jtag.

but as you say, cases where the system is well and truly hung
and need sysrq aren't all that frequent.

paul

  
  ~Deepak
  

=-
 paul fox, p...@laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: XO-1 Mesh support in F11, testing request

2009-09-17 Thread Daniel Drake
2009/9/16 Daniel Drake d...@laptop.org:
 all rpms at
 http://dev.laptop.org/~dsd/20090916/

found a few minutes to find a few problems:

forgot to install the fdi file
olpcmesh.py is not being installed from the sugar package
shortened dhcpcd timeout not working
Sugar never seems to give up trying school mesh (or never falls back
to link local)

no time to investigate further now

Daniel
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: XO-1 Mesh support in F11, testing request

2009-09-17 Thread James Cameron
Haven't had a chance to try this yet, been busy with assessment tasks
... but what particular F11 for XO-1 build are you testing with?

-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


B2 build status

2009-09-17 Thread John Watlington

When Quanta finally started the build at 7PM on Wed. they
discovered two problems:
A - zcat to one of the three candidate microSD cards were taking
  four to six times longer than it should have.
B - The units were powering off occasionally when turning on
the WLAN card.

They had to stop production, and rework all the motherboards
to solve B (I had proposed the solution used on Monday, but
they tried a different one first).   This was completed this afternoon,
and 120 reworked machines were put into a twelve hour burn-in
(with many WLAN card power cycles) over Thursday night.

Mitch, cjb, pgf, dsd, Quozl, smithbone, and I worked on problem A
all day, and haven't found the root cause yet.   As we are reasonably
sure that there should be a software solution, Quanta is switching
to use fs-update in their manufacturing process and will ship
these machines to us for further testing.The SD card in question
is one that they had mistakenly not provided to me ahead of time
for qualification.

Quanta will restart the production line Friday morning to build the
remainder of the B2 laptops, and they should be shipped to 1CC on
Sunday.

Salutations from Song Jiang,
wad

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


lease not fount

2009-09-17 Thread Kevin Mauricio Benavides Castro
Como estas martin he tengo un problema te lo explico


 en el colegio que entregamos  en el fidel coloma realizamos una visita
 anti-ayer por lo que dos niños se hacercaron a mi con sus xo.

 cuando ensiendo la XO manda la pantalla de Invalid System Date y mas habajo
 lease expired y empieza hacer el procedimiento de busqueda en los
 dispositivo de almacenamineto ej:(MicroSD, USB y Wifi) entonces lo  que yo
 hago es saco el serial y el uuid de la XO y hago un archivo csv con los
 datos antes mecionado y despues me voy hacerle el nuevo leasig.sig en la
 maquina firmadora, una ves hecho eso y generado el leasig.sig, ahora
 introdusco  la usb en la XO que esta bloqueada y la coloca a la hora que
 empieza a buscar los disitivo y lo acepta luego quito la usb y queda lista,
 pero lo mas raro de todo es que cuando la reinicio me vuelve aparecer el
 mesaje que antes me mostraba de Invalid System Date + lease expired.


 que pasa que no me esta copiando la leasig.








-- 
Kevin Mauricio Benavides Castro
Fundación Zamora Terán
www.fundacionzt.org
Technical Support-Nicaragua OLPC
-
www.fedoraproject.org
Fedora Project Developer
Linux User: #12356
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: lease not fount

2009-09-17 Thread Martin Langhoff
2009/9/17 Kevin Mauricio Benavides Castro webmaster.ac@gmail.com:
 cuando ensiendo la XO manda la pantalla de Invalid System Date y mas
 habajo lease expired y empieza hacer el procedimiento de busqueda en los
 dispositivo de almacenamineto ej:(MicroSD, USB y Wifi) entonces lo  que yo
 hago es saco el serial y el uuid de la XO y hago un archivo csv con los
 datos antes mecionado y despues me voy hacerle el nuevo leasig.sig en la
 maquina firmadora, una ves hecho eso y generado el leasig.sig, ahora

Ok. Tienes el procedimiento casi correcto.

Para corregir la fecha cuando el XO dice 'invalid system date'
necesitas un devkey. En vez de generar el lease, tienes que generar un
'devkey' (hay un programa identico al que genera leases, que genera un
devkey para esa maquina).

Con el devkey en un USB, arrancas la maquina y desde open firmware
corriges el reloj -- instrucciones aqui:
http://wiki.laptop.org/go/Fix_Clock#Developer_Key_Procedure_-_for_symptom_2_.28screen_turns_on.29

(No hace falta poner un firmware nuevo, el que tienen esas maquinas ya es Q2E41)

Ahora _esta no es la solución completa_. Esas máquinas estaban andando
bien la semana anterior cuando ustedes las prepararon, lo cual
significa que la batería del reloj está mala, o está un poco suelta.
Mañana esa XO va a tener le mismo problema.

Así que lo que tienes que hacer es llevar

- un destornillador
- el pegamento especial que tienen para arreglar el soporte para la bateria
- una bateria de reemplazo -- la puedes comprar en ferreterías, lleva
una bateria de muestra.
- un cepillo de dientes

Cuando abres la XO, lo mas importante es ver que la bateria no haya
perdido el jugo corrosivo.

 - Si hay corrosión
   http://wiki.laptop.org/go/Fix_Clock#Fixing_the_leaking_battery_problem

 - Si la bateria esta 'floja' en el soporte
http://wiki.laptop.org/go/Fix_Clock#Fixing_the_loose_battery_problem

Puede que no tenga corrosión y que el soporte esté bien, y que
simplemente la batería esté vieja y haya que cambiarla.

abrazos,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: OFW access from linux

2009-09-17 Thread James Cameron
On Thu, Sep 17, 2009 at 05:10:06AM -0400, Paul Fox wrote:
 but the issue is that there's no such key on the XO keyboard:  SysRq/PrtSc
 doesn't exist.

Key to the left of frame and above erase is still free isn't it?  ;-)

The legend matches my idea of switching to OFW.  Another system hiding
in the background.

Still, kernel handling a keyboard key still requires some sanity on the
part of the kernel.

-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Daniel Bennett
Martin,

I ran :
yum --enablerepo=olpcxs-testing update

It downloaded overnight and I ran the upgrade this morning.

It both seemed to work and seemed to fail.

Failure: during the install of the kernal module there was an I/O error
and I believe a second failure

cat /etc/issue returns:
OLPC School Server release 9-0.5.2
Kernel \r on an \m (\l)
is this what I should see after update?


Success: The install as a whole seems to have completed successfully.

# uname -a returns
Linux schoolserver.lccnjimeta.org 2.6.27.25-78.2.56.fc9.i686 #1 SMP TH Jun
18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux
I am guessing that the fc9.686 means fedora 9?  That would be success right?

when I try to re-run the yum --enablerepo...  again it returns:
Setting up Upddate Process
No Packages marked for Update

After running the update ejabberd was still crashing when I started it.
However, I hadn't followed the instructions for clearing out ejabberd yet
from your first reply.  I tried following those steps (after upgrading to
.6) and they seem to have worked...

The service runs now without crashing, I can ping
schoolserver.lccnjimeta.org and 172.18.0.1 successfully
#hostname -f returns schoolserver.lccnjimeta.org

However, even though I can ping these from my laptop, I can't access the web
based jabber interface.  I'm certain that they are communicating further,
because when I open http://172.18.01/  (without :5280/admin) it leads me to
a page telling me that moodle is currently disabled.

Any ideas?

Thanks again!
-Dan


On Wed, Sep 16, 2009 at 2:56 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Wed, Sep 16, 2009 at 3:36 PM, Daniel Bennett dant...@gmail.com wrote:
  I installed what I think was 0.5.2 which was the newest stable release
  available when I brought it to Jimeta in late March of 09.

 What does the following command say?

  cat /etc/issue

  So the steps that I should take are:
 
  1) backup some part of my server (how should I go about doing this?)  Are
 we
  talking about making a copy of a particular directory here, or running a
  utility of some kind?

 Uh, so many ways to skin this cat! You will need an external disk for
 this (usb?) and probably a LiveUSB disk (or LiveCD).

 If you are familiar with cloning Linux OSs with rsync, that's one path
 (that has a quota of DIY). If you want an easy-to-use answer, I hear
 Mondo Rescue is popular and good, but I haven't used it myself.

 Your 2,3,4 steps are right...

  5) Configure my magically working Jabbery goodness

 Step 5 is actually Enjoy magic workingness

  And how stable is this .6 pre-release candidate, because I want this to
 be
  as stable as possible when I leave.

 Definitely more stable than 0.5.2 which messed up your ejabberd install :-)




 m
 --
  martin.langh...@gmail.com
  mar...@laptop.org -- School Server Architect
  - ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  - http://wiki.laptop.org/go/User:Martinlanghoff

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Daniel Bennett
I've replied in line below.

On Thu, Sep 17, 2009 at 11:12 AM, Martin Langhoff martin.langh...@gmail.com
 wrote:

 On Thu, Sep 17, 2009 at 11:51 AM, Daniel Bennett dant...@gmail.com
 wrote:
  I ran :
  yum --enablerepo=olpcxs-testing update
 
  It downloaded overnight and I ran the upgrade this morning.

 Good...

  It both seemed to work and seemed to fail.
 
  Failure: during the install of the kernal module there was an I/O error
  and I believe a second failure

 Hmmm. An I/O error sounds a serious problem. You can verify a
 successful install of the kernel by doing:

   rpm -V kernel

 it should return without printing anything (no news: good news).

 dan: I got no news, so I guess it worked


  cat /etc/issue returns:
  OLPC School Server release 9-0.5.2
  Kernel \r on an \m (\l)
  is this what I should see after update?

 that's normal until I formally release it :-)

  Success: The install as a whole seems to have completed successfully.

 good!

  After running the update ejabberd was still crashing when I started it.

 That is odd.

 dan: you may have answered this before reading the rest of my email, but if
it was unclear, ejabberd  is no longer crashing


  The service runs now without crashing, I can ping
  schoolserver.lccnjimeta.org and 172.18.0.1 successfully
  #hostname -f returns schoolserver.lccnjimeta.org
 
  However, even though I can ping these from my laptop, I can't access the
 web
  based jabber interface.

 The webbased interface is disabled now. No longer needed.

 dan: I ran:
 ejabberdctl connected-users
It returns long output like (the random string here is made up by me):
34209381afaa07fa9df...@schoolserver.lccnjimeta.org/Telepathy

and the number of users has grown some this morning, from about 4 to over
10

(we have a number of XO's in use here this morning for continued teacher
training)

So I definitely buy that some automagic is going on here.  Is there perhaps
documentation I can view that explains to me how to create different groups
for different classes and generally manage things without the now obsolete
web interface?
(real world example: I would like to put all of my 5th graders in a group
together, my 2nd graders in another, etc)  I might even want to change these
on a regular basis.

Is this all done through moodle perhaps?  Is there documentation I should be
using for that?  If you could send me a link it would be much appreciated.



  I'm certain that they are communicating further,
  because when I open http://172.18.01/  (without :5280/admin) it leads me
 to
  a page telling me that moodle is currently disabled.

 Moodle is disabled? Did you restart the machine? Can you tell us the
 output of the commands below?

   service pgsql-xs status


Dan: postmaster is stopped


   chkconfig --list pgsql-xs


Dan: service pgsql-xs supports chkconfig, but is not reerenced in any
runlevel (run 'chkconfig --add pgsql-xs')

Should I run this as it says?

Other oddities noticed during reboot if they help..:

klogctl during boot returns 'invalid argument'
mshbonds and wmeshs do not seem to be present
could not connect to server postgres as well.

-D




 m
 --
  martin.langh...@gmail.com
  mar...@laptop.org -- School Server Architect
  - ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  - http://wiki.laptop.org/go/User:Martinlanghoff

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] timestamps on backups

2009-09-17 Thread Hamilton Chua
Thanks Tom and Martin,

I think I have figured it out. Sorry for any confusion. 

It seems the timestamps are correct on the server, it is only when
displayed in the backup page (dsbackup.php) where the times are off. For
example, a backup done just a few minutes ago would say it was done 4
hours ago on that page.

The problem is the timezone. When I specifically set the date.timezone
parameter in php.ini to UTC, the text started appearing correctly in the
backup page. So it seems PHP is using a different timezone.

/etc/sysconfig/clock says that the timezone of the system is
America/New York which is probably the timezone PHP is using.


On Wed, 2009-09-16 at 15:05 -0700, Tom Mitchell wrote:
 On Wed, Sep 16, 2009 at 5:37 AM, Martin Langhoff
 martin.langh...@gmail.com wrote:
  On Wed, Sep 16, 2009 at 2:28 PM, Hamilton Chua hamilton.c...@gmail.com 
  wrote:
  I'm not sure if anybody has noticed this yet but after doing a backup,
  it seems the datestamps on the backup page are wrong.
 
  We might need more detail than that if we're to understand the situation :-)
 
  Is there something about time zones and time synchronization that we
  need to be aware of with regards to backups.
 
  Yes, the utc time on all machines should make sense. So do
 
   date --utc
 
  on XS and on the laptops involved to make sure all players are in the
  same decade. This has been tested with machines on different TZs so it
  should work. As long as utc agrees across machines.
 
  --
   martin.langh...@gmail.com
  http://lists.laptop.org/listinfo/server-devel
 
 The two numbers 4 hours and 40 years are almost telling.
 
 Linux keeps time as seconds from midnight January 1, 1970 12:00:00 GMT.
 Today GMT (Greenwich Mean Time) has been replaced by UTS (Coordinated
 Universal Time)
 which is GMT done better with atomic clocks.
 
 Since you are using XS on 0.6d5 and Sugar on a Stick the system gets the
 initial time of day (date) from the local hardware clock.   A unix/Linux 
 system
 default sets the local hardware clock to UTS while windows sets it to
 local time.
 Depending on daylight savings time in (say) Oklahoma four hours looks
 like a Windows
 system setting the hardware time of day.  Since Linux can be configured to 
 play
 nice with windows and set the hardware clock to local time windows is not
 always the issue in possiblly confusing the offset from GMT/UTS.
 
 The 40 years is very close to the beginnig of unix time (zero seconds) and
 can be seen on a confused local time of day clock.
 
 NTP (network time protocol) tools can be used to set the time of
 day on a network connected system to the correct UTS time.
 
 Local time is computed based on UTS and an offset time zone.
 
 Since all binary time stamps are UTS different users can set different
 timezone values in their environment and the system will do the 'right' thing.
 
 See:
   date
   date --uts
   date -u
   (export TZ=Europe/Paris;date;date-u)
 #
  touch /tmp/now
  stat /tmp/now
  (export TZ=Europe/Paris; stat now)
 
 
 
 
 
 
 
 
 
 
 

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] timestamps on backups

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 1:13 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
 /etc/sysconfig/clock says that the timezone of the system is
 America/New York which is probably the timezone PHP is using.

That's weird. Questions

 - Can you confirm date --utc is correct on the XS and on the involved XOs?

 - If you look at the datastore-timestamp directories - are the
timestamps correctly in UTC?

 - If you run tzselect, change the tz to your local tz -- does it fix
the problem? If it does, is the problem fixed for new backups or for
all backups?

The PHP code in dsbackup.php should be ignoring timezones, but
something might be sneaking in. Also - the timestamp in the dirnames
may be wrong.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Troubles running F9 mock chroot under F11

2009-09-17 Thread Daniel Drake
2009/9/16 Jerry Vonau jvo...@shaw.ca:
 That should be do-able using mkslim (read it first) from xs-livecd's git
 repo, along with my idea to use a pre-configured updates repo on the
 iso.

 http://lists.laptop.org/pipermail/server-devel/2009-February/002937.html

Thanks! Got it working as follows:
 1. extract ISO
 2. copy in new ks file
 3. add more RPMs to Packages/ (using creative use of yumdownloader to
make sure that deps come with the new RPMs)
 4. createrepo --database --groupfile repodata/comps.xml .
 5. remove stuff that mkslim removes
 6. mkisofs

no need to mess with bdb stuff any more :)

Daniel
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 12:37 PM, Daniel Bennett dant...@gmail.com wrote:
   rpm -V kernel
 dan: I got no news, so I guess it worked

Good!

 dan: I ran:
  ejabberdctl connected-users
 It returns long output like (the random string here is made up by me):
 34209381afaa07fa9df...@schoolserver.lccnjimeta.org/Telepathy

That all sounds right. Some more useful commands

   # will show 'Online' exists
   $ejabberdctl srg-list-groups `hostname -f`
   Online
# show the settings of the Online Shared Roster Group -
$ ejabberdctl srg-get-info 'Online'  `hostname -f`
name: Online
displayed_groups: [Online]
description: Created_by_ejabberd_init
online_users: true
members:


 So I definitely buy that some automagic is going on here.

Hey -- did you ever doubt it? :-)

 Is there perhaps
 documentation I can view that explains to me how to create different groups
 for different classes and generally manage things without the now obsolete
 web interface?
 (real world example: I would like to put all of my 5th graders in a group
 together, my 2nd graders in another, etc)  I might even want to change these
 on a regular basis.

 Is this all done through moodle perhaps?  Is there documentation I should be
 using for that?  If you could send me a link it would be much appreciated.

Yes, you can segregate what XOs see in the neighbourhood view by
moodle course membership. This is mainly useful when you have schools
with more than ~50 XOs.

Quick howto:

1 - Make sure you are using a recent Browse.xo (101 at least, I think)

2 - The first XO to register (reboot) and visit moodle successfully
gets some extra rights (is an 'admin' of sorts). So get an XO reg'd
and visiting Moodle -- it will auto-authenticate into Moodle. Should
see a 'site administration' block on the left.

3 - Create some courses (Site Administration-courses-Add/edit-Add
new), assign teachers and students. In the long and confusing new
course form, all you need to set is Full Name and Short Name. Please
ignore every other option.

Note: when it comes to enrolling, setup some courses for XOs you have
registered already -- this is mainly to have something to work with!
You can add more courses  enrolments later.

 Might help: http://docs.moodle.org/en/Enrolment#Manual_enrolment

4 - In 'Site Administration', go to Courses-Presence Service, and set
presencebycourse to Yes.

5 - Within 10 minutes, issuing the same ejabberdctl queries as above
should show that Online has been replaced by several SRGs -- one per
course. Asking for the 'info' of those, will show you their
membership.

6 - When you make the switch from one mode to the other on the XS
side, the situation will be confusing for the XOs, so they might need
to re-associate to the Access Point (so they re-query their group
membership) before they see the changes.

Note: All changes to the course membership take 5~10 minutes to appear
in ejabberd on the XOs, and some changes may also need an XO to
reassociate to the AP. Emphasis on 'some' :-)

 Dan: service pgsql-xs supports chkconfig, but is not reerenced in any
 runlevel (run 'chkconfig --add pgsql-xs')

 Should I run this as it says?

Yes! and then restart the server. Both pgsql-xs and moodle will start
up. On this first startup, moodle will perform its setup (so it'll
take a tad longer). You can see the log of the install in
/var/log/moodle/instupg.log

 klogctl during boot returns 'invalid argument'

dunno

 mshbonds and wmeshs do not seem to be present

normal.

 could not connect to server postgres as well.

not normal but you'll have it fixed for the next reboot :-)



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] timestamps on backups

2009-09-17 Thread Hamilton Chua
Hi Martin,

My responses inline ...

  - Can you confirm date --utc is correct on the XS and on the involved XOs?

Yes, date--utc on both XS and XO's are the same if not close to each
other, the difference being a few seconds.

  - If you look at the datastore-timestamp directories - are the
 timestamps correctly in UTC?

Yes, the directory name uses the UTC timestamp.

  - If you run tzselect, change the tz to your local tz -- does it fix
 the problem? If it does, is the problem fixed for new backups or for
 all backups?

The timezone of the system has always been the local tz.

 The PHP code in dsbackup.php should be ignoring timezones, but
 something might be sneaking in. Also - the timestamp in the dirnames
 may be wrong.

I checked the directory names and it seems they are correctly UTC. It
appears that the problem is just the calculation involved that returns
how long ago the backup was. It seems the time() function returns the
epoch based on the local timezone instead of the epoch based on UTC.

Best,

Ham



___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] timestamps on backups

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 1:55 PM, Hamilton Chua hamilton.c...@gmail.com wrote:
  - Can you confirm date --utc is correct on the XS and on the involved XOs?

 Yes, date--utc on both XS and XO's are the same if not close to each
 other, the difference being a few seconds.

thanks

 I checked the directory names and it seems they are correctly UTC.

Thanks!

 It seems the time() function returns the
 epoch based on the local timezone instead of the epoch based on UTC.

Actually - time() is doiing the right thing. It was the use of
mktime() that was bogus. Replace mktime() with gmmtime(), the 3 times
it appears in dsbackuplib.php and the problem is gone.

thanks for the debugging!



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] timestamps on backups

2009-09-17 Thread Hamilton Chua

 Actually - time() is doiing the right thing. It was the use of
 mktime() that was bogus. Replace mktime() with gmmtime(), the 3 times
 it appears in dsbackuplib.php and the problem is gone.

Thanks Martin :-)

 thanks for the debugging!

You're welcome.


___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Troubles running F9 mock chroot under F11

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 1:47 PM, Daniel Drake d...@laptop.org wrote:
 Thanks! Got it working as follows:
  1. extract ISO
  2. copy in new ks file
  3. add more RPMs to Packages/ (using creative use of yumdownloader to
 make sure that deps come with the new RPMs)
  4. createrepo --database --groupfile repodata/comps.xml .
  5. remove stuff that mkslim removes
  6. mkisofs

 no need to mess with bdb stuff any more :)

Good to hear it's worked!

Thinking about future support for that deployment and also for the XS
(as upstream) -- is it in your plans to document what rpms and ks
changes you are using?

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Daniel Bennett
We saw this message at boot, not sure if it's relevant:
AICCU is not configured go to /etc/aiccu

pssql now starts on boot, but we are still getting the same results when
accessing:
http://172.18.0.1/(moodle/)

The result is a page stating:
Moodle is disabled at the moment.

We have rebooted more than once at this point.

We've been digging around (but not changing) /etc/httpd/conf/httpd.conf and
/etc/httpd/conf/httpd-xs.conf

and they both point to a document root of /var/www/html

Does this have anything to do with our problem?  I don't really know what
I'm doing...

So, in a nutshell, pssql is running at startup, but we still can't access
moodle through the web interface.

Any ideas?

Thanks yet again,
-Dan (and Michael Ishaku)

On Thu, Sep 17, 2009 at 12:54 PM, Martin Langhoff martin.langh...@gmail.com
 wrote:

 On Thu, Sep 17, 2009 at 12:37 PM, Daniel Bennett dant...@gmail.com
 wrote:
rpm -V kernel
  dan: I got no news, so I guess it worked

 Good!

  dan: I ran:
   ejabberdctl connected-users
  It returns long output like (the random string here is made up by me):
  34209381afaa07fa9df...@schoolserver.lccnjimeta.org/Telepathy

 That all sounds right. Some more useful commands

   # will show 'Online' exists
   $ejabberdctl srg-list-groups `hostname -f`
   Online
# show the settings of the Online Shared Roster Group -
$ ejabberdctl srg-get-info 'Online'  `hostname -f`
name: Online
displayed_groups: [Online]
description: Created_by_ejabberd_init
online_users: true
members:


  So I definitely buy that some automagic is going on here.

 Hey -- did you ever doubt it? :-)

  Is there perhaps
  documentation I can view that explains to me how to create different
 groups
  for different classes and generally manage things without the now
 obsolete
  web interface?
  (real world example: I would like to put all of my 5th graders in a group
  together, my 2nd graders in another, etc)  I might even want to change
 these
  on a regular basis.
 
  Is this all done through moodle perhaps?  Is there documentation I should
 be
  using for that?  If you could send me a link it would be much
 appreciated.

 Yes, you can segregate what XOs see in the neighbourhood view by
 moodle course membership. This is mainly useful when you have schools
 with more than ~50 XOs.

 Quick howto:

 1 - Make sure you are using a recent Browse.xo (101 at least, I think)

 2 - The first XO to register (reboot) and visit moodle successfully
 gets some extra rights (is an 'admin' of sorts). So get an XO reg'd
 and visiting Moodle -- it will auto-authenticate into Moodle. Should
 see a 'site administration' block on the left.

 3 - Create some courses (Site Administration-courses-Add/edit-Add
 new), assign teachers and students. In the long and confusing new
 course form, all you need to set is Full Name and Short Name. Please
 ignore every other option.

 Note: when it comes to enrolling, setup some courses for XOs you have
 registered already -- this is mainly to have something to work with!
 You can add more courses  enrolments later.

  Might help: http://docs.moodle.org/en/Enrolment#Manual_enrolment

 4 - In 'Site Administration', go to Courses-Presence Service, and set
 presencebycourse to Yes.

 5 - Within 10 minutes, issuing the same ejabberdctl queries as above
 should show that Online has been replaced by several SRGs -- one per
 course. Asking for the 'info' of those, will show you their
 membership.

 6 - When you make the switch from one mode to the other on the XS
 side, the situation will be confusing for the XOs, so they might need
 to re-associate to the Access Point (so they re-query their group
 membership) before they see the changes.

 Note: All changes to the course membership take 5~10 minutes to appear
 in ejabberd on the XOs, and some changes may also need an XO to
 reassociate to the AP. Emphasis on 'some' :-)

  Dan: service pgsql-xs supports chkconfig, but is not reerenced in any
  runlevel (run 'chkconfig --add pgsql-xs')
 
  Should I run this as it says?

 Yes! and then restart the server. Both pgsql-xs and moodle will start
 up. On this first startup, moodle will perform its setup (so it'll
 take a tad longer). You can see the log of the install in
 /var/log/moodle/instupg.log

  klogctl during boot returns 'invalid argument'

 dunno

  mshbonds and wmeshs do not seem to be present

 normal.

  could not connect to server postgres as well.

 not normal but you'll have it fixed for the next reboot :-)



 m
 --
  martin.langh...@gmail.com
  mar...@laptop.org -- School Server Architect
  - ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  - http://wiki.laptop.org/go/User:Martinlanghoff

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 4:11 PM, Daniel Bennett dant...@gmail.com wrote:
 We saw this message at boot, not sure if it's relevant:
 AICCU is not configured go to /etc/aiccu

That's normal.

 pssql now starts on boot, but we are still getting the same results when
 accessing:
 http://172.18.0.1/(moodle/)

Just to confirm, what is the output of...?

  service pgsql-xs status  (we expect it to be running)
  service moodle status  (Moodle cron job is enabled)
  chkconfig --list pgsql-xs (should say that it's on in 3,4 and 5)
  chkconfig --list moodle (same)

Note! There is a 'postgres' service too. That should be stopped.

 The result is a page stating:
 Moodle is disabled at the moment.

That is because Moodle is having trouble starting up -- and that is
all about getting the 'pgsql-xs' service going, and the initial moodle
setup running.

Some more debugging:

 - Does the file /etc/moodle/needsupgrade exist? (It should :-) )

 - Does the file  /var/log/moodle-instupg.log exist? You'll want to
look at it. Lines with 'PHP Notice' are safe to ignore, you should see
lots of SQL, and a final line saying [Wed Sep 16 05:12:57 EDT 2009]
Finished install / upgrade - Success.

That file probably has the secret to your woes...

 - What happens if you do...?

   /etc/initd.d/moodle stop
   (bash -x /etc/initd.d/moodle start 21) | tee moodleinit.log

The 'tee' command will show you the output but will also save it to
the moodleinit.log file.

So I am hoping you can post your  /var/log/moodle-instupg.log and
moodleinit.log files so we can debug further.

 We've been digging around (but not changing) /etc/httpd/conf/httpd.conf and
 /etc/httpd/conf/httpd-xs.conf

That should not affect things. If moodle is showing you the Moodle is
disabled at the moment msg, the apache config is doing its job just
fine :-)

 and they both point to a document root of /var/www/html

 we are overriding it -- see the /etc/httpd/conf.d/ directory :-)

 Does this have anything to do with our problem?  I don't really know what
 I'm doing...

You're doing pretty well, I gotta say -


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Daniel Bennett
On Thu, Sep 17, 2009 at 3:30 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Thu, Sep 17, 2009 at 4:11 PM, Daniel Bennett dant...@gmail.com wrote:
  We saw this message at boot, not sure if it's relevant:
  AICCU is not configured go to /etc/aiccu

 That's normal.

  pssql now starts on boot, but we are still getting the same results when
  accessing:
  http://172.18.0.1/(moodle/) http://172.18.0.1/%28moodle/%29

 Just to confirm, what is the output of...?

  service pgsql-xs status  (we expect it to be running)

fine

  service moodle status  (Moodle cron job is enabled)

DISABLED

  chkconfig --list pgsql-xs (should say that it's on in 3,4 and 5)

fine

  chkconfig --list moodle (same)

fine


 Note! There is a 'postgres' service too. That should be stopped.

couldn't find this service


  The result is a page stating:
  Moodle is disabled at the moment.

 That is because Moodle is having trouble starting up -- and that is
 all about getting the 'pgsql-xs' service going, and the initial moodle
 setup running.

 Some more debugging:

  - Does the file /etc/moodle/needsupgrade exist? (It should :-) )

exists


  - Does the file  /var/log/moodle-instupg.log exist?

exists

 You'll want to
 look at it. Lines with 'PHP Notice' are safe to ignore, you should see
 lots of SQL, and a final line saying [Wed Sep 16 05:12:57 EDT 2009]
 Finished install / upgrade - Success.

FAILURE:
mentions of correcting version/local_version mangling - will error out on
fresh DBs UPDATE 0

EnvironmentPHP Fatal error:  Call to undefined function
upgrade_fix_incorrect_mnethostides() in /var/moodle/web/lib/db/upgrade.php
on line 3167
[Time date] Finished install / upgrade - Failure

I haven't answered any questions below this line.  We are trying to find a
way to get these files off the server.  I can't figure out how to set it up
as an FTP server, I can't get any linux email sending to work ((al)pine, and
mutt don't seem to be installed, and when I use mail I get a message
telling me that root doesn't have mail)

We are trying to set another machine up to SSH into it (a machine with email
access) but no luck.

Any idea how I can send an email from the server?

Thanks,
-Dan

 That file probably has the secret to your woes...

  - What happens if you do...?

   /etc/initd.d/moodle stop
   (bash -x /etc/initd.d/moodle start 21) | tee moodleinit.log

 The 'tee' command will show you the output but will also save it to
 the moodleinit.log file.

 So I am hoping you can post your  /var/log/moodle-instupg.log and
 moodleinit.log files so we can debug further.

  We've been digging around (but not changing) /etc/httpd/conf/httpd.conf
 and
  /etc/httpd/conf/httpd-xs.conf

 That should not affect things. If moodle is showing you the Moodle is
 disabled at the moment msg, the apache config is doing its job just
 fine :-)

  and they both point to a document root of /var/www/html

  we are overriding it -- see the /etc/httpd/conf.d/ directory :-)

  Does this have anything to do with our problem?  I don't really know what
  I'm doing...

 You're doing pretty well, I gotta say -


 m
 --
  martin.langh...@gmail.com
  mar...@laptop.org -- School Server Architect
  - ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  - http://wiki.laptop.org/go/User:Martinlanghoff

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Daniel Bennett
http://sprunge.us/NcQT
http://sprunge.us/MERg

That curl to sprunge.us trick is nifty.
automatically posting text files to a web page on the net via shell /
command line .. I should have asked that question a long time ago :)
On Thu, Sep 17, 2009 at 4:48 PM, Martin Langhoff
martin.langh...@gmail.comwrote:

 On Thu, Sep 17, 2009 at 5:30 PM, Daniel Bennett dant...@gmail.com wrote:
  EnvironmentPHP Fatal error:  Call to undefined function
  upgrade_fix_incorrect_mnethostides() in
 /var/moodle/web/lib/db/upgrade.php
  on line 3167
  [Time date] Finished install / upgrade - Failure

 That might be the culprit. Very weird. Still, want to see the logs...

  We are trying to set another machine up to SSH into it (a machine with
 email
  access) but no luck.
 
  Any idea how I can send an email from the server?

 email is a bit awkward, but there is a pastebin-style service we can use.
 Try

  cat /path/to/file | curl -F 'sprunge=-' http://sprunge.us

 After a few seconds it will reply with a URL, like

  http://sprunge.us/EJJF

 where the file can be found.
/etc/initd.d/moodle stop
(bash -x /etc/initd.d/moodle start 21) | tee moodleinit.log

 I really want that moodleinit.log :-)

 cheers,




 m
 --
  martin.langh...@gmail.com
  mar...@laptop.org -- School Server Architect
  - ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  - http://wiki.laptop.org/go/User:Martinlanghoff

___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 6:23 PM, Daniel Bennett dant...@gmail.com wrote:
 http://sprunge.us/NcQT
 http://sprunge.us/MERg

Hmmm. Very odd! Can you check that your moodle-xs package is correct?
What's the output of

   rpm -q moodle-xs
   rpm -V moodle-xs (should be empty)

 That curl to sprunge.us trick is nifty.

Sure is good. I googled it up 5 minutes ago :-)



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Attempting to re-install jabber component of XS without re-installing the entire server

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 7:11 PM, Daniel Bennett dant...@gmail.com wrote:

   rpm -q moodle-xs

 moodle-xs-1.9.5.xs1.1.gc292d55-1.xs9.noarch

   rpm -V moodle-xs (should be empty)

 returns nothing

Thanks.

I had to re-read your logs a bit. In brief: I made the mistake of
reading the moodle-instupg.log bottom-up, and thought the install had
become corrupted. But re-visiting it, I realise that the error that is
key here is the failure to connect to the Postgres server.

   psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket /tmp/.s.PGSQL.5432?

So we need to make sure that the pgsql-xs service is running, and that
it accepts connections from Moodle (that is, from apache).

Some commands to try (and the correct output in my test XS)

# check that the postgresql service is *not* set to run as it will
conflict w pgsql-xs
$ chkconfig --list postgresql
postgresql  0:off   1:off   2:off   3:off   4:off   5:off   6:off

# should say that the server is running
$ service pgsql-xs status

# should give you a list of databases - see how moodle-xs is owned by apache
$  su postgres -c '/usr/bin/psql -l '
 List of databases
Name|  Owner   | Encoding
+--+---
 moodle-xs  | apache   | UTF8
 postgres   | postgres | SQL_ASCII
 template0  | postgres | SQL_ASCII
 template1  | postgres | SQL_ASCII

# check that you can connect as the apache user and list existing tables
$sudo -u apache psql moodle-xs -c '\d'
  List of relations
 Schema |  Name   |   Type   | Owner
+-+--+
 public | adodb_logsql| table| apache
 public | adodb_logsql_id_seq | sequence | apache
 public | mdl_assignment  | table| apache
 public | mdl_assignment_id_seq   | sequence | apache
 public | mdl_assignment_submissions  | table| apache
 public | mdl_assignment_submissions_id_seq   | sequence | apache
 public | mdl_backup_config   | table| apache
...


Can you try these commands? I think we're pretty close to resolving the problem.




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


[Server-devel] DNS/dhcp question

2009-09-17 Thread Gerald Ardito
Hello.

I have the XS server up and running on a Dell.
Per specs, I believe, I have two NICs, which I can see as eth0 and eth1.
Eth0 is connected to the internet.
Eth1 is connected to the AP for the XOs. Or, more accurate, the AP for the
XOs points to eth1. (I hope this is correct).

I have two problems:
1) When I connected to the AP from the XOs, no IP address is generated.
2) We are going to use a hosted XS off site, and I want to configure my box
(which is the dhcp server) to point to it.

Thanks for the help.

Gerald
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] Troubles running F9 mock chroot under F11

2009-09-17 Thread Daniel Drake
2009/9/17 Jerry Vonau jvo...@shaw.ca:
 Well not quite the way I would of done it, I was hoping someone else
 would test my idea, but glad you got what you needed done. Mind sharing
 the yumdownloader routine? I might try to use something like that to
 populate my updates repo, then remove any duplicates in the rpms what
 would take extra space on the iso.

During the build script:

cat EOF  yum.conf
[main]
reposdir=$(pwd)/yumrepos
cachedir=/var/cache/yum-xs
EOF

pushd ${isocopy}/Packages
yumdownloader -c ../../yum.conf --resolve mysql-server mysql php-mysql
expect ImageMagick graphviz php-tidy java-1.6.0-openjdk
java-1.6.0-openjdk-devel
popd


yumrepos/ then contains 2 repo files, one for F9 and one for F9 updates.

The only slightly awkward thing is that the added packages have to be
listed twice, once above and once in the kickstart file. Of course, we
could automate the construction of the ks file but that's adding more
complexity than I'd like to leave behind in Nepal.

Daniel
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel