[gold-users] default projects

Scott Jackson scott at clusterresources.com
Mon Mar 26 12:26:30 MDT 2007


Kevin,

I found the bug and corrected it in the source code. You should be able
to patch this locally with the following change:

Index: lib/Gold/Bank.pm
===================================================================
--- lib/Gold/Bank.pm    (revision 36)
+++ lib/Gold/Bank.pm    (revision 37)
@@ -1160,7 +1160,7 @@
     # Look for a user default project
     # SELECT DefaultProject FROM User WHERE Name=$user
     my $subResults = $database->select(object => "User", selections =>
[ new Gold::Selection(name => "DefaultProject") ], conditions => [ new
Gold::Condition(name => "Name", value => $user) ]);
-    if (@{$subResults->{data}})
+    if (defined ${$subResults->{data}}[0]->[0])
     {
       my $defaultProject = ${$subResults->{data}}[0]->[0];
       if (defined $defaultProject)

If you would prefer to have the full updated code, let me know and I can
drop gold 2.1.4.1 out on the dist dir for you.

Thanks,

Scott


On Fri, 2007-03-23 at 10:19 -0400, Kevin Van Workum wrote:
> I'd like new users who are unknown to gold, to be automatically
> created by gold and to use a default "guest" project. My goldd.conf
> has:
> 
> #Gold version 2.1.4.0
> #postgres (PostgreSQL) 8.0.8
> 
> account.autogen = true
> user.autogen = true
> user.default = NONE
> project.autogen = false
> project.default = guest
> machine.autogen = false
> machine.default = NONE
> 
> I've created the "guest" project and have deposited funds into its
> account. However, when I issue a gcharge, I get the following error: 
> 
> [gold]$ gcharge -u newbie -m TTI -P 1 -t 1 -J 1.guest
> Project  does not exist
> 
> One more oddity: After I created the project 'guest', an account was
> Auto-generated, but after I deposited funds into it (gdeposit -p guest
> -z 1000), a second account was Auto-Generated: 
> 
> [gold at jman etc]$ glsaccount
> Id Name     Amount   Projects Users   Machines Description
> -- -------- -------- -------- ------- -------- --------------
> 19 guest           0 guest    MEMBERS ANY      Auto-generated
> 20 guest        1000 guest    ANY     ANY      Auto-Generated
> 
> So am I messing something up here?
> 
> Kevin
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users



More information about the gold-users mailing list