irods / irods_testing_environment

BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

`stand_it_up.py` configures database with incorrect arguments for static image of Almalinux 8 / MySQL 8 #152

Open korydraughn opened 1 year ago

korydraughn commented 1 year ago

Bug Report

I tried to build/run a static image of an Almalinux 8 / MySQL 8 deployment using the stand_it_up.py script.

I got the following. Notice the Database Type and ODBC Driver just below.

-------------------------------------------
Database Type: postgres
ODBC Driver:   
Database Host: 7db0f8d82b73
Database Port: 3306
Database Name: ICAT
Database User: irods
-------------------------------------------

Please confirm [yes]: 
2023-02-16 08:44:54,643 - Warning: Cannot control echo output on the terminal (stdin is not a tty). Input may be echoed.
Error encountered running setup_irods:
Traceback (most recent call last):
  File "/var/lib/irods/scripts/irods/database_connect.py", line 206, in get_database_connection
    conn = pyodbc.connect(connection_string, ansi=True)
pyodbc.InterfaceError: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/irods/scripts/setup_irods.py", line 517, in main
    test_mode=options.test_mode)
  File "/var/lib/irods/scripts/setup_irods.py", line 125, in setup_server
    database_interface.setup_database_config(irods_config)
  File "/var/lib/irods/scripts/irods/database_interface.py", line 176, in setup_database_config
    if database_already_in_use_by_irods(irods_config):
  File "/var/lib/irods/scripts/irods/database_interface.py", line 73, in database_already_in_use_by_irods
    with contextlib.closing(database_connect.get_database_connection(irods_config)) as connection:
  File "/var/lib/irods/scripts/irods/database_connect.py", line 240, in get_database_connection
    sys.exc_info()[2])
  File "/var/lib/irods/scripts/irods/six.py", line 671, in reraise
    raise value.with_traceback(tb)
  File "/var/lib/irods/scripts/irods/database_connect.py", line 206, in get_database_connection
    conn = pyodbc.connect(connection_string, ansi=True)
irods.exceptions.IrodsError: pyodbc encountered an error connecting to the database:
('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')