Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vyos_net_name: T6544: Updated the vyos_net_name script (backport from current) #3806

Closed
wants to merge 2 commits into from

Commits on Aug 1, 2024

  1. locking: T6544: Added locking util

    Sometimes we need a reliable way to lock an execution until some other operation
    is not done.
    
    This commit introduces locking util, which can be used as a common lock, even
    between different processes.
    
    Usage example:
    
    ```
    from vyos.utils.locking import Lock
    
    lock = Lock('my_lock_id')
    lock.acquire(timeout=10)
    
    print(f'Lock acquired: {lock.is_locked}')
    
    lock.release()
    ```
    zdc committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    78ef4c5 View commit details
    Browse the repository at this point in the history
  2. vyos_net_name: T6544: Updated the vyos_net_name script

    Improvements in the `vyos_net_name`:
    
    - Used a new locking system, to be sure that multiple running scripts will not
    try to perform operations at the same time.
    - Replace logging from a file to syslog. This is common with all the rest logs,
    and additionally gives a better view of actions done during a boot.
    - Small bug fix in `get_configfile_interfaces()`: exit with an error in case a
    config file cannot be parsed. This resolves potentially an unbound `config` object.
    - Minor formatting fixes to follow our requirements.
    zdc committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    b54fbe3 View commit details
    Browse the repository at this point in the history