olopez32 / ganeti

Automatically exported from code.google.com/p/ganeti
0 stars 0 forks source link

ovfconverter unable to read config.ini #850

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[ganeti 2.10.4 from wheezy-backports, debian wheezy]

Even after making a raw block export (-o snf-image), ovfconverter fails with 
the following error:

# /usr/lib/ganeti/tools/ovfconverter export --format=vmdk 
/var/lib/ganeti/export/host87.ws.nsrc.org/config.ini
2014-06-05 12:52:01,124: ('No memory information found', 'environment_error')
Traceback (most recent call last):
  File "/usr/lib/ganeti/tools/ovfconverter", line 181, in main
    converter.Parse()
  File "/usr/share/ganeti/2.10/ganeti/ovf.py", line 1759, in Parse
    self.results_memory = self._ParseMemory()
  File "/usr/share/ganeti/2.10/ganeti/ovf.py", line 1613, in _ParseMemory
    errors.ECODE_ENVIRON)
OpPrereqError: ('No memory information found', 'environment_error')

Here is the ini file which was generated by gnt-backup export:

# cat /var/lib/ganeti/export/host87.ws.nsrc.org/config.ini
[export]
version = 0
timestamp = 1401961273
source = 0e66e359-4c56-477e-b6a1-a24f0e21b9ba
os = snf-image+wheezy
compression = none

[instance]
name = host87.ws.nsrc.org
maxmem = 128
minmem = 128
memory = 128
vcpus = 1
disk_template = plain
hypervisor = kvm
tags =
nic0_mac = aa:00:00:e7:25:1e
nic0_ip = None
nic0_network = None
nic0_name = None
nic0_vlan =
nic0_link = br-lan
nic0_mode = bridged
nic_count = 1
disk0_ivname = disk/0
disk0_dump = 25d92f7a-581c-4cf6-abac-dec180c163d6.disk0.snap
disk0_size = 2048
disk0_name = None
disk_count = 1

[hypervisor]
spice_password_file =
nic_type = paravirtual
use_chroot = False
spice_use_tls = False
vnc_x509_path =
vnc_bind_address = 0.0.0.0
cpu_threads = 0
cdrom2_image_path =
usb_mouse =
spice_tls_ciphers = HIGH:-DES:-3DES:-EXPORT:-ADH
spice_streaming_video =
spice_use_vdagent = True
vnet_hdr = True
machine_version =
migration_downtime = 30
cpu_sockets = 0
usb_devices =
security_model = none
cdrom_image_path =
kvm_extra =
spice_ip_version = 0
vhost_net = False
cpu_cores = 0
cpu_mask = all
disk_cache = default
kvm_path = /usr/bin/kvm
kernel_path =
initrd_path =
vnc_x509_verify = False
vnc_tls = False
cdrom_disk_type =
use_localtime = False
security_domain =
serial_console = True
spice_bind =
spice_zlib_glz_wan_compression =
kvm_flag =
vnc_password_file =
disk_type = paravirtual
soundhw =
spice_image_compression =
spice_playback_compression = True
kernel_args = ro
serial_speed = 38400
vga =
root_path = /dev/vda1
spice_jpeg_wan_compression =
floppy_image_path =
acpi = True
keymap =
cpu_type = qemu64,+vmx
boot_order = disk
mem_path =
reboot_behavior = reboot

[backend]
auto_balance = True
spindle_use = 1
vcpus = 1
minmem = 128
always_failover = False
maxmem = 128

[os]

As far as I can tell, ovfconverter is looking for a setting "memory" in an ini 
section "[backend]", but no such section exists in config.ini.

However test/data/ovfdata/config.ini *does* have a "[backend]" section. 
Possibly the config.ini format has changed but the test data and the 
ovfconverter have not been updated?

This does suggest that ovfconverter is not being used by anybody, at least for 
export :-(

Original issue reported on code.google.com by bcandler...@googlemail.com on 5 Jun 2014 at 12:05

GoogleCodeExporter commented 9 years ago
Correction: the '[backend]' section exists but the 'memory' setting doesn't.

However if I use gnt-instance info I see:
...
  Back-end parameters:
    always_failover: default (False)
    auto_balance: default (True)
    maxmem: default (128)
    memory: default (128)
    minmem: default (128)
    spindle_use: default (1)
    vcpus: default (1)
...

Original comment by bcandler...@googlemail.com on 5 Jun 2014 at 12:15

GoogleCodeExporter commented 9 years ago
The gnt-instance "memory" value is added explicitly [lib/client/gnt_instance.py]

  # deprecated "memory" value, kept for one version for compatibility
  # TODO(ganeti 2.7) remove.
  be_actual = copy.deepcopy(instance["be_actual"])
  be_actual["memory"] = be_actual[constants.BE_MAXMEM]

Original comment by bcandler...@googlemail.com on 5 Jun 2014 at 12:18

GoogleCodeExporter commented 9 years ago
http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.1.xsd
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingD
ata.xsd

Maybe minmem and maxmem should map to rasd:Reservation and rasd:Limit 
respectively? In that case can you just omit rasd:VirtualQuantity? (The schema 
appears to allow this, but not sure if other implementations would be happy)

Original comment by bcandler...@googlemail.com on 5 Jun 2014 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by pud...@google.com on 5 Jun 2014 at 2:24

GoogleCodeExporter commented 9 years ago

Original comment by aeh...@google.com on 24 Jun 2015 at 1:29