irods / irods

Open Source Data Management Software
https://irods.org
BSD 3-Clause "New" or "Revised" License
447 stars 138 forks source link

Investigate `CAT_SUCCESS_BUT_WITH_NO_INFO` being returned by iCommands when using MariaDB ODBC connector on Almalinux 8 #7323

Open korydraughn opened 1 year ago

korydraughn commented 1 year ago

I've confirmed (through manual testing) that the MariaDB ODBC connector works for Almalinux 8, sort of.

The case I'm describing is:

I confirmed this by doing the following:

  1. Launched an iRODS zone (w/ Almalinux 8 and MySQL 8) using the testing environment.
    • I used the stand_it_up.py script
  2. Stopped the iRODS server.
  3. Ran dnf repoquery --requires irods-database-plugin-mysql to confirm the mariadb-connector-odbc package is listed as a dependency.
  4. Ran find /usr/lib64 -name libmaodbc.so to confirm the shared library for the ODBC connector was installed.
  5. Made a copy of /etc/odbcinst.ini in case I screwed something up.
  6. Replaced the contents of /etc/odbcinst.ini with the following:
    [MariaDB]
    Description = MariaDB driver
    Driver = /usr/lib64/libmaodbc.so
  7. Confirmed the iRODS server wouldn't stand up due to it having references to old ODBC information.
  8. Updated the database stanza in /etc/irods/server_config.json to use MariaDB instead of MySQL ANSI.
  9. Launched the iRODS server.
    • Confirmed the driver was being picked up by looking at the contents of .odbc.ini
    • .odbc.ini in the service account's home directory is overwritten with information from server_config.json every time the iRODS server is started
    • .odbc.ini will always use the driver name defined by server_config.json
  10. Ran echo data | istream write foo and it succeeded.
    • ils and istream read foo printed the correct information to the terminal
  11. Ran iput version.json goo and that succeeded, but resulted in CAT_SUCCESS_BUT_WITH_NO_INFO being printed to the terminal.
    • iget goo - does not report an error
  12. Ran irm foo and that succeeded, but resulted in the same message that iput generated.
    • Running irmtrash and irm -f did not cause the message to appear

So something is different. While the operations appear to work, some operations cause CAT_SUCCESS_BUT_WITH_NO_INFO to be returned. It could be that the .odbc.ini in the service account's home directory needs some MariaDB specific options.

SwooshyCueb commented 9 months ago

This happens on Ubuntu 22.04 as well.

SwooshyCueb commented 9 months ago

Further testing would indicate that this is an issue with the mariadb ODBC driver itself, as using the mysql ODBC driver with a mariadb server works just fine.