PVCS VM License Management

Hi,
We don't yet have a recent version of VM installed, so we're just doing some research in advance of that. We will likely be mostly using command line PVCS commands to access our PVCS repository.  Will it be possible to create a script, for example a Perl script, that executes PVCS a pvcs command (for example, vlogs) using a common, fixed username (i.e. set VCSID to use a specific named license)? Or would it be necessary to run the script setuid to have this effect. I thought I had read about this somewhere, but now I cannot locate the discussion.

Thanks,

Mark 

  • Hello Mark,

    Licenses are checked out based on the Version Manager user ID performing the action. While this defaults to the HOST (= operating system) user ID for CLI operations, you could indeed change it via VCSID if your login source is configured to support it.

    Note that you are required to have one license per end-user, regardless of how those users interact with PVCS VM (directly or trough another application, like a script / portal / web service, etc.)

    Hope this helps. Let me know if you have any follow-up question.

    With kind regards,

    - Richard.

  • Thank Richard! Our concern is that we cannot easily anticipate what the high watermark for license use might be for the concurrent licenses. So I was just exploring options that might help out.

    For example, we have some fairly complex code that would not behave well if  abruptly stopped due to exhausting the licenses. So for protection, we're considering 'wrapping' each PVCS command with logic to try, and if necessary wait for an available concurrent license. This would also offer the opportunity to collect metrics on how often and how long the waiting would be.  At least then we might be able to properly determine the most suitable # of concurrent licenses we need.

    Thanks again,

    Mark

  • Hi Mark,

    If the code you're trying to protect from running out of licenses is part of a build or deployment solution, and these processes run with fixed user IDs, you could consider getting some named licenses specifically for those processes in addition to the concurrent licenses you're planning to get for your end-users. That way the affected processes would always have a named license available to them.

    If these processes get executed for different Version Manager user IDs, so the actions reflect the end-user (say something involving lock, unlock, check-out, or check-in), you could build a license check of the type you are suggesting.

    Let me know if you have any additional questions.

    With kind regards,

    - Richard.

  • If I do build a license check 'wrapper', what would the exit status of CLI commands and PCLI commands (which I'm not yet familiar with) be when all licenses are currently in use (i.e. non available)? Hopefully it is unique relative to other more common exit statuses.

    Thanks,

    Mark

  • Hi Mark,

    If a CLI command (get, put, vcs, vlog, etc.) fails to obtain a license it will return the exit code PVCS_E_LICENSE_ERROR, which is defined as 113.

    Example:

    [rgering@or-rgering-el7 ~]$ vlog //vmfs/One/archives/ls.txt-arc
    PVCS Version Manager (vlog) v8.6.2.0 (Build 241) for Linux/x86_64
    Copyright (C) 1985-2019 Serena Software, Inc., a Micro Focus company. All rights reserved.
    vlog: License server machine is down or not responding. (-96,7:2 "No such file or directory"): VersionManager (RGERING)
    [rgering@or-rgering-el7 ~]$ echo $?
    113
    [rgering@or-rgering-el7 ~]$

    Hope this helps!

    - Richard.

     

  • The PCLI exit codes unfortunately are not as unique. There, license errors get mapped to the somewhat generic -3 "A non-PCLI error", which ends up being 253 on Linux as this does not support negative return values (-3 256).

    - Richard.

  • Example for PCLI:

    [rgering@or-rgering-el7 ~]$ pcli whoami -pr//vmfs/One -idroot
    PVCS Version Manager (PCLI) v8.6.2.0 (Build 241) for Linux/x86_64
    Copyright (C) 1985-2019 Serena Software, Inc., a Micro Focus company. All rights reserved.
    17:07:34 Jun.03.20 [Error]
    Access has been denied due to a licensing problem. Unable to reach License Server @orl-flexlmdev_NO (as defined in ISLV file /home2/richardg/.islvrc). Please contact your PVCS Version Manager administrator for further assistance.

    SLM message: License server machine is down or not responding. (-96,7:2 "No such file or directory"): VersionManager (ROOT)
    [rgering@or-rgering-el7 ~]$ echo $?
    253
    [rgering@or-rgering-el7 ~]$

    Cheers,

    - Richard.