[one-users] VM deploy_id in non-English environment causes trouble

Pellaeon Lin nfsmwlin at gmail.com
Sun Sep 9 01:47:43 PDT 2012


Hmm, I didn't know of 'onehost sync', so the results in my previous email
probably weren't very accurate.
I did some more testing, this time I did always make sure my changes to the
scripts were applied to /var/tmp/one/* , and reverted my changes to
oneadmin's .bashrc .

My conclusion is that we need not only "export LANG=C" in scripts_common.sh
but also "export LANGUAGE=en_US:en" to make shell commands always return in
English.

But there was another confusing result:

root at cnmc20:/var/tmp/one/vmm/kvm# su oneadmin
> oneadmin at cnmc20:/var/tmp/one/vmm/kvm$ cd
> oneadmin at cnmc20:~$ export | grep LANG
> declare -x LANG="zh_TW.UTF-8"
> declare -x LANGUAGE="zh_TW:zh"
> oneadmin at cnmc20:~$ virsh list
>  Id 名稱               狀態
> ----------------------------------
>  24 one-45               執行中
>
> oneadmin at cnmc20:~$ LANG=C virsh list
>  Id Name                 State
> ----------------------------------
>  24 one-45               running
>
This means we actually only need "LANG=C" to override shell command's
output locale?

My default locale:

> root at cnmc20:/var/tmp/one# grep 'LANG' /etc/default/locale
> LANG="zh_TW.UTF-8"
> LANGUAGE="zh_TW:zh"
>

My issue is solved, but I still really don't know why.

I will do a fresh install of Ubuntu and OpenNebula some time later and try
to reproduce my previous results, if it is reproducible, I will file a bug
report.

Thanks for your help, Javier ! :-)

2012/9/6 Javier Fontan <jfontan at opennebula.org>

> The scripts that call virsh include the file 'scripts_common.sh' that
> already does an 'export LANG=C' so this is really strange.
>
> The call is located in your nodes in /var/tmp/one/vmm/kvm/deploy. as
> you can see it includes the mentioned script.
>
> Could it be that you had an old installation and those files belong to
> an old version. Execute 'onehost sync' in the frontend so those
> scripts are updated, just in case.
>
>
>
> On Tue, Sep 4, 2012 at 5:19 PM, Pellaeon Lin <nfsmwlin at gmail.com> wrote:
> > Hi,
> > I use the OpenNebula 3.6.0 deb package on Ubuntu Server 12.04.1 , I have
> KVM
> > and Sunstone working.
> > When I create a new VM via Sunstone, it would normally boot up and show
> the
> > state "RUNNING", and I can ssh into it.
> > But via Sunstone I saw the VM's Deploy ID was "區域" , which instead
> should be
> > "one-<number>"
> > After a while its state would become "UNKNOWN". Here's what I get in
> > oned.log:
> >>
> >> Message received: LOG I 19 錯誤: 無法取得區域「區域」
> >> Message received: LOG I 19 錯誤: Domain not found: no domain with matching
> >> name '區域'
> >> Message received: LOG I 19 ExitCode: 0
> >> Message received: POLL SUCCESS 19 STATE=d
> >
> >
> > I installed Ubuntu in Traditional Chinese, so I'm guessing that some
> shell
> > commands' output would be in Chinese, thus OpenNubula would be unable to
> > parse it.
> >
> > I added
> >>
> >> export LANG="C"
> >> export LANGUAGE="en_US:en"
> >
> > to oneadmin's .bashrc , logged in again, restart oned, then create a new
> VM
> > via Sunstone, the issue persists.
> >
> > I then added
> >>
> >> ENV['LANGUAGE']='en_US:en'
> >
> > to /var/lib/one/remotes/vmm/kvm/poll, the issue still persists.
> >
> > From oned.log above, I think OpenNebula was trying to execute a "virsh
> > <something>" command, but I can't find where it was invoked nor which
> > command it actually was.
> >
> > Any advice?
> >
> > Thanks :-)
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >
>
>
>
> --
> Javier Fontán Muiños
> Project Engineer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120909/9351cbb9/attachment-0002.htm>


More information about the Users mailing list