PenningLabs / lxconsole

LXD Graphical Web Console
GNU Affero General Public License v3.0
123 stars 15 forks source link

incus support #9

Open djemilbakhti opened 11 months ago

djemilbakhti commented 11 months ago

10.241.84.1 - - [14/Oct/2023 12:09:26] "GET /containers?id=1&project=test HTTP/1.1" 302 - 10.241.84.1 - - [14/Oct/2023 12:09:26] "GET /login?next=/containers?id%3D1%26project%3Dtest HTTP/1.1" 200 - 10.241.84.1 - - [14/Oct/2023 12:09:26] "GET /static/css/fonts/source_sans_pro.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/fontawesome-free/css/all.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-responsive/css/responsive.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-buttons/css/buttons.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/css/styles.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/dist/css/adminlte.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/jquery/jquery.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/assets/img/logo-light.svg HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables/jquery.dataTables.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-responsive/js/responsive.bootstrap4.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/jquery-knob/jquery.knob.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/dist/js/adminlte.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-responsive/js/dataTables.responsive.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/js/sidebar.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:27] "GET /static/assets/img/logo-bg.svg HTTP/1.1" 304 - [UserGroup('1', '1')] UserGroup('1', '1') 1 [AccessControl('Default access control for Administrators', 'global', '0, '1, '1')] AccessControl('Default access control for Administrators', 'global', '0, '1, '1') global 1 1 Administrator 2 1 3 1 4 1 10.241.84.1 - - [14/Oct/2023 12:09:40] "POST /login?next=/containers?id%3D1%26project%3Dtest HTTP/1.1" 302 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /containers?id=1&project=test HTTP/1.1" 200 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/css/fonts/source_sans_pro.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/fontawesome-free/css/all.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-responsive/css/responsive.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-buttons/css/buttons.bootstrap4.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/css/xterm/xterm.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/dist/css/adminlte.min.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/css/styles.css HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/assets/img/logo-dark.svg HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables/jquery.dataTables.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/js/jquery/jquery-3.7.1.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/bootstrap/js/bootstrap.bundle.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-responsive/js/dataTables.responsive.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/datatables-responsive/js/responsive.bootstrap4.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/jquery-knob/jquery.knob.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/dist/js/adminlte.min.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/js/sidebar.js HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/fontawesome-free/webfonts/fa-solid-900.woff2 HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:41] "GET /static/plugins/fontawesome-free/webfonts/fa-brands-400.woff2 HTTP/1.1" 304 - 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/servers/list_servers?id=1 HTTP/1.1" 200 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/projects/list_projects?id=1&project=test HTTP/1.1" 200 - 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/profiles/list_profiles?id=1&project=test HTTP/1.1" 200 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/cluster-members/list_cluster_members?id=1&project=test HTTP/1.1" 200 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/images/list_images?id=1&project=test&recursion=1 HTTP/1.1" 200 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/cluster-groups/list_cluster_groups?id=1&project=test HTTP/1.1" 200 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( [2023-10-14 12:09:42,579] ERROR in app: Exception on /api/containers/list_instances [GET] Traceback (most recent call last): File "/home/a1/lxconsole/envname/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a1/lxconsole/envname/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a1/lxconsole/envname/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a1/lxconsole/envname/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a1/lxconsole/envname/lib/python3.11/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/a1/lxconsole/lxconsole/api/containers.py", line 166, in api_containers_endpoint for instance in instances['metadata']: TypeError: 'NoneType' object is not iterable 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/containers/listinstances?id=1&project=test&recursion=2&=1697285381647 HTTP/1.1" 500 - /home/a1/lxconsole/envname/lib/python3.11/site-packages/urllib3/connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.241.84.156'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings warnings.warn( 10.241.84.1 - - [14/Oct/2023 12:09:42] "GET /api/operations/list_operations?id=1&project=test&recursion=1 HTTP/1.1" 200 - Screenshot_20231014_130721

matthewalanpenning commented 11 months ago

Thanks for the info. So the error is a result of them removing support for both the /1.0/containers and /1.0/virtual-machines rest API endpoints. I will have to adjust this to now point to the /1.0/instances endpoint. Incus 0.1 release notes can be found here: https://discuss.linuxcontainers.org/t/incus-0-1-has-been-released/18036