[PR #388] [MERGED] Persistent Libvirt Connections #643

Closed
opened 2026-02-27 16:39:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/retspen/webvirtmgr/pull/388
Author: @Phist0ne
Created: 8/22/2014
Status: Merged
Merged: 8/27/2014
Merged by: @retspen

Base: masterHead: connection-pooling-pr


📝 Commits (4)

  • 4a01c78 Implemented connection pooling in vrtManager/connection.py:
  • 0948c01 add new settings and explanation to settings.py and local_settings.py.example
  • c8f0293 remove socket host active check as it leads to weird messages in auth.log (at least for ssh connections). Connection error messages should be enough to determine what went wrong.
  • 9aaca9e fix pep8

📊 Changes

5 files changed (+571 additions, -89 deletions)

View changed files

📝 servers/views.py (+8 -44)
📝 vrtManager/connection.py (+297 -45)
vrtManager/rwlock.py (+226 -0)
📝 webvirtmgr/local/local_settings.py.example (+20 -0)
📝 webvirtmgr/settings.py (+20 -0)

📄 Description

Implements connection pooling. Only one connection per vm-host per webserver-process is created and managed by a new class "wvmConnectionManager".
Outside of the vrtManager.connection module the old behaviour is preserved.
This is tested with apache2 using mod_wsgi and the Django development server. Nginx was not tested.
The branch https://github.com/myvision-de/webvirtmgr/tree/connection-pooling-debug may be useful when testing this PR with another server.

Commit c8f0293 is optional. It prohibits some further log spamming in auth.log. It may be more practical to evaluate the error code from libvirt to determine if authentication fails or the server is just down.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/retspen/webvirtmgr/pull/388 **Author:** [@Phist0ne](https://github.com/Phist0ne) **Created:** 8/22/2014 **Status:** ✅ Merged **Merged:** 8/27/2014 **Merged by:** [@retspen](https://github.com/retspen) **Base:** `master` ← **Head:** `connection-pooling-pr` --- ### 📝 Commits (4) - [`4a01c78`](https://github.com/retspen/webvirtmgr/commit/4a01c78af46ca498694abe30931f0582f83c04d6) Implemented connection pooling in vrtManager/connection.py: - [`0948c01`](https://github.com/retspen/webvirtmgr/commit/0948c012bfa23535a713beaf8302994cd33bebfb) add new settings and explanation to settings.py and local_settings.py.example - [`c8f0293`](https://github.com/retspen/webvirtmgr/commit/c8f0293e22ab5f7a367579404ddd86f20c47a697) remove socket host active check as it leads to weird messages in auth.log (at least for ssh connections). Connection error messages should be enough to determine what went wrong. - [`9aaca9e`](https://github.com/retspen/webvirtmgr/commit/9aaca9ea2893222f7403e0587cfcd0deb8cdd8b5) fix pep8 ### 📊 Changes **5 files changed** (+571 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `servers/views.py` (+8 -44) 📝 `vrtManager/connection.py` (+297 -45) ➕ `vrtManager/rwlock.py` (+226 -0) 📝 `webvirtmgr/local/local_settings.py.example` (+20 -0) 📝 `webvirtmgr/settings.py` (+20 -0) </details> ### 📄 Description Implements connection pooling. Only one connection per vm-host per webserver-process is created and managed by a new class "wvmConnectionManager". Outside of the vrtManager.connection module the old behaviour is preserved. This is tested with apache2 using mod_wsgi and the Django development server. Nginx was not tested. The branch https://github.com/myvision-de/webvirtmgr/tree/connection-pooling-debug may be useful when testing this PR with another server. Commit c8f0293 is optional. It prohibits some further log spamming in auth.log. It may be more practical to evaluate the error code from libvirt to determine if authentication fails or the server is just down. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 16:39:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#643
No description provided.