[gold-users] Specifying multiple machines for an allocation with gdeposit

Scott Jackson scottmo at adaptivecomputing.com
Wed Jul 28 10:31:31 MDT 2010


Chris,

The problem is the gdeposit command expects either an account id or a 
user and/or project and/or machine. Here is the usage synopsis:

B<gdeposit> {B<-a> I<account_id> | { B<-p> I<project_name> &| B<-u> 
I<user_name> &| B<-m> I<machine_name>}} ...

If a user, project or machine are specified, Gold will ignore the 
specified account and attempt to find an existing account which matches 
the specified entities. If it cannot find one, and if account.autogen is 
set to true, it will create one with the specified characteristics.

What you need to do is specify less in your gdeposit (i.e. just specify 
the account and not the user/project/machine):

gdeposit -a 395 -d "Allocation for vlsci on Intel" -s 2010-08-01 -e 2010-11-01 -h 10000


This should give you the desired behavior in your original command order.

I will be adding a check to future versions so you do not get the 
confusing behavior.

$ svn diff src/gdeposit.pl
Index: src/gdeposit.pl
===================================================================
--- src/gdeposit.pl    (revision 219)
+++ src/gdeposit.pl    (working copy)
@@ -122,6 +122,13 @@
           && ! defined $machine
           && ! defined $user;
 
+    # Check for conflicting arguments
+    pod2usage(2)
+      if defined $account
+          && (   defined $project
+              || defined $machine
+              || defined $user);
+
     # Convert hours to seconds if specified
     if ($hours)
     {

Scott


Christopher Samuel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 25/05/10 02:43, Scott Jackson wrote:
>
>   
>> For accounts with multiple machines, you will need to create the
>> account, then make the deposit into the account (by account id).
>>
>> gmkaccount -m m1,m2 -p VS0001
>> gdeposit -e 2010-08-01 1 -a 123
>>     
>
> Just been trying to use that method, but it doesn't appear to be
> wanting to do what you think it would do..
>
> gold:/usr/local/bin# ./allocate vlsci 10
> Executing: gmkaccount -d "Account for vlsci on Intel" -n vlsci -u
> MEMBERS -m bruce-m,merri-m -p vlsci
>
> Executing: gdeposit -a 395 -d "Allocation for vlsci on Intel" -u MEMBERS
> - -s 2010-08-01 -e 2010-11-01 -p vlsci -h 10000
> Successfully created Account 396
> Successfully deposited 10000 credits into account 396
>
> So the first command works fine, but the second goes off
> and creates a completely new account, ignoring what I asked
> it to use.
>
> I suspect what I'm going to have to do is the other way around,
> do the gdeposit first and then modify the account it creates.
>
> cheers!
> Chris
> - -- 
>  Christopher Samuel - Senior Systems Administrator
>  VLSCI - Victorian Life Sciences Computational Initiative
>  Email: samuel at unimelb.edu.au Phone: +61 (0)3 903 55545
>          http://www.vlsci.unimelb.edu.au/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxPsuwACgkQO2KABBYQAh9y5QCfafvFZUvx/D/E2wszIUWtDjbg
> 5XsAn1dHCFQZEzsicOtDGIbeBv7WldxA
> =Y8GA
> -----END PGP SIGNATURE-----
> _______________________________________________
> 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