Bug with special characters

30 views
Skip to first unread message

Thomas Rieschl

unread,
Aug 2, 2012, 5:55:23 AM8/2/12
to gan...@googlegroups.com
Hi!

I'm building an new ganeti cluster (well.. with just one node) and I
think I discovered a bug.

I'm using v2.5.1 from Debian Squeeze Backports, so before opening an
issue I wanted to check with you guys if someone could test if the bug
is still in 2.6.
I don't want to install a test-machine with 2.6 just to check if the bug
is still there.


It seems to be a problem with parsing special characters. Because I
install my instances in fully virtualized mode with the install CD of
the OS (mostly Debian or Windows), I abuse the OS field to enter a short
description of the machine.

So, long story short: I entered a os name with the umlaut "Ö":
gnt-instance modify --force --force-variant -o "Debian 6.0 Squeeze x64 -
ÖH Website" megan

After that, everytime I tried to issue a "gnt-instance"-command which
normally outputs the OS of the instance (gnt-instance list, gnt-instance
info megan) I got the following error:

# gnt-instance list
Traceback (most recent call last):
File "/usr/sbin/gnt-instance", line 21, in <module>
sys.exit(main.Main())
File "/usr/lib/pymodules/python2.6/ganeti/client/gnt_instance.py",
line 1556, in Main
override={"tag_type": constants.TAG_INSTANCE})
File "/usr/lib/pymodules/python2.6/ganeti/cli.py", line 2025, in
GenericMain
result = func(options, args)
File "/usr/lib/pymodules/python2.6/ganeti/client/gnt_instance.py",
line 223, in ListInstances
force_filter=opts.force_filter)
File "/usr/lib/pymodules/python2.6/ganeti/cli.py", line 2676, in
GenericList
verbose=verbose)
File "/usr/lib/pymodules/python2.6/ganeti/cli.py", line 2590, in
FormatQueryResult
table = FormatTable(result.data, columns, header, separator)
File "/usr/lib/pymodules/python2.6/ganeti/cli.py", line 2786, in
FormatTable
formatted = [col.format(value) for value, col in zip(row, columns)]
File "/usr/lib/pymodules/python2.6/ganeti/cli.py", line 2517, in __call__
return self._fn(value)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in
position 25: ordinal not in range(128)


The fix was quite easy: I edited ganeti/config.data and removed the
umlaut from the instance name and restarted ganeti.

The locale setting of the server is UTF-8 (de_AT.UTF-8) and the console
connection (with putty) is also set to UTF-8 (Putty config -> Window ->
Translation).


So, could anyone try if that error still exists in ganeti 2.6 and tell
me then, so I can open an issue or open the issue himself?


Thanks!

Cheers,
Thomas

Iustin Pop

unread,
Aug 2, 2012, 6:21:07 AM8/2/12
to gan...@googlegroups.com
On Thu, Aug 02, 2012 at 11:55:23AM +0200, Thomas Rieschl wrote:
> Hi!
>
> I'm building an new ganeti cluster (well.. with just one node) and I
> think I discovered a bug.
>
> I'm using v2.5.1 from Debian Squeeze Backports, so before opening an
> issue I wanted to check with you guys if someone could test if the
> bug is still in 2.6.
> I don't want to install a test-machine with 2.6 just to check if the
> bug is still there.
>
>
> It seems to be a problem with parsing special characters. Because I
> install my instances in fully virtualized mode with the install CD
> of the OS (mostly Debian or Windows), I abuse the OS field to enter
> a short description of the machine.

[…]

> So, could anyone try if that error still exists in ganeti 2.6 and
> tell me then, so I can open an issue or open the issue himself?

Hi,

This is a known issue with Ganeti, indeed. We don't have an external bug
open, but we track in on the internal bug tracker (google-specific). If
you want to open an issue on the external one too, that would be
appreciated.

Note that due to Python 2.x's mixup of string/unicode types, this won't
be able to be fully solved until we move to Python 3.x.

thanks,
iustin
Reply all
Reply to author
Forward
0 new messages