[gold-users] Correcting gbalance output after wrong allocation deletion

Alexander Oltu Alexander.Oltu at uni.no
Tue Dec 6 08:16:26 MST 2011


Scott, thanks! 

I am taking over fixing this issue.

Is there a way to recover deleted allocations by using goldsh? 
I see that I can change field "deleted" in the g_allocation table, but I
hope there is a "goldsh way", because I am afraid there should be
several tables connected to it.

thanks,
Alex.

On Thu, 01 Dec 2011 10:14:18 -0700 (MST)
Scott Jackson wrote:

> Well, if I understand you correctly, what I think you should have
> done is to have made withdrawals or deposits against the allocations
> to increment or decrement them with the appropriate amounts. You
> could also have done a transfer if you were going from one to another.
> 
> For example,
> 
> # Initial allocation
> 
> $ gbalance -p biology --show Id,Name,Balance,Deposited
> Id Name    Balance  Deposited 
> -- ------- -------- --------- 
> 1  biology 25000000  25000000 
> 
> # Some usage charges
> 
> $ gcharge -p biology -u amy -z 10000000 -J testjob
> Successfully charged 10000000 credits for instance testjob and
> created usage record 3
> 
> # Balance after usage
> 
> $ gbalance -p biology --show Id,Name,Balance,Deposited
> Id Name    Balance  Deposited 
> -- ------- -------- --------- 
> 1  biology 15000000  25000000 
> 
> # List allocations to see which allocation to deposit to
> 
> $ glsalloc -p biology
> Id Account Active StartTime  EndTime    Amount   CreditLimit
> Deposited Description -- ------- ------ ---------- ----------
> -------- ----------- --------- ---------1  1       False  2011-01-01
> 2011-04-01 25000000           0  25000000 2  1       False
> 2011-04-01 2011-07-01 25000000           0  25000000 3  1
> False  2011-07-01 2011-10-01 25000000           0  25000000 4
> 1       True   2011-10-01 2012-01-01 15000000           0  25000000   
> 
> # Augment the allocation
> 
> $ gdeposit -i 4 -z 5000000
> Successfully deposited 5000000 credits into account 1
> 
> # Adjusted balance and total deposited amount
> 
> $ gbalance -p biology --show Id,Name,Balance,Deposited
> Id Name    Balance  Deposited 
> -- ------- -------- --------- 
> 1  biology 20000000  30000000 
> 
> Scott
> 
> 
> 
> ----- Original Message -----
> > From: "Eirik Thorsnes" <eirik.thorsnes at uni.no>
> > To: "Gold Users Mailing List" <gold-users at supercluster.org>
> > Sent: Thursday, December 1, 2011 5:58:16 AM
> > Subject: [gold-users] Correcting gbalance output after wrong
> > allocation	deletion
> > 
> > Hello all,
> > 
> > What is the best way to correct the gbalance output after an
> > allocation
> > was wrongly deleted (and replaced)?
> > 
> > Situation:
> > 1. Needed to change several currently valid and active allocations
> > (both
> > increasing and decreasing values).
> > 
> > 2. The allocations where deleted with grmalloc and new correct
> > allocations created for the same accounts using gdeposit.
> > 
> > 3. The result (perhaps unsurprisingly after the fact) is that the
> > columns in gbalance on the now valid and active allocations are not
> > reflecting the usage that was made on the previous (deleted)
> > allocations.
> > 
> > How can we correct this in the "Gold way"?
> > 
> > Our current Gold version is 2.1.10.0.
> > 
> > Best regards,
> > Eirik
> > --
> > Eirik Thorsnes
> > Group Leader at Parallab, Uni Computing
> > Høyteknologisenteret, Thormøhlensgate 55, N-5008 Bergen, Norway
> > tel: (+47) 555 84153  fax: (+47) 555 84295
> > _______________________________________________
> > gold-users mailing list
> > gold-users at supercluster.org
> > http://www.supercluster.org/mailman/listinfo/gold-users
> > 
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users


-- 
Alexander Oltu
System Engineer
Parallab, Uni Computing

HIB, Thormøhlensgt.55
N-5008 Bergen, Norway
phone: +47 55584144


More information about the gold-users mailing list