# Bug in oracle.py?

**URL:** <https://forum.pritunl.com/t/bug-in-oracle-py/3560>\
**Category:** Pritunl VPN\
**Tags:** pritunl\
**Created:** [October 1, 2025, 10:49am UTC](https://forum.pritunl.com/t/bug-in-oracle-py/3560 "2025-10-01T10:49:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ituser](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/i/ba8739/32.png) [@ituser](https://forum.pritunl.com/u/ituser)\
**Post date:** [October 1, 2025, 10:49am UTC](https://forum.pritunl.com/t/bug-in-oracle-py/3560/1 "2025-10-01T10:49:18Z")

</div>

Hi,

We’ve been trying since quite some time to make the Oracle Advertisement Route work to no avail, we always ended in 401 unauthorized

We tried to debug the code and could reproduce the issue in a custom Python script, the problem seems in line 40

```auto
    'tenancy_ocid': metadata['instance']['compartmentId'],

```

Using this code fails, but '`tenancy_ocid': metadata['instance']['tenantId'] `works

Could this be quickly corrected ?

Thanks

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [October 1, 2025, 4:31pm UTC](https://forum.pritunl.com/t/bug-in-oracle-py/3560/2 "2025-10-01T16:31:53Z")

</div>

This was likely copied incorrectly, in most cases the compartment ocid is the same as the tenancy ocid unless the server is placed in a compartment. I have updated the code to use the `tenantId`, this will be included in the next release. The file can be edited at `/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/utils/oracle.py` then run `sudo systemctl restart pritunl` to patch an existing server.
