Page 1 of 1

Undefined index: cpulimit error after update

Posted: Thu Oct 26, 2017 11:52 am
by manyax
Hello, I'm getting the following error after I upgraded from v2.0.3-70 to 2.0.3-84, it appears only HPE-VSR-1000 is affected by this

Code: Select all

Upgrade: eve-ng-qemu:amd64 (2.0.3-70, 2.0.3-72), eve-ng:amd64 (2.0.3-71, 2.0.3-84)
Image

#0 /opt/unetlab/html/includes/api_nodes.php(539): Slim\Slim::handleErrors(8, 'Undefined index...', '/opt/unetlab/ht...', 539, Array)
#1 /opt/unetlab/html/api.php(302): apiGetLabNodeTemplate(Array)
#2 [internal function]: {closure}('hp-vsr')
#3 /opt/unetlab/html/includes/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#4 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
#5 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#6 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#7 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#8 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#9 /opt/unetlab/html/api.php(1339): Slim\Slim->run()
#10 {main}

Maybe someone has knowledge on how to fix this without breaking my labs.

Re: Undefined index: cpulimit error after update

Posted: Thu Oct 26, 2017 12:16 pm
by Chris929
vi /opt/unetlab/html/templates/hpvsr.php

Code: Select all

$p['type'] = 'qemu';
$p['name'] = 'VSR1000';
$p['cpulimit'] = 1;
$p['icon'] = 'Router.png';
$p['cpu'] = 2;
$p['ram'] = 4096;
$p['ethernet'] = 2;
$p['console'] = 'vnc';
$p['qemu_arch'] = 'x86_64';
$p['qemu_options'] = '-machine type=pc-1.0,accel=kvm -nographic -rtc base=utc';
It seems your template is somehow missing the [cpulimit] parameter - simply add it and you should be good to go.
This enables to use the "CPU Limit per node" - however I'm not sure why you still have the old template after update - but the line $p['cpulimit'] = 1; is missing in yours.

Re: Undefined index: cpulimit error after update

Posted: Thu Oct 26, 2017 12:55 pm
by manyax
It's there..
OK thanks, I had a custom template hp-vsr, for default telnet management ... I didn't expect this to be re written by the update :(

Re: Undefined index: cpulimit error after update

Posted: Thu Oct 26, 2017 2:45 pm
by ecze
When using chinese patch, don't expect to be EVE-NG compliant....

Only legacy EVE-NG code is supported by official updates

E.