GithubHelp home page GithubHelp logo

red-hat-storage / rlocker Goto Github PK

View Code? Open in Web Editor NEW
9.0 8.0 6.0 15.42 MB

Dockerfile 0.06% Python 8.12% HTML 20.51% CSS 14.04% Less 0.32% JavaScript 51.78% PHP 0.02% Makefile 0.01% CoffeeScript 5.15%

rlocker's People

Contributors

dahorak avatar jimdevops19 avatar jimshapedcoding avatar petr-balogh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rlocker's Issues

Sort resources alphabetically by name

The resources on Lockable Resources page seems to be sorted by ID, would it be possible to sort them by name? It will be easier for searching and mainly similar resources will be together in a group.

Plugin Dev info

As far as I know the rlocker expiry plugin is the only plugin out there right now.

It would be nice to have more docs and info and examples about what is required to create and deploy a plugin. In the future my team might want to create some to offer team specific features or UI.

Resources not freed when making a large number of request

While evaluating rlocker for use by the LNST team, we discovered that sometimes there appear to be issues with a large number of requests.

I developed a script that allowed me to do a large number of simualtanious lock/release operations and found when I did 10,20,50, 70 unlock/release operations on a single resource, the resource was always released and locked as expected. However, when I tried to do 100 operations we found that sometimes one of the signoffs would not get releases.

I did some debugging in order to get to the bottom of this, however I wasn't able to get to anything conclusive.

I some scripts that I will share that does 2 things:

  1. provide a context manager based wrapper around rlockertools around locking/releasing a resource, albit it is still a work in progress when it comes to error handing.
  2. Does the test and collect data able the operations.

You should be able to use these as a base to debug this. At some pojnt I think the context manager based wrapper would be a useful addition to rlockertools once it is more fully fleshed out.

FileNotFoundError during build

I am encountering the following FileNotFoundError when attempting to build the project using python 3.9.

$ python -m build ./
Found existing installation: setuptools 56.0.0
Uninstalling setuptools-56.0.0:
  Successfully uninstalled setuptools-56.0.0
Collecting setuptools>=40.8.0
  Downloading setuptools-57.2.0-py3-none-any.whl (818 kB)
     |████████████████████████████████| 818 kB 1.9 MB/s
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools
Successfully installed setuptools-57.2.0 wheel-0.36.2
WARNING: You are using pip version 21.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-jmk0eefv/bin/python -m pip install --upgrade pip' command.
running egg_info
creating rlockertools.egg-info
writing rlockertools.egg-info/PKG-INFO
writing dependency_links to rlockertools.egg-info/dependency_links.txt
writing entry points to rlockertools.egg-info/entry_points.txt
writing requirements to rlockertools.egg-info/requires.txt
writing top-level names to rlockertools.egg-info/top_level.txt
writing manifest file 'rlockertools.egg-info/SOURCES.txt'
reading manifest file 'rlockertools.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'rlockertools.egg-info/SOURCES.txt'
running sdist
running egg_info
writing rlockertools.egg-info/PKG-INFO
writing dependency_links to rlockertools.egg-info/dependency_links.txt
writing entry points to rlockertools.egg-info/entry_points.txt
writing requirements to rlockertools.egg-info/requires.txt
writing top-level names to rlockertools.egg-info/top_level.txt
reading manifest file 'rlockertools.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'rlockertools.egg-info/SOURCES.txt'
running check
creating rlockertools-0.3.9
creating rlockertools-0.3.9/framework
creating rlockertools-0.3.9/rlockertools
creating rlockertools-0.3.9/rlockertools.egg-info
copying files to rlockertools-0.3.9...
copying LICENSE.txt -> rlockertools-0.3.9
copying README.md -> rlockertools-0.3.9
copying setup.py -> rlockertools-0.3.9
copying framework/__init__.py -> rlockertools-0.3.9/framework
copying framework/main.py -> rlockertools-0.3.9/framework
copying rlockertools/__init__.py -> rlockertools-0.3.9/rlockertools
copying rlockertools/exceptions.py -> rlockertools-0.3.9/rlockertools
copying rlockertools/resourcelocker.py -> rlockertools-0.3.9/rlockertools
copying rlockertools/utils.py -> rlockertools-0.3.9/rlockertools
copying rlockertools.egg-info/PKG-INFO -> rlockertools-0.3.9/rlockertools.egg-info
copying rlockertools.egg-info/SOURCES.txt -> rlockertools-0.3.9/rlockertools.egg-info
copying rlockertools.egg-info/dependency_links.txt -> rlockertools-0.3.9/rlockertools.egg-info
copying rlockertools.egg-info/entry_points.txt -> rlockertools-0.3.9/rlockertools.egg-info
copying rlockertools.egg-info/requires.txt -> rlockertools-0.3.9/rlockertools.egg-info
copying rlockertools.egg-info/top_level.txt -> rlockertools-0.3.9/rlockertools.egg-info
Writing rlockertools-0.3.9/setup.cfg
Creating tar archive
removing 'rlockertools-0.3.9' (and everything under it)
Found existing installation: setuptools 56.0.0
Uninstalling setuptools-56.0.0:
  Successfully uninstalled setuptools-56.0.0
Collecting setuptools>=40.8.0
  Using cached setuptools-57.2.0-py3-none-any.whl (818 kB)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools
Successfully installed setuptools-57.2.0 wheel-0.36.2
WARNING: You are using pip version 21.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-nfm5wd4k/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/Users/clacroix/workspace/rlockertools/venv/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 280, in <module>
    main()
  File "/Users/clacroix/workspace/rlockertools/venv/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/Users/clacroix/workspace/rlockertools/venv/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 114, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-nfm5wd4k/lib/python3.9/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-nfm5wd4k/lib/python3.9/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
    self.run_setup()
  File "/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-nfm5wd4k/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/private/var/folders/cm/qrs4d_9j4dq5j6hj3snm72qm0000gn/T/build-env-nfm5wd4k/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 6, in <module>
    with open("HISTORY.md") as history_file:
FileNotFoundError: [Errno 2] No such file or directory: 'HISTORY.md'

ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel

Problems when doing 100 lock/release operations

While evaluating ResourceLocker for the LNST team. I wrote up a test to do 100 lock operations on the same resource to test the system behavior.

My test code had a wrapper are rlock command that did the lock and release operations in N threads.

We noticed that at some point in the process, one of the signoffs would get "stuck" and have to be released manually, and the process would continue fine.

Tested with 10,20,50, 75 of the same operations and it seemed to work fine.

Its entirely possible the issue is with my multi-threaded test code.

We tried to debug this a bit, but it was a little difficult given each lock/release operation was happening in its own python thread and it was hard to follow output.

We decided that perhaps it would be easier to test debug using a native python API so we are going to work on that and come back to this at a later time.

Requests in queue does not show the number of days

In each queue pending / finished references, the queues are not showing the number of days that are waited.

We do not want to display the number of days for queues that are pending less than 24 hours.

But when we reach 24 hours, for example, 26 hours of waiting now, we cannot display 2 hours.

Besides, it should be 1 day, 2 hours.

Resources in Maintenance mode are showed as Free

After recent change, when Enter Maintenance mode functionality was moved to sub-menu Actions, it is quite hidden the fact, that some resource is in Maintenance mode.
See on the following picture, the three resources in the pink rectangle. The only clue is the wrench and screwdriver icon on the Actions button, which is not too much visible.

2022-09-26_rlocker_resources_in_maintenance

Would it be possible to reflect the Maintenance mode in the Status column? For example like this:

  • FREE
  • LOCKED
  • MAINTENANCE
  • LOCKED - MAINTENANCE

When the resource is both locked and in maintenance mode, I think it make sense to reflect both states, but when it is not locked but in maintenance, I think the correct description is only maintenance.

When queue in retry mode, the time_finished box show the "completed" first time

After adding the mechanism of threading in queues, some queues might try to lock the same resource in the same timestamp.
So some queues are considered as in retry mode

But it still displays in a pending queue page the time that took from initializing until it turned status ALMOST_FINISHED. Therefore we need to continue counting. (Change the logic how the field time_pended_descriptive receive it's value)

No automation for changing the status of the queues

It will be useful to create a management command to manage the status of a group of queues.
The most common scenario is to abort all the pending queues. So we can create a new file inside rqueue/management/abort_pending_queues.py directory, that will just abort the pending queues.

And this way, it could be called within the directory of the project in this way:

python manage.py abort_pending_queues

[RFE] Resources by label statistics page (all/free)

Would it be possible to create new page, where will be list of labels and information about number of all resources with that label and number of actually available resources?
There is a similar section Free Resource By Label on the dashboard page, but it doesn't have the information about all resources with that label.
Also I think, that compact (alphabetically sorted by label) table will be the best format for this.

API Docs

It would be nice to have some basic API docs exposed through the rlocker web interface.

Django-rest client and openapi have tools for this, which should make it easy to do.

Browser search functionality doesn't work correctly on Resource Locker web UI

If I want to search for some particular resource on the Lockable Resources page (Ctrl+F in browser) - for example DC-ECO - it shows, that there are X occurrences of that string on the page and based on the text beside the search field, it jumps over them when I click to next button (hit F3 key), but it didn't actually scroll the page to the particular place. I have to scroll manually and look for the highlighted text...
I tried it both in Firefox and Chrome with the same result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.