google-code-export / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
Other
1 stars 1 forks source link

Memory, Mb and Diskspace, Mb wrong value #508

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Create CT
2. GoTo 'Virtual Server List' (I can see: Memory, Mb: 1000, Diskspace, Mb: 2000)
3. Change settings for this CT, change Server Template to another (with 
different limits Memory and Diskspace), Save.
4. In 'Virtual Server List' i can see still the same values (Memory, Mb: 1000, 
Diskspace, Mb: 2000).

Actual result: Memory, Mb: 1000, Diskspace, Mb: 2000

Expected result: Memory, Mb: $newValueFromNewTemplate, Diskspace, Mb: 
$newValueFromNewTemplate

Version of the product: 2.4 latest stable

Server OS: Scientific Linux 6.4 with latest updates

Browser: Chrome Version 26.0.1410.63

Additional information: The resources are for CT changed in step 3 (convirmed 
with df/free inside of the CT). When I synchronize the physical server, it 
helps (new values are displayed), but it is confusing.

Thank you for great software!

Original issue reported on code.google.com by hlubina....@gmail.com on 17 May 2013 at 6:53

GoogleCodeExporter commented 9 years ago
Hello,

to fix this up you can edit file 
/opt/ovz-web-panel/app/controllers/admin/virtual_servers_controller.rb, just 
add string

hardware_server.sync_virtual_servers

after "if virtual_server.save_physically" at 224 line.

Edit code (224-225 lines) should be:

--8<--
    if virtual_server.save_physically
      hardware_server.sync_virtual_servers
      render :json => { :success => true }
    else
      render :json => { :success => false, :form_errors => virtual_server.errors }
    end
--8<-- 

this works for me.

Original comment by Dmitry.B...@gmail.com on 3 Aug 2013 at 12:31

GoogleCodeExporter commented 9 years ago
The above modification does seem to work for other values, but not for RAM 
seemingly.

Thanks though :)

Original comment by 86brown on 3 May 2014 at 10:20