Re: [Server-devel] [PATCHES] make xs-activation behave like it did on XS 0.5.2

2010-05-13 Thread Raul Gutierrez Segales
On Wed, 2010-04-21 at 18:27 +0200, Martin Langhoff wrote:
> On Fri, Mar 12, 2010 at 2:59 PM, Raul Gutierrez Segales
>  wrote:
> > We are testing extensively XS 0.6 looking forward to upgrade our current
> > (10) servers in production and to use it in our (26) new servers as
> > well.
> 
> Merged, at long-last. I made a new branch for xs-0.6 patches, built a
> new RPM with various patches that were pending (including some just
> implemented in La Rioja), and pushed out to the olpcxs-testing repo.
> 
> I am hoping to hear whether it works well for you.
> 

It works wonderfully. Although the changelog doesn't reflect the
changes:

[r...@schoolserver ~]# rpm -q --changelog xs-activation
* Thu Aug 28 2008 Douglas Bagnall  0.1-1
- This is a git-maintaned package - See the changelog at

http://dev.laptop.org/git?p=users/dbagnall/xs-activation;a=log;h=f084716128f2c2af6a44f261eefe0ba181bb748a
(END)

But, its only a minor detail.

Thanks!!



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


Re: [Server-devel] [PATCHES] make xs-activation behave like it did on XS 0.5.2

2010-04-21 Thread Martin Langhoff
On Fri, Mar 12, 2010 at 2:59 PM, Raul Gutierrez Segales
 wrote:
> We are testing extensively XS 0.6 looking forward to upgrade our current
> (10) servers in production and to use it in our (26) new servers as
> well.

Merged, at long-last. I made a new branch for xs-0.6 patches, built a
new RPM with various patches that were pending (including some just
implemented in La Rioja), and pushed out to the olpcxs-testing repo.

I am hoping to hear whether it works well for you.

Humble apologies for the unreasonable delay.

cheers,


martin

>
> 1) it makes xs-activation-import consider leases.dat a file containing
> leases
>
> 2) it logs every lease that was sent successfully. We need this because
> we have a centralized database (Inventario) which let us know when was
> the last time a laptop got a lease and from which School Server.




-- 
 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] [PATCHES] make xs-activation behave like it did on XS 0.5.2

2010-03-12 Thread Raul Gutierrez Segales
Martin,

We are testing extensively XS 0.6 looking forward to upgrade our current
(10) servers in production and to use it in our (26) new servers as
well. 

In doing so, we found that some of our scripts and stuff that worked
previously is having some difficulties because of some minor changes
(from the 0.5.2 days). Although we could adapt our stuff... life might
be easier if you accept the proposed patch :)

It does 2 things:

1) it makes xs-activation-import consider leases.dat a file containing
leases 

2) it logs every lease that was sent successfully. We need this because
we have a centralized database (Inventario) which let us know when was
the last time a laptop got a lease and from which School Server. 


Cheers,
Raúl



diff --git a/xs-activation-import b/xs-activation-import
index cbc89e4..39bbb80 100755
--- a/xs-activation-import
+++ b/xs-activation-import
@@ -105,7 +105,7 @@ def import_all_files(indir):
 """Read all the files in a given directory and import their lease
 information"""
 for fn in os.listdir(indir):
-if fn == 'lease.sig':
+if fn == 'lease.sig' or fn == 'leases.dat':
 try:
 import_leases(os.path.join(indir, fn))
 log("imported leases from %s" % fn)
diff --git a/xs-activation-tcpserver.py b/xs-activation-tcpserver.py
index 134e98b..40f7424 100755
--- a/xs-activation-tcpserver.py
+++ b/xs-activation-tcpserver.py
@@ -60,6 +60,7 @@ if re.match('^[A-Z0-9]{11}$', req):
 #   value within the bounds of leasetimelimit
 lease = myoat.get_lease(sn, 300)
 if lease:
+sys.stderr.write("Sending lease for '%s'\n" % sn)
 myoat.mark_served_lease(sn)
 sys.stdout.write(lease)
 exit()
___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel