[Django] #32701: Oracle AWD/ATP Wallet Use additional configurations needed for Mac environment

14 views
Skip to first unread message

Django

unread,
Apr 30, 2021, 12:37:37 PM4/30/21
to django-...@googlegroups.com
#32701: Oracle AWD/ATP Wallet Use additional configurations needed for Mac
environment
-------------------------------------+-------------------------------------
Reporter: jordiyeh | Owner: nobody
Type: New | Status: new
feature |
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords: oracle
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When using cx_Oracle to connect to an Oracle AWD or ATP, the user may need
to use a wallet.

Per cx-oracle documentation, https://cx-
oracle.readthedocs.io/en/latest/user_guide/installation.html#id6, we
might need to use init_oracle_client function to pass lib_dir and
config_dir paths.


{{{
import cx_Oracle
cx_Oracle.init_oracle_client(lib_dir="/Users/your_username/Downloads/instantclient_19_8",
config_dir="/Users/your_username/oracle/your_config_dir")
}}}


If I add the Database.init_oracle_client
/django/db/backends/oracle/base.py, it works without issue.


{{{
try:
import cx_Oracle as Database
Database.init_oracle_client(lib_dir="/Users/user/Oracle/instantclient_19_8",
config_dir="/Users/user/Oracle/Wallet_DB")
except ImportError as e:
raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e)
}}}

Removing the init_oracle_client, I get a segmentation fault:


{{{
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Fatal Python error: Segmentation fault

Current thread 0x0000700002442000 (most recent call first):
}}}

Would it be possible to add configuration variables in settings.py for
lib_dir and config_dir?

Or, would it be better to assign lib_dir value from an environmental
variable ORACLE_HOME and config_dir from TNS_ADMIN?

--
Ticket URL: <https://code.djangoproject.com/ticket/32701>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 3, 2021, 7:23:47 AM5/3/21
to django-...@googlegroups.com
#32701: Oracle AWD/ATP Wallet Use additional configurations needed for Mac
environment
-------------------------------------+-------------------------------------
Reporter: Jordi | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: oracle | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

I don't think that additional configuration in needed. `cx_Oracle` has
documented fallbacks if `lib_dir` is not specified, see [https://cx-
oracle.readthedocs.io/en/latest/user_guide/initialization.html#locating-
the-oracle-client-libraries Locating the Oracle Client Libraries]. You can
link them in the `cx_Oracle` installation directory or install an
`instantclient` on the system library search path. Personally, I prefer
using `ldconfig`, e.g.

{{{
$ sudo alien -i oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
$ sudo -- bash -c 'echo "/usr/lib/oracle/19.3/client64/lib/" >
/etc/ld.so.conf.d/oracle.conf'
$ sudo ldconfig
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32701#comment:1>

Django

unread,
Aug 2, 2021, 2:17:03 AM8/2/21
to django-...@googlegroups.com
#32701: Oracle AWD/ATP Wallet Use additional configurations needed for Mac
environment
-------------------------------------+-------------------------------------
Reporter: Jordi | Owner: nobody
Type: New feature | Status: new

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Christopher Jones):

* status: closed => new
* resolution: wontfix =>


Comment:

The workarounds, particularly on macOS are not the nicest. Development
and app portability are a lot easier if init_oracle_client() is called.

--
Ticket URL: <https://code.djangoproject.com/ticket/32701#comment:2>

Django

unread,
Aug 2, 2021, 2:24:45 AM8/2/21
to django-...@googlegroups.com
#32701: Oracle AWD/ATP Wallet Use additional configurations needed for Mac
environment
-------------------------------------+-------------------------------------
Reporter: Jordi | Owner: nobody
Type: New feature | Status: closed

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: wontfix

Keywords: oracle | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

I appreciate you'd like to reopen the ticket, but please
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets follow the triaging guidelines with regards to
wontfix tickets] and take this to DevelopersMailingList.

--
Ticket URL: <https://code.djangoproject.com/ticket/32701#comment:3>

Reply all
Reply to author
Forward
0 new messages