Reset custom limit to default for LVE
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Scott Mutter
  2. Tuesday, 12 January 2016
  3.  Subscribe via email
Change a limit for an LVE back to server default limits
Rate this post:
  1. 12.01.2016 14:01:48
  2. # 1
Scott Mutter Accepted Answer
Posts: 56
Joined: 23.04.2014
0
Votes
Undo
Is there a way to reset a specific limit for an LVE back to it\'s default value?

For example, say I defined the default limits:

Speed: 60%
Physical Memory: 512MB


Then I increased an LVE - 805 to:

Speed: 100%
Physical Memory: 1024MB


Later I decide to increase the default Physical Memory to 2048MB:

Physical Memory: 2048MB

LVE 805 doesn\'t get upgraded to 2048MB, because it was defined with a custom limit of 1024MB. Instead of setting LVE 805 to a custom memory limit of 2048MB, can I just remove that limit for that LVE so it goes back to the default limits?

Something like

lvectl set 805 --pmem=default

So that it effectively removes the:

<pmem limit=\"262144\"/>

line fr om /etc/container/ve.cfg for LVE 805?

I don\'t want to completely remove LVE 805\'s settings, because I want LVE 805 to continue to have 100% speed, and the default speed lim it remains at 60%.
  1. 12.01.2016 14:01:47
  2. # 2
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
There is no way to do it with our tools. If you use \'lvectl delete 805\' it will remove whole section for 805 LVE. The only way is really to edit file manually and remove pmem limit line from it.

You may propose a feature at https://cloudlinux.uservoice.com/ . However, saying truth... you, as a hosting provider, should never do custom limits different from one in packages. Use packages to modify it, etc. ;)
  1. 12.01.2016 16:01:31
  2. # 3
Scott Mutter Accepted Answer
Posts: 56
Joined: 23.04.2014
0
Votes
Undo
I\'m really just kind of brainstorming with all of this. Just started working more in-depth with CloudLinux this weekend and trying to get a handle on everything.

I do agree that packages would be best. But I could also see situations where a specific account may need slightly different limits and setting a package for just one account seems a bit wasteful. That being said, I would suspect instances where single accounts deviant outside of defined packages would be very minimal and in those instances it might make better sense to just lvectl delete-user and then set it back with specific limits.

On that topic, what is the order of precedence the /etc/container/ve.cfg file takes? I\'m assuming its:

package limits
user specific limits
defaults

So that if defaults are set at:
Speed: 50%
Memory: 512MB
IO: 1024KB/s


A package one is set to:
Memory: 1024MB
IO: 2048KB/s


And a user user1 set with a specific limit of:
IO: 4096KB/s

Then if user1 is on package one, their limits would be:
Speed: 50%
Memory: 1024MB
IO: 4096KB/s


Would that be correct?
  1. 13.01.2016 10:01:18
  2. # 4
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
\'The precedence of limits is following (higher to lower):
User specific limits
Package limits
Default limits



Your example is correct and limits will be like you said, e.g.:

Speed: 50%
Memory: 1024MB
IO: 4096KB/s

We have considered situation with our developers about resetting to default only some limits, most probably we will implement something like \'lvectl set lve_id --pmem=default\' . However it\'s to early to predict ETA for it.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.