Description of problem: Initializing workspace fails Steps to Reproduce: 1. lagocli init / $PWD/testd-eployment / /usr/share/ovirtlago/config/virt/centos7.json / --template-repo-path=$PWD/lago-template-repositories/office.json Actual results: 2015-10-15 13:43:49,651 - root - DEBUG - Running command: qemu-img create -f qcow2 -b /home/tlitovsk/workspace/ci/lago_var/store/in_office_repo:centos7_host:v5 /home/tlitovsk/workspace/ci/lago_run/test-deployment/images/host0_root.qcow2 2015-10-15 13:43:49,651 - root - DEBUG - Running command: ['qemu-img', 'create', '-f', 'qcow2', '-b', u'/home/tlitovsk/workspace/ci/lago_var/store/in_office_repo:centos7_host:v5', u'/home/tlitovsk/workspace/ci/lago_run/test-deployment/images/host0_root.qcow2'] 2015-10-15 13:43:49,750 - root - DEBUG - command exit with 0 2015-10-15 13:43:49,751 - root - DEBUG - command stdout: Formatting '/home/tlitovsk/workspace/ci/lago_run/test-deployment/images/host0_root.qcow2', fmt=qcow2 size=53687091200 backing_file='/home/tlitovsk/workspace/ci/lago_var/store/in_office_repo:centos7_host:v5' encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 2015-10-15 13:43:49,751 - root - INFO - Successfully created disk at /home/tlitovsk/workspace/ci/lago_run/test-deployment/images/host0_root.qcow2 2015-10-15 13:43:49,753 - root - ERROR - Error occured, aborting Traceback (most recent call last): File "/usr/bin/lagocli", line 531, in main func(args) File "/usr/bin/lagocli", line 78, in do_init prefix.virt_conf(virt_conf, repo, store) File "/usr/lib/python2.7/site-packages/lago/__init__.py", line 348, in virt_conf self._config_net_topology(conf) File "/usr/lib/python2.7/site-packages/lago/__init__.py", line 220, in _config_net_topology self._allocate_ips_to_nics(conf) File "/usr/lib/python2.7/site-packages/lago/__init__.py", line 202, in _allocate_ips_to_nics net['gw'], KeyError: 'gw' Expected results: success Additional info: version : lago-0.2-153_g948690d.fc22.noarch.rpm
we don't always have gw declared in the specific net value. here you use : "nets": { "lago": { "type": "nat", "dhcp": { "start": 100, "end": 254 }, "management": true } } which does not state the gateway - so we should use default value in lago/__init__.py line 202 its part of commit 59411f1 >>. vacant = _create_ip( net['gw'], set(range(2, 255)).difference( set( [ int(ip.split('.')[-1]) for ip in allocated ] ) ).pop() ) <<<
Moved to https://github.com/lago-project/lago/issues/59