The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

reseller-limits.yaml overselling

Discussion in 'cPanel Developers' started by acenetryan, Nov 13, 2009.

  1. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    I've written an in-house script to alert our staff each time a Reseller with overselling goes over their package specifications. This script loads the reseller limits using reseller-limits.yaml.

    Within this file, a given reseller has the parameters:

    Code:
    resellerusername:
      limits:
        number_of_accounts:
          accounts: 0
          enabled: 0
        number_of_packages:
          enabled: 0
        preassigned_packages:
          enabled: 0
        resources:
          enabled: 1
          overselling:
            enabled: 1
            type:
              bw: 0
              disk: 0
          type:
            bw: 100000
            disk: 10000
    
    My script specifically checks for any oddities and the example entry above illustrates one of them I came across today. Under what circumstances would a reseller have "enabled:1", but no settings for "bw" or "disk"?

    If a reseller is bound by resources and does not have overselling enabled for "bw" or "disk", what can they possibly oversell (and have "enabled:1")?

    I tried to edit the reseller through the reseller center and toggle the overselling for bw and disk, but enabled remains 1 even with no overselling options ticked.
     
  2. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    This is probably best directed to a cPanel dev. Anyone?

    I see that this was moved to the developer forum, but this is not necessarily a development question. Really, I just need to know the purpose and meaning of the attributes listed in reseller-limits.yaml.

    Perhaps this question is best suited for a ticket.
     
  3. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    After a long ticket (thanks for the support Chris and Lee), I've managed to get an answer to this.

    According to cPanel's support, there is currently no API call for retrieving a Reseller's account limits. So if you're looking to do something like, say, monitor the sum of disk usage and bandwidth of all resellers' clients, you have to cull the YAML file.

    The variable:

    Code:
    overselling:
            enabled: 1
    
    currently does not indicate that a reseller is allowed overselling. If you want to find all resellers that are allowed overselling while reading reseller-limits.yaml, you will need to find all resellers which have either "disk:1" or "bw:1" set under the overselling section.

    Apprently, the "enabled" variable under overselling previously served a different purpose in older cPanel builds.

     
  4. acenetryan

    acenetryan Well-Known Member
    PartnerNOC

    Joined:
    Aug 21, 2005
    Messages:
    197
    Likes Received:
    1
    Trophy Points:
    18
    For anyone wanting to use reseller-limits.yaml, it's also worth noting that cPanel does not remove old resellers from this file. So you'll need to use the API call 'listresellers' to get the list of current resellers and then pull the resource limits from reseller-limits.yaml for the current reseller usernames.
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    We are aware of the issue and need for ensuring the removal of a terminated reseller from "reseller-limits.yaml"; for reference and confirmation, this is being tracked in the following internal case ID: #4810
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Case 4810 has been resolved in version 11.28.73. To see if this, or a later verson, is available for your update tier visit Downloads - cPanel Inc.
     
Loading...

Share This Page