Undefined index: cpulimit error after update

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
manyax
Posts: 2
Joined: Thu Oct 26, 2017 8:33 am

Undefined index: cpulimit error after update

Post by manyax » Thu Oct 26, 2017 11:52 am

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.

Chris929
Posts: 83
Joined: Tue Jun 27, 2017 8:51 am

Re: Undefined index: cpulimit error after update

Post by Chris929 » Thu Oct 26, 2017 12:16 pm

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.

manyax
Posts: 2
Joined: Thu Oct 26, 2017 8:33 am

Re: Undefined index: cpulimit error after update

Post by manyax » Thu Oct 26, 2017 12:55 pm

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 :(

ecze
Posts: 534
Joined: Wed Mar 15, 2017 1:54 pm

Re: Undefined index: cpulimit error after update

Post by ecze » Thu Oct 26, 2017 2:45 pm

When using chinese patch, don't expect to be EVE-NG compliant....

Only legacy EVE-NG code is supported by official updates

E.

Post Reply