Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kvm.rb to fix localization bug #96

Merged
merged 1 commit into from
May 12, 2016

Conversation

melehin
Copy link
Contributor

@melehin melehin commented May 12, 2016

The LANG environment variable does not work as expected with virsh -c qemu:///system nodeinfo. But LC_ALL=C works fine.
Without LC_ALL=C monitoring fails with a "Error monitoring Host hostname (0): ./kvm.rb:49: undefined method `*' for nil:NilClass (NoMethodError)".

Server configuration:
OS: CentOS 6.2
OpenNebula: 4.14.2
Default language: ru_RU.UTF-8

Bug example:
LANG=C virsh -c qemu:///system nodeinfo
Модель процессора: x86_64
CPU: 16
Частота процессора: 1600 MHz
Сокеты: 1
Ядер на сокет: 4
Потоков на ядро: 2
Ячейки NUMA: 2
Объём памяти: 74237932 KiB

Correct behavior:
LC_ALL=C virsh -c qemu:///system nodeinfo
CPU model: x86_64
CPU(s): 16
CPU frequency: 1600 MHz
CPU socket(s): 1
Core(s) per socket: 4
Thread(s) per core: 2
NUMA cell(s): 2
Memory size: 74237932 KiB

The LANG environment variable does not work as expected with virsh -c qemu:///system nodeinfo. But LC_ALL=C works fine.
Without LC_ALL=C monitoring fails with a "Error monitoring Host hostname (0): ./kvm.rb:49: undefined method `*' for nil:NilClass (NoMethodError)".

Server configuration:
OS: CentOS 6.2
OpenNebula: 4.14.2
Default language: ru_RU.UTF-8

Bug example:
LANG=C virsh -c qemu:///system nodeinfo
Модель процессора: x86_64
CPU:                 16
Частота процессора: 1600 MHz
Сокеты:        1
Ядер на сокет: 4
Потоков на ядро: 2
Ячейки NUMA:   2
Объём памяти: 74237932 KiB

Correct behavior:
LC_ALL=C virsh -c qemu:///system nodeinfo
CPU model:           x86_64
CPU(s):              16
CPU frequency:       1600 MHz
CPU socket(s):       1
Core(s) per socket:  4
Thread(s) per core:  2
NUMA cell(s):        2
Memory size:         74237932 KiB
@rsmontero rsmontero merged commit bdb76d4 into OpenNebula:master May 12, 2016
@melehin melehin deleted the patch-1 branch May 12, 2016 11:22
@jmelis
Copy link
Contributor

jmelis commented May 12, 2016

thanks!!

rsmontero pushed a commit that referenced this pull request Oct 6, 2020
rsmontero pushed a commit that referenced this pull request Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants