Add compute , then Instances return 500 error. (OperationalError at /instances/,no such column: instances_instance.drbd )
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at instances/views.py line 47 and reproduce GET /instances/ with the reported SQLite error. Inspect the Instance model and its database migration history to determine why the drbd column is missing; done means the Instances page and user creation no longer fail with OperationalError.
Written by the indexing model from the issue text.
Description
Create the website as normal,the login is successful。
When I create a compute node through ssh, I switch to Instances and report a 500 error.
I use Kylin V10 system (same as openeuler 20.03TLS) as computing node.
Compiled against the library: libvirt 6.2.0
Libraries used: libvirt 6.2.0
API used: QEMU 6.2.0
Run the hypervisor: QEMU 4.1.0
but I don't think it's the client compute node's problem. I try to create a user, but also an error is reported. After logging in again, the user information already exists,and use the user login, change to Instances, also error(no such column: instances_instance.drbd).
I use kenlee/webvirtcloud-docker create website can add compute and change to Instance successfully.
OperationalError at /instances/
no such column: instances_instance.drbd
Request Method: GET
Request URL: http://172.30.241.100:80/instances/
Django Version: 3.2.14
Exception Type: OperationalError
Exception Value:
no such column: instances_instance.drbd
Exception Location: /srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py, line 423, in execute
Python Executable: /srv/webvirtcloud/venv/bin/python3
Python Version: 3.6.8
Python Path:
['/srv/webvirtcloud',
'/srv/webvirtcloud/venv/bin',
'/srv/webvirtcloud/venv/lib64/python36.zip',
'/srv/webvirtcloud/venv/lib64/python3.6',
'/srv/webvirtcloud/venv/lib64/python3.6/lib-dynload',
'/usr/lib64/python3.6',
'/usr/lib/python3.6',
'/srv/webvirtcloud/venv/lib/python3.6/site-packages']
Server time: Tue, 23 Aug 2022 03:59:59 -0400
Environment:
Request Method: GET
Request URL: http://172.30.241.100:80/instances/
Django Version: 3.2.14
Python Version: 3.6.8
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_bootstrap5',
'django_icons',
'django_otp',
'django_otp.plugins.otp_totp',
'accounts',
'admin',
'appsettings',
'computes',
'console',
'datasource',
'networks',
'instances',
'interfaces',
'nwfilters',
'storages',
'virtsecrets',
'logs',
'qr_code']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_otp.middleware.OTPMiddleware',
'login_required.middleware.LoginRequiredMiddleware',
'django.contrib.auth.middleware.RemoteUserMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'appsettings.middleware.AppSettingsMiddleware',
'webvirtcloud.middleware.ExceptionMiddleware']
Traceback (most recent call last):
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
The above exception (no such column: instances_instance.drbd) was the direct cause of the following exception:
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/webvirtcloud/instances/views.py", line 47, in index
for compute in computes:
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 280, in iter
self._fetch_all()
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 1326, in _fetch_all
self._prefetch_related_objects()
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 813, in _prefetch_related_objects
prefetch_related_objects(self._result_cache, *self._prefetch_related_lookups)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 1734, in prefetch_related_objects
level,
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 1855, in prefetch_one_level
prefetcher.get_prefetch_queryset(instances, lookup.get_current_queryset(level)))
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 637, in get_prefetch_queryset
for rel_obj in queryset:
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 280, in iter
self._fetch_all()
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/query.py", line 51, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/srv/webvirtcloud/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
Exception Type: OperationalError at /instances/
Exception Value: no such column: instances_instance.drbd
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 398
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from retspen/webvirtcloud
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
retspen/webvirtcloud#393 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
retspen/webvirtcloud#683 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
retspen/webvirtcloud#682 ·
-
安装完成后打开控制头灰屏 Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
retspen/webvirtcloud#678 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
retspen/webvirtcloud#674 · 1 reaction ·
All issues in retspen/webvirtcloud
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·