NVIDIA / deepops

Tools for building GPU clusters
BSD 3-Clause "New" or "Revised" License
1.25k stars 326 forks source link

The PyMySQL or MySQL-python module is required #1224

Closed zstreeter closed 2 years ago

zstreeter commented 2 years ago

Just trying to run the slurm.yml playbook and this error occurs in ./roles/slurm/tasks/controller.yml for the mysql_user database module

TASK [slurm : setup slurm db user] ************************************************************ fatal: [my_node]: FAILED! => changed=false msg: The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) module is required.

Judging from what is skipped and installed, deepops has detected this ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" and I confirmed this.

I tried adding PyMySQL and MySQL-python to the TASK [slurm : install dependencies] in ./roles/slurm/tasks/controller.yml for the ansible_os_family above but it complained that those are not correct modules for my OS version (given the packages already there, this makes sense).

From what I have gathered searching the web, this could be from not using the same python binary that was used in installing the MySQL packages. Though, I figured this would have been covered by running everything in a python virtual environment.

This was reported before... See https://github.com/NVIDIA/deepops/issues/601#issuecomment-670210339 This comment says not running the users.yml playbook before works but I'm seeing this error by just running the slurm.yml playbook only.

UPDATE: Looks like I needed a newer version of python :)

emanuelevivoli commented 9 months ago

I'm having the same problem with python 3.11.5