puppet-slurm icon indicating copy to clipboard operation
puppet-slurm copied to clipboard

Issue with Job completion mysql credentials on Rocky 9

Open trenta opened this issue 1 month ago • 0 comments

I see in slurmdbd.pp

    if ($slurm::jobcomptype and $slurm::jobcomptype == 'mysql' and $slurm::jobcomploc and (!empty($slurm::jobcomploc))) {
      mysql::db { $slurm::jobcomploc :
        user     => $storageuser,
        password => $storagepass,
        host     => $dbdhost,
        grant    => ['ALL'],
        before   => File[$slurm::params::dbd_configfile],
      }
    }

So the database for job completion is created with the same credentials as the slurm db.

The user and password are parameters and added to slurmdbd.conf which is fine as it's only on the slurmdbd because the default permissions for this file are 600 and it's only on the slurmdbd host.

Because this module doesn't have parameters for JobCompUser and JobCompPass in slurm.conf the user defaults to root with no password. On Rocky 8 running MariaDB 10.3.x this was fine because by default any user could run mysql -u root and get mysql root access. I know bad security which I hadn't spotted until now. Anyway on Rocky 9 with MariaDB 10.5.x running mysql -u root results in ERROR 1698 (28000): Access denied for user 'root'@'localhost'

I was going to put a pull request in adding the required parameters but that would also be changing the default mode of the slurm.conf file and the db creation in slurmdbd.pp which I'm hesitant to do.

It is very possible I'm just doing something wrong so any help/thoughts would be appreciated.

Cheers

Trent

trenta avatar Jan 24 '25 05:01 trenta