[Pacemaker] CRM: 'ascii' codec can't encode character
Dejan Muhamedagic
dejanmm at fastmail.fm
Wed May 25 09:16:03 UTC 2011
On Wed, May 25, 2011 at 10:59:12AM +0200, Nikita Michalko wrote:
> Hi Lars,
>
> thank you very match - indeed that was it! After changing the value of
> "timeout" to 60, the crm shell work again.
> I changed also utf8 coding to locale - much better ...
So, which locale do you actually use?
Thanks,
Dejan
>
> Best wishes
>
> Nikita Michalko
>
>
> Am Mittwoch 25 Mai 2011 10:09:49 schrieb Lars Ellenberg:
> > On Wed, May 25, 2011 at 09:12:29AM +0200, Nikita Michalko wrote:
> > > Hi Dejan,
> > >
> > >
> > > thanks for your reply! Here is the output of the command :
> > > /usr/lib64/heartbeat/crmd version
> > > CRM Version: 1.1.5 (ecb6baaf7fc091b023d6d4ba7e0fce26d32cf5c8)
> > > And cib.xml is attached ...
> >
> > There:
> > > <nvpair id="op_defaults-options-timeout" name="timeout"
> > > value="6ß"/>
> >
> > You got an "6ß" there (or at least that's what it looks like when
> > converted to utf8...)
> >
> > Change that to 6s (or whatever you actually meant),
> > and the crm shell will work again.
> >
> > Below patchlet makes the crm shell not crash on this for me.
> > But I'm not sure if hardcoding "utf8" is the best way forward,
> > probably it should be locale aware.
> > Possibly it needs to put a try execpt around that s.encode,
> > and chose a different representation, if it is not possible
> > to encode it in whatever the current locale is?
> >
> >
> > diff --git a/shell/modules/parse.py b/shell/modules/parse.py
> > --- a/shell/modules/parse.py
> > +++ b/shell/modules/parse.py
> > @@ -728,7 +728,7 @@ class CliParser(object):
> > '''
> > cli_list = ''
> > if type(s) == type(u''):
> > - s = s.encode('ascii')
> > + s = s.encode('utf8')
> > if type(s) == type(''):
> > if s and s.startswith('#'):
> > self.comments.append(s)
> >
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
More information about the Pacemaker
mailing list