slurmdbd falha ao iniciar (instalação inicial)

2

Eu tentei instalar o slurmdbd para contabilizar em um Ubuntu 16.04 a partir dos repositórios padrão (versão: 15.08.7-1build1 ).

Aqui estão os comandos:

$ sudo apt-get install mysql-server
$ sudo mysql
> create user 'slurm'@'localhost' identified by '123456';
> grant all on *.* TO 'slurm'@'localhost' identified by '123456' with grant option;
> create database slurm_acct_db;
> flush privileges;
> exit
$ sudo apt-get install slurmdbd
$ sudo vi /etc/slurm-llnl/slurmdbd.conf
$ cat /etc/slurm-llnl/slurmdbd.conf
AuthType=auth/munge
AuthInfo=/var/run/munge/munge.socket.2
DbdHost=localhost
DebugLevel=debug5
StorageHost=localhost
StorageLoc=slurm_acct_db
StoragePass=123456
StorageType=accounting_storage/mysql
StorageUser=slurm
LogFile=/var/log/slurm-llnl/slurmdbd.log
PidFile=/var/run/slurm-llnl/slurmdbd.pid
SlurmUser=slurm

No entanto, o início de slurmdbd falha:

$ sudo systemctl start slurmdbd.service
Job for slurmdbd.service failed because the control process exited with error code. See "systemctl status slurmdbd.service" and "journalctl -xe" for details.
$ systemctl status slurmdbd.service
● slurmdbd.service - Slurm DBD accounting daemon
   Loaded: loaded (/lib/systemd/system/slurmdbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Di 2018-02-06 08:42:59 CET; 21s ago
  Process: 5881 ExecStart=/usr/sbin/slurmdbd $SLURMDBD_OPTIONS (code=exited, status=1/FAILURE)

Feb 06 08:42:59 accslurm systemd[1]: Starting Slurm DBD accounting daemon...
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Control process exited, code=exited status=1
Feb 06 08:42:59 accslurm systemd[1]: Failed to start Slurm DBD accounting daemon.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Unit entered failed state.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Failed with result 'exit-code'.
$ journalctl -xe
Feb 06 08:42:59 accslurm systemd[1]: Starting Slurm DBD accounting daemon...
-- Subject: Unit slurmdbd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit slurmdbd.service has begun starting up.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Control process exited, code=exited status=1
Feb 06 08:42:59 accslurm systemd[1]: Failed to start Slurm DBD accounting daemon.
-- Subject: Unit slurmdbd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit slurmdbd.service has failed.
-- 
-- The result is failed.

Tentando fazer isso manualmente com a saída detalhada:

$ sudo -u slurm slurmdbd -Dvvv
slurmdbd: error: mysql_query failed: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ignore table cluster_table modify 'creation_time' int unsigned not null, modify ' at line 1
alter ignore table cluster_table modify 'creation_time' int unsigned not null, modify 'mod_time' int unsigned default 0 not null, modify 'deleted' tinyint default 0, modify 'name' tinytext not null, modify 'control_host' tinytext not null default '', modify 'control_port' int unsigned not null default 0, modify 'last_port' int unsigned not null default 0, modify 'rpc_version' smallint unsigned not null default 0, modify 'classification' smallint unsigned default 0, modify 'dimensions' smallint unsigned default 1, modify 'plugin_id_select' smallint unsigned default 0, modify 'flags' int unsigned default 0, drop primary key, add primary key (name(20));
slurmdbd: Accounting storage MYSQL plugin failed
slurmdbd: error: Couldn't load specified plugin name for accounting_storage/mysql: Plugin init() callback failed
slurmdbd: error: cannot create accounting_storage context for accounting_storage/mysql
slurmdbd: fatal: Unable to initialize accounting_storage/mysql accounting storage plugin

Então parece que há um erro na sintaxe para a criação do banco de dados?

Eu senti falta de algo?

    
por Sethos II 06.02.2018 / 08:47

1 resposta

2

Eu não sei se é para ser resolvido manualmente fazendo o downgrade para a versão antiga do mysql ou alterando o slurmdbd. Mas a causa raiz é que alter ignore table foi removido do mysql 5.7 . Parece que você usa instruções SQL de "sintaxe antiga" com um mecanismo de "nova sintaxe".

    
por 06.02.2018 / 09:09