Mailing List Archive

Antw: Re: Q: crm configure edit/show regex
>>> Kristoffer Grönlund<kgronlund@suse.com> schrieb am 18.02.2014 um 14:07 in
Nachricht <20140218140726.1b2dfd0f@ultralix>:
> On Tue, 18 Feb 2014 13:48:21 +0100
> Lars Marowsky-Bree <lmb@suse.com> wrote:
>
>> On 2014-02-18T09:55:44, Kristoffer Grönlund <kgronlund@suse.com>
>> wrote:
>>
>> > Sounds like a good idea to me, too. I'll see what I can do :)
>> >
>> > At least a simple approximation of glob-syntax should be doable.
>>
>> Constraints can already refer to regex now too. And we're talking
>> about being able to match on tags (or even attributes) on start/stop
>> etc.
>>
>> It'd make sense to then merge all this consistently, right?
>>
>> (Perhaps even via a crm_resource -l option, so that pcs/crmsh use the
>> same matching code as the PE and as each other, if that makes any
>> sense.)
>>
>
> I also realised that there is another complication, which is that
> unless in interactive mode, the bash shell will consume the regex
> syntax, and it would need to be escaped. So that would make the feature
> even more confusing and doesn't seem entirely clean - although this is
> a limitation of shell syntax. In theory the shell could use the
> completion information to expand 'crm configure show prim*' into all
> the completions for prim*.

I don't know whether this is a real restriction for people who are used to use
the command line: Even when using grep, sed or awk, some REs have to be
escaped, and the shell has no idea how to complete them.

>
> Unifying this might be difficult, as far as I know pcs doesn't have an
> interactive mode or anything similar to the configure interface of
> crmsh..
>
>>
>>
>> Regards,
>> Lars
>>
>
>
>
> --
> // Kristoffer Grönlund
> // kgronlund@suse.com
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: Re: Q: crm configure edit/show regex [ In reply to ]
On 19 Feb 2014, at 12:13 am, Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> wrote:

>>>> Kristoffer Grönlund<kgronlund@suse.com> schrieb am 18.02.2014 um 14:07 in
> Nachricht <20140218140726.1b2dfd0f@ultralix>:
>> On Tue, 18 Feb 2014 13:48:21 +0100
>> Lars Marowsky-Bree <lmb@suse.com> wrote:
>>
>>> On 2014-02-18T09:55:44, Kristoffer Grönlund <kgronlund@suse.com>
>>> wrote:
>>>
>>>> Sounds like a good idea to me, too. I'll see what I can do :)
>>>>
>>>> At least a simple approximation of glob-syntax should be doable.
>>>
>>> Constraints can already refer to regex now too. And we're talking
>>> about being able to match on tags (or even attributes) on start/stop
>>> etc.
>>>
>>> It'd make sense to then merge all this consistently, right?
>>>
>>> (Perhaps even via a crm_resource -l option, so that pcs/crmsh use the
>>> same matching code as the PE and as each other, if that makes any
>>> sense.)
>>>
>>
>> I also realised that there is another complication, which is that
>> unless in interactive mode, the bash shell will consume the regex
>> syntax, and it would need to be escaped. So that would make the feature
>> even more confusing and doesn't seem entirely clean - although this is
>> a limitation of shell syntax. In theory the shell could use the
>> completion information to expand 'crm configure show prim*' into all
>> the completions for prim*.
>
> I don't know whether this is a real restriction for people who are used to use
> the command line: Even when using grep, sed or awk, some REs have to be
> escaped, and the shell has no idea how to complete them.
>
>>
>> Unifying this might be difficult, as far as I know pcs doesn't have an
>> interactive mode or anything similar to the configure interface of
>> crmsh..

It does have bash completion for the command line.
Re: Antw: Re: Q: crm configure edit/show regex [ In reply to ]
On 2014-02-19T10:31:45, Andrew Beekhof <andrew@beekhof.net> wrote:

> >> Unifying this might be difficult, as far as I know pcs doesn't have an
> >> interactive mode or anything similar to the configure interface of
> >> crmsh..
> It does have bash completion for the command line.

FWIW, so does the crm shell ;-) (It works just like in the interactive
mode too, probably the fully internal mode is a bit faster, since it
avoids bash stuff.)


Regards,
Lars

--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Antw: Re: Q: crm configure edit/show regex [ In reply to ]
On 20 Feb 2014, at 1:42 am, Lars Marowsky-Bree <lmb@suse.com> wrote:

> On 2014-02-19T10:31:45, Andrew Beekhof <andrew@beekhof.net> wrote:
>
>>>> Unifying this might be difficult, as far as I know pcs doesn't have an
>>>> interactive mode or anything similar to the configure interface of
>>>> crmsh..
>> It does have bash completion for the command line.
>
> FWIW, so does the crm shell ;-)

Wasn't trying to imply it didn't. Only that pcs wasn't completely devoid of such functionality.

> (It works just like in the interactive
> mode too, probably the fully internal mode is a bit faster, since it
> avoids bash stuff.)
>
>
> Regards,
> Lars
>
> --
> Architect Storage/HA
> SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
> "Experience is the name everyone gives to their mistakes." -- Oscar Wilde
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems