All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] fixing last lctl set_param -P problem
@ 2018-09-04 18:35 James Simmons
  2018-09-04 22:02 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: James Simmons @ 2018-09-04 18:35 UTC (permalink / raw)
  To: lustre-devel


I originally posted this in the LU-7004 jira ticket :

https://jira.whamcloud.com/browse/LU-7004

but no one has replied so I thought it would be good to post here.

So this is last regression with lctl set_param -P. Some test use the form 
get the parameter value:

lctl set_param osc.lustre-OST0001-osc-[^M]*.active=1

The shell seems to expand this properly or the get_param routine parses 
this correctly.

Now if I run on the MGS lctl set_param -P osc.lustre-OST0001-osc[^M]*.active=1
then the [^M] is actually cached in the config logs. The function 
obdname2fsname() chokes on this wildcard. So the question is how to handle this.
I see the following option:

1) Make the shell expand the [^M] to some value before passing the string 
   to lctl itself. Have to look at this.

2) Use regex or something in the C code of lctl to expand this out before 
   packing the data for the ioctl on the MGS.

3) Change the test scripts to drop the [^M] for lctl set_param -P.

Which is the best option?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [lustre-devel] fixing last lctl set_param -P problem
  2018-09-04 18:35 [lustre-devel] fixing last lctl set_param -P problem James Simmons
@ 2018-09-04 22:02 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2018-09-04 22:02 UTC (permalink / raw)
  To: lustre-devel

On Tue, Sep 04 2018, James Simmons wrote:

> I originally posted this in the LU-7004 jira ticket :
>
> https://jira.whamcloud.com/browse/LU-7004
>
> but no one has replied so I thought it would be good to post here.
>
> So this is last regression with lctl set_param -P. Some test use the form 
> get the parameter value:
>
> lctl set_param osc.lustre-OST0001-osc-[^M]*.active=1
>
> The shell seems to expand this properly or the get_param routine parses 
> this correctly.

It isn't "The shell" that does the expansion, it is the glob() library
function.
According to "man 7 glob", the correct syntax for an inverted character
set is
   [!M]
not
   [^M]

([^M] is for regexp, [!M] is for glob.  Bash confused people by
accepting both for glob).

>
> Now if I run on the MGS lctl set_param -P osc.lustre-OST0001-osc[^M]*.active=1
> then the [^M] is actually cached in the config logs. The function 
> obdname2fsname() chokes on this wildcard. So the question is how to handle this.
> I see the following option:
>
> 1) Make the shell expand the [^M] to some value before passing the string 
>    to lctl itself. Have to look at this.
>
> 2) Use regex or something in the C code of lctl to expand this out before 
>    packing the data for the ioctl on the MGS.
>
> 3) Change the test scripts to drop the [^M] for lctl set_param -P.

  4) Change the test script to use the correct syntax: [!M]

NeilBrown

>
> Which is the best option?
>
>
> _______________________________________________
> lustre-devel mailing list
> lustre-devel at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20180905/0e52c115/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-04 22:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 18:35 [lustre-devel] fixing last lctl set_param -P problem James Simmons
2018-09-04 22:02 ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.