Author Topic: opennode-tui gives error on Create VM  (Read 963 times)

TAfirehawk

  • Newbie
  • *
  • Posts: 38
opennode-tui gives error on Create VM
« on: January 02, 2012, 05:09:31 PM »
I am running CentOS 6.2 with OpenVZ kernel 2.6.32-042stab045.1 on x86_64 patched in after OpenNode script was used.  I did "yum update opennode" to get the latest opennode-tui.

This is my third install of OpenVZ/OpenNode but this time I can't get a VM created without the following error.  I added the template in the template cache and the files show up in /storage/local/openvz and /unpacked.

Code: [Select]
running cli
Traceback (most recent call last):
  File "/opt/opennode/bin/opennode", line 83, in <module>
    tui.run()
  File "/usr/lib/python2.6/site-packages/opennode/cli/screen.py", line 392, in run
    self.display_main_screen()
  File "/usr/lib/python2.6/site-packages/opennode/cli/screen.py", line 47, in display_main_screen
    logic[result]()
  File "/usr/lib/python2.6/site-packages/opennode/cli/screen.py", line 341, in display_vm_create
    template_settings = vm.get_ovf_template_settings(ovf_file)
  File "/usr/lib/python2.6/site-packages/opennode/cli/actions/vm/openvz.py", line 27, in get_ovf_template_settings
    settings["vm_id"] = _get_available_ct_id()
  File "/usr/lib/python2.6/site-packages/opennode/cli/actions/vm/openvz.py", line 118, in _get_available_ct_id
    return max (100, max([0] + _get_openvz_ct_id_list())) + 1
  File "/usr/lib/python2.6/site-packages/opennode/cli/actions/vm/openvz.py", line 128, in _get_openvz_ct_id_list
    return map(int, conn.listDefinedDomains() + conn.listDomainsID())
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2859, in listDomainsID
    if ret is None: raise libvirtError ('virConnectListDomainsID() failed', conn=self)
libvirt.libvirtError: internal error Child process (/usr/sbin/vzlist -ovpsid -H) status unexpected: exit status 1

Files seem ok here:
Code: [Select]
[root@community openvz]# ls
centos-6.0-x86_64-asys.tar  centos-6.0-x86_64-asys.tar.pfff  unpacked
[root@community openvz]# ls unpacked
centos-6.0-x86_64-asys.ovf  centos-6.0-x86_64-asys.tar.gz

ilja_l

  • Administrator
  • Full Member
  • *****
  • Posts: 225
Re: opennode-tui gives error on Create VM
« Reply #1 on: January 02, 2012, 05:11:52 PM »
Hi,

could you please check two things:

1. Is libvirtd running? service libvirtd status

2. Please, post output of: /usr/sbin/vzlist -ovpsid -H

thanks,
Ilja

TAfirehawk

  • Newbie
  • *
  • Posts: 38
Re: opennode-tui gives error on Create VM
« Reply #2 on: January 02, 2012, 05:18:58 PM »
1. libvertd is running

2. "Container(s) not found" is the output


I don't know if this matters and I have posted about this vzkernel-firmware conflict on OpenVZ's forums, but there seems to be some issues with the latest kernels.

Code: [Select]
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-2.6.32-220.el6.x86_64 has missing requires of kernel-firmware >= ('0', '2.6.32', '220.el6')
kernel-2.6.32-220.2.1.el6.x86_64 has missing requires of kernel-firmware >= ('0', '2.6.32', '220.2.1.el6')
vzkernel-firmware-2.6.32-042stab045.1.noarch is a duplicate with vzkernel-firmware-2.6.32-042stab036.1.noarch

I got that error when doing "yum install vzdump"

TAfirehawk

  • Newbie
  • *
  • Posts: 38
Re: opennode-tui gives error on Create VM
« Reply #3 on: January 02, 2012, 05:34:06 PM »
Another thing I noticed from my previous install is the directories have changed.  Previously the template cache was /storage/templates/openvz with "deploy" inside and now it is /storage/local/openvz with "unpacked" inside.

I have tried copying all the template files between these folders but I am still getting the same error.  I know last time I had to manually wget the template files because the opennode-tui wouldn't download them properly....but this time none of my tricks are working.

ilja_l

  • Administrator
  • Full Member
  • *****
  • Posts: 225
Re: opennode-tui gives error on Create VM
« Reply #4 on: January 02, 2012, 05:55:14 PM »
Another thing I noticed from my previous install is the directories have changed.  Previously the template cache was /storage/templates/openvz with "deploy" inside and now it is /storage/local/openvz with "unpacked" inside.

I have tried copying all the template files between these folders but I am still getting the same error.  I know last time I had to manually wget the template files because the opennode-tui wouldn't download them properly....but this time none of my tricks are working.

Directories are ok, there was a problem with them for some time, as we've added support for multiple storage pools (e.g. on local disk and on a shared FS), so path had to be changed a bit to reflect that.

I've reproduced the problem, it is caused by a wrong handling of the cases when there are 0 CTs available when running opennode-tui. Working on a fix.

TAfirehawk

  • Newbie
  • *
  • Posts: 38
Re: opennode-tui gives error on Create VM
« Reply #5 on: January 02, 2012, 05:58:11 PM »
Thank you for the super-fast response.

ilja_l

  • Administrator
  • Full Member
  • *****
  • Posts: 225
Re: opennode-tui gives error on Create VM
« Reply #6 on: January 02, 2012, 06:19:05 PM »
Ok, fixed RPM is in the repository (opennode-tui-2.0.0-1.on.20120102161505.x86_64), just update the package and it should work.

Thank you for reporting this issue, a pretty stupid bug, not sure why it wasn't caught before. It seems that libvirt's 0.9.x branch python wrapper behaves in a slightly different way than the one we had before (0.4.x), I've changed detection of existing openvz CTs to use openvz cli directly, instead of going through libvirt.

TAfirehawk

  • Newbie
  • *
  • Posts: 38
Re: opennode-tui gives error on Create VM
« Reply #7 on: January 02, 2012, 06:31:45 PM »
Fixed :)

I got to the VM settings now, thanks for the super-fast help.