Project

General

Profile

Bug #26244

Fix traceback when signing a CSR

Added by Dru Lavigne about 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Nikola Gigic
Category:
GUI (new)
Target version:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Note that the CSR itself had an empty Subject Alternate Names which might be the issue.

Request Method: POST
Request URL: http://10.231.2.23/system/CA/sign_csr/1/
Software Version: FreeNAS-11-MASTER-201710161745 (f450de158)
Exception Type: IntegrityError
Exception Value:

UNIQUE constraint failed: system_certificate.cert_name

Exception Location: ./freenasUI/freeadmin/sqlite3_ha/base.py in locked_retry, line 389
Server time: Tue, 17 Oct 2017 12:26:06 -0700
Traceback
Environment:

Software Version: FreeNAS-11-MASTER-201710161745 (f450de158)
Request Method: POST
Request URL: http://10.231.2.23/system/CA/sign_csr/1/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in execute
412. execute = self.locked_retry(Database.Cursor.execute, query, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in locked_retry
389. rv = method(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
42. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
162. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./freenasUI/system/views.py" in CA_sign_csr
1695. form.save()
File "./freenasUI/system/forms.py" in save
2878. new_csr.save()
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in save
796. force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in save_base
824. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in _save_table
908. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py" in _do_insert
947. using=using, raw=raw)
File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
85. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in _insert
1045. return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
1054. cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/utils.py" in exit
94. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.6/site-packages/django/utils/six.py" in reraise
685. raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in execute
412. execute = self.locked_retry(Database.Cursor.execute, query, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in locked_retry
389. rv = method(self, *args, **kwargs)

Exception Type: IntegrityError at /system/CA/sign_csr/1/
Exception Value: UNIQUE constraint failed: system_certificate.cert_name
Request information
GET

No GET data
POST
Variable Value
all ''
cert_CSRs '2'
cert_name 'blah'
__form_id 'form_CertificateAuthoritySignCSRForm'
FILES

No FILES data
COOKIES
Variable Value
csrftoken 'Q0tyn3IhQupLdEJMp8YWZVSgkMy90z3TUcxaJvJcgAvGpwCjfPVqTsAXasGQjyqx'
fntreeSaveStateCookie 'root'
sessionid 'maeepf1uzaoy9wm9zfezyhkwuf92cdyy'
META
Variable Value

History

#1 Updated by Nikola Gigic about 1 year ago

  • Status changed from Unscreened to Screened

#2 Updated by Nikola Gigic about 1 year ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from Nikola Gigic to William Grzybowski

#3 Updated by William Grzybowski 12 months ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from William Grzybowski to Nikola Gigic
  • Priority changed from No priority to Nice to have
  • Target version changed from 11.1 to 11.1-BETA1

#4 Updated by Dru Lavigne 12 months ago

  • Subject changed from Traceback when signing a CSR to Fix traceback when signing a CSR

#5 Updated by Dru Lavigne 12 months ago

  • Status changed from Reviewed by Developer to Resolved
  • QA Status Test Passes FreeNAS added
  • QA Status deleted (Not Tested)

Verified in 11-MASTER-201710180506.

#6 Updated by Bonnie Follweiler 12 months ago

  • Needs QA changed from Yes to No

Also available in: Atom PDF