Mailing List Archive

crm configure show to a pipe
Hi Kristoffer, all,

running 'crm configure show > file' appends non-printable chars at the
end (at least if op_defaults is used):

...
property cib-bootstrap-options: \
dc-version=1.1.12-c191bf3 \
cluster-infrastructure=corosync \
cluster-recheck-interval=10m \
stonith-enabled=false \
no-quorum-policy=freeze \
last-lrm-refresh=1415955398 \
maintenance-mode=false \
stop-all-resources=false \
stop-orphan-resources=true \
have-watchdog=false
rsc_defaults rsc_options: \
allow-migrate=false \
failure-timeout=10m \
migration-threshold=INFINITY \
multiple-active=stop_start \
priority=0
op_defaults op-options: \
record-pending=true.[?1034h


Best,
Vladislav
_______________________________________________
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: crm configure show to a pipe [ In reply to ]
Hi,

On Mon, Nov 17, 2014 at 10:05:59AM +0300, Vladislav Bogdanov wrote:
> Hi Kristoffer, all,
>
> running 'crm configure show > file' appends non-printable chars at the
> end (at least if op_defaults is used):

Best to use crm configure save for filtering (I guess that you
don't want colors in that case). As for strange codes output,
they're most likely due to some libreadline bug and TERM set to
xterm. I found some information at the time here:

https://bugs.gentoo.org/show_bug.cgi?id=246091

We dealt with that then by not importing readline unless
absolutely necessary. The changeset is 4d11007. My bad for not
commenting that in the code.

readline probably gets imported in non-interactive mode again.

Thanks,

Dejan


> ...
> property cib-bootstrap-options: \
> dc-version=1.1.12-c191bf3 \
> cluster-infrastructure=corosync \
> cluster-recheck-interval=10m \
> stonith-enabled=false \
> no-quorum-policy=freeze \
> last-lrm-refresh=1415955398 \
> maintenance-mode=false \
> stop-all-resources=false \
> stop-orphan-resources=true \
> have-watchdog=false
> rsc_defaults rsc_options: \
> allow-migrate=false \
> failure-timeout=10m \
> migration-threshold=INFINITY \
> multiple-active=stop_start \
> priority=0
> op_defaults op-options: \
> record-pending=true.[?1034h
>
>
> Best,
> Vladislav
> _______________________________________________
> 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: crm configure show to a pipe [ In reply to ]
17.11.2014 14:00, Dejan Muhamedagic пишет:
> Hi,
>
> On Mon, Nov 17, 2014 at 10:05:59AM +0300, Vladislav Bogdanov wrote:
>> Hi Kristoffer, all,
>>
>> running 'crm configure show > file' appends non-printable chars at the
>> end (at least if op_defaults is used):
>
> Best to use crm configure save for filtering (I guess that you
> don't want colors in that case). As for strange codes output,

Great! How I missed that? :)
The only noticeable difference that it is impossible to save partial
CIB, filtering by object ids (like 'show' allows).

> they're most likely due to some libreadline bug and TERM set to
> xterm. I found some information at the time here:
>
> https://bugs.gentoo.org/show_bug.cgi?id=246091
>
> We dealt with that then by not importing readline unless
> absolutely necessary. The changeset is 4d11007. My bad for not
> commenting that in the code.
>
> readline probably gets imported in non-interactive mode again.
>
> Thanks,
>
> Dejan
>
>
>> ...
>> property cib-bootstrap-options: \
>> dc-version=1.1.12-c191bf3 \
>> cluster-infrastructure=corosync \
>> cluster-recheck-interval=10m \
>> stonith-enabled=false \
>> no-quorum-policy=freeze \
>> last-lrm-refresh=1415955398 \
>> maintenance-mode=false \
>> stop-all-resources=false \
>> stop-orphan-resources=true \
>> have-watchdog=false
>> rsc_defaults rsc_options: \
>> allow-migrate=false \
>> failure-timeout=10m \
>> migration-threshold=INFINITY \
>> multiple-active=stop_start \
>> priority=0
>> op_defaults op-options: \
>> record-pending=true.[?1034h
>>
>>
>> Best,
>> Vladislav
>> _______________________________________________
>> 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
>

_______________________________________________
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: crm configure show to a pipe [ In reply to ]
Dejan Muhamedagic <dejanmm@fastmail.fm> writes:

> Hi,
>
> On Mon, Nov 17, 2014 at 10:05:59AM +0300, Vladislav Bogdanov wrote:
>> Hi Kristoffer, all,
>>
>> running 'crm configure show > file' appends non-printable chars at the
>> end (at least if op_defaults is used):
>
> Best to use crm configure save for filtering (I guess that you
> don't want colors in that case). As for strange codes output,
> they're most likely due to some libreadline bug and TERM set to
> xterm. I found some information at the time here:
>
> https://bugs.gentoo.org/show_bug.cgi?id=246091
>
> We dealt with that then by not importing readline unless
> absolutely necessary. The changeset is 4d11007. My bad for not
> commenting that in the code.
>
> readline probably gets imported in non-interactive mode again.
>

I can confirm that yes, it does. My apologies for reintroducing this
issue! I will change this.

I will also look at adding optional filtering to the save command just
like for show and edit. This seems like a useful feature to me.

--
// 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
Re: crm configure show to a pipe [ In reply to ]
17.11.2014 15:39, Kristoffer Grönlund wrote:
> Dejan Muhamedagic <dejanmm@fastmail.fm> writes:
>
>> Hi,
>>
>> On Mon, Nov 17, 2014 at 10:05:59AM +0300, Vladislav Bogdanov wrote:
>>> Hi Kristoffer, all,
>>>
>>> running 'crm configure show > file' appends non-printable chars at the
>>> end (at least if op_defaults is used):
>>
>> Best to use crm configure save for filtering (I guess that you
>> don't want colors in that case). As for strange codes output,
>> they're most likely due to some libreadline bug and TERM set to
>> xterm. I found some information at the time here:
>>
>> https://bugs.gentoo.org/show_bug.cgi?id=246091
>>
>> We dealt with that then by not importing readline unless
>> absolutely necessary. The changeset is 4d11007. My bad for not
>> commenting that in the code.
>>
>> readline probably gets imported in non-interactive mode again.
>>
>
> I can confirm that yes, it does. My apologies for reintroducing this
> issue! I will change this.
>
> I will also look at adding optional filtering to the save command just
> like for show and edit. This seems like a useful feature to me.
>

Thank you for you extremely productive work!

_______________________________________________
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: crm configure show to a pipe [ In reply to ]
Hi,

On Mon, Nov 17, 2014 at 01:39:39PM +0100, Kristoffer Grönlund wrote:
> Dejan Muhamedagic <dejanmm@fastmail.fm> writes:
>
> > Hi,
> >
> > On Mon, Nov 17, 2014 at 10:05:59AM +0300, Vladislav Bogdanov wrote:
> >> Hi Kristoffer, all,
> >>
> >> running 'crm configure show > file' appends non-printable chars at the
> >> end (at least if op_defaults is used):
> >
> > Best to use crm configure save for filtering (I guess that you
> > don't want colors in that case). As for strange codes output,
> > they're most likely due to some libreadline bug and TERM set to
> > xterm. I found some information at the time here:
> >
> > https://bugs.gentoo.org/show_bug.cgi?id=246091
> >
> > We dealt with that then by not importing readline unless
> > absolutely necessary. The changeset is 4d11007. My bad for not
> > commenting that in the code.
> >
> > readline probably gets imported in non-interactive mode again.
> >
>
> I can confirm that yes, it does. My apologies for reintroducing this
> issue!

No need to apologize, it's really convoluted and I failed to
add a comment about it.

> I will change this.
>
> I will also look at adding optional filtering to the save command just
> like for show and edit. This seems like a useful feature to me.

I guess that the idea of save was to be able to backup/restore.
But the set of filters is readily available anyway, so it may
just as well be extended.

Cheers,

Dejan

> --
> // 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