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

2009-09-17 Thread Daniel Drake
2009/9/17 Jerry Vonau :
> 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 < 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


[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] 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  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


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

2009-09-17 Thread Daniel Bennett
Also, a curiosity:

On a number of occasions you referred to "initd.d", which was a file we
never had in our installation.  We had "init.d" instead.

Or perhaps it was a folder?  /etc/initd.d/moodle/...

In any event, we've been using and sending you init.d

I assume it was just a typo, but given that you say things look unusual, I
figured I should mention it.

Cheers,
-D

On Thu, Sep 17, 2009 at 6:11 PM, Daniel Bennett  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
>
>>
>> > 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 Daniel Bennett
>
>
>   rpm -q moodle-xs
>
moodle-xs-1.9.5.xs1.1.gc292d55-1.xs9.noarch

>   rpm -V moodle-xs (should be empty)
>
returns nothing

>
> > 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 6:23 PM, Daniel Bennett  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 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
wrote:

> On Thu, Sep 17, 2009 at 5:30 PM, Daniel Bennett  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 2>&1) | 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 5:30 PM, Daniel Bennett  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 2>&1) | 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 Daniel Bennett
On Thu, Sep 17, 2009 at 3:30 PM, Martin Langhoff
wrote:

> On Thu, Sep 17, 2009 at 4:11 PM, Daniel Bennett  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)
>
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 2>&1) | 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 Martin Langhoff
On Thu, Sep 17, 2009 at 4:11 PM, Daniel Bennett  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 2>&1) | 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
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  wrote:

> On Thu, Sep 17, 2009 at 12:37 PM, Daniel Bennett 
> 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/serve

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

2009-09-17 Thread devzero2000
On Wed, Sep 16, 2009 at 3:31 PM, Jan Kratochvil 
wrote:
> Hi,
>
> filed as:
>https://bugzilla.redhat.com/show_bug.cgi?id=523698
>
> how to possibly fix the problem by a backport from rpm5.org as suggested
by
> Jeff Johnson.
>
For rpm 4.4 the backport was already filled but reject.

https://bugzilla.redhat.com/show_bug.cgi?id=464752

>
> Thanks,
> Jan
>
> --
> fedora-devel-list mailing list
> fedora-devel-l...@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>
___
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  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 Martin Langhoff
On Thu, Sep 17, 2009 at 1:54 PM, Martin Langhoff
 wrote:
> Quick howto:

How about... ?
http://wiki.laptop.org/go/XS_Controlling_Presence_from_Moodle


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] timestamps on backups

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 2:13 PM, Martin Langhoff
 wrote:
> mktime() that was bogus. Replace mktime() with gmmtime(), the 3 times
> it appears in dsbackuplib.php and the problem is gone.

I meant gmmktime() :-)



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 Martin Langhoff
On Thu, Sep 17, 2009 at 1:55 PM, Hamilton Chua  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
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- 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] 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  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] Troubles running F9 mock chroot under F11

2009-09-17 Thread Daniel Drake
2009/9/16 Jerry Vonau :
> 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] timestamps on backups

2009-09-17 Thread Martin Langhoff
On Thu, Sep 17, 2009 at 1:13 PM, Hamilton Chua  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- 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] 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
>  wrote:
> > On Wed, Sep 16, 2009 at 2:28 PM, Hamilton Chua  
> > 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] 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  wrote:

> On Thu, Sep 17, 2009 at 11:51 AM, Daniel Bennett 
> 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] 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 11:51 AM, Daniel Bennett  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).

> 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.

> 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.

< 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
   chkconfig --list pgsql-xs




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
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
wrote:

> On Wed, Sep 16, 2009 at 3:36 PM, Daniel Bennett  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