Announcement

Collapse
No announcement yet.

Reset custom limit to default for LVE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reset custom limit to default for LVE

    Change a limit for an LVE back to server default limits

  • #2
    Is there a way to reset a specific limit for an LVE back to its 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 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 want to completely remove LVE 805s settings, because I want LVE 805 to continue to have 100% speed, and the default speed lim it remains at 60%.

    Comment


    • #3
      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.

      Comment


      • #4
        Im 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? Im 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?

        Comment


        • #5
          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 its to early to predict ETA for it.

          Comment

          Working...
          X