[gold-users] gbalance and glsalloc will not work if no users are allocated
Scott Jackson
scottmo at adaptivecomputing.com
Wed Mar 17 12:06:55 MDT 2010
Alexander,
This is a known shortcoming in Gold. Because of the way that it must use
table joins in determining relevant allocations, all projects must have
at least one member or the allocation will not be found when using
filtering.
You CAN use the --exact-match option to get the account to display. You
could make this an alias if you want (alias glsaccount='glsaccount
--exact-match'), or tweak the script accordingly.
[scottmo at keko ~]$ glsproject foo
Name Active Users Machines Admin Description
---- ------ ----- -------- ----- -----------
foo True
[scottmo at keko ~]$ glsaccount -p foo
[scottmo at keko ~]$ glsaccount -p foo --exact-match
Id Name Amount Projects Users Machines Description
-- ---- ------ -------- ------- -------- --------------
58 foo 1000 foo MEMBERS ANY Auto-generated
This is because Gold does a whole bunch of logical filtering that can
only be done via joins, for example, if you ask for all accounts or
allocations for projecta, it will also give you all accounts associated
with "all projects" because all projects include projecta, or if you are
asking for all accounts with userb, it will show all accounts which have
associated projects for which the user is a member of the project, etc.
Using --exact-match will turn off the logical filtering and just give
you literally all accounts which have a the specified project or user
directly associated with it. If you ask for glsaccount -u usera and the
Account foo lists MEMBERS under Users, you will not get a match because
this requires logical filtering. So, --exact-match may or may not work
for you. Please try it out.
Thanks,
Scott
Alexander Oltu wrote:
> We are using Gold 2.1.10.0 and noticed that when project has no members
> in it gbalance will not work.
>
> glsproject -p nn9103k
> Name Active Users Machines Description
> ------- ------ ----- -------- -----------
> nn9103k True
>
> glsalloc -p nn9103k
> There are no accounts for the specified project. Please respecify the
> query with a valid account id.
>
>
> glsalloc |grep nn9103k
> nn9103k 184 88 True 2009-10-01 2010-03-31
> 23:59:59 148500000 0 148500000 nn9103k 145 88
> False 2009-04-01 2009-09-30 23:59:59 450000000
> 0 450000000
>
> glsaccount -p nn9103k
>
> glsaccount |grep nn9103k
> 88 nn9103k 148500000 nn9103k MEMBERS ANY Auto-generated
>
> If I assign user to that project than all commands will work with
> project as an argument.
>
> Is it a bug?
>
> Thanks,
> Alex.
> _______________________________________________
> 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