Package: oar-server-mysql
Version: 2.5.4-1
Severity: normal

Dear Maintainer,


We have tried to update our OAR installation on the Luxembourg site of
Grid'5000, from 2.5.3-3~bpo70+1 to 2.5.4-1~bpo70+1, but we have encountered
several problems and finally rolled back to 2.5.3.

In this bug report, I will describe the problems encountered on our production
environment, and I will also give a procedure to import our oar 2.5.2 database
and reproduce under debian jessie, using the vagrant environment provided by
the OAR developpers.
Fyi, I'm reporting this bug using reportbug under this vagrant/debian jessie
set-up.


# Production system (squeeze/wheezy)

The OAR server is installed in a debian squeeze VM. We also use mysql version
5.1.63-0+squeeze1, in a separated debian squeeze VM. The frontend is running
under debian wheezy

My upgrade procedure looks like this:

1. Update the oar packages:

@oar: sudo apt-get remove oar-admin
@frontend,www,oar: sudo apt-get update
@frontend,www,oar: sudo apt-get install $(dpkg -l | grep oar- | awk
'{print $2}')

2. Update the OAR database

@oar: sudo service oar-server stop
@oar: oar-database --check
@oar: oar-database --upgrade
@oar: sudo service oar-server start


The web services (drawgantt, monika) are working correctly and the frontend is
fine. However, I've noticed strange errors in the logs emitted by the
MetaSched component:

* typing errors:

Argument "granduc-12.luxembourg.grid5000.fr" isn't numeric in vec at
/usr/lib/oar/oar_meta_sched line 342.

* SQL errors:

DBD::mysql::db do failed: 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 
'luxembourg.grid5000.fr),(53069,granduc-13.luxembourg.grid5000.fr),(53069,granduc'
 at line 2 at /usr/share/perl5/OAR/IO.pm line 6270.

* Locked tables and duplicated primary keys:

[debug] [2014-11-20 10:24:47.133] [MetaSched] Starting Meta Scheduler
[debug] [2014-11-20 10:24:47.136] [MetaSched] Retrieve information for already 
scheduler reservations from database before flush (keep assign resources)
DBD::mysql::db do failed: Can't execute the given command because you have 
active locked tables or an active transaction at /usr/share/perl5/OAR/IO.pm 
line 6485.
DBD::mysql::db do failed: Can't execute the given command because you have 
active locked tables or an active transaction at /usr/share/perl5/OAR/IO.pm 
line 6486.
DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY' at 
/usr/share/perl5/OAR/IO.pm line 6294.


DBD::mysql::db do failed: Duplicate entry '53069' for key 'PRIMARY' at 
/usr/share/perl5/OAR/IO.pm line 6261.
DBD::mysql::db do failed: 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 
'luxembourg.grid5000.fr),(53069,granduc-19.luxembourg.grid5000.fr),(53069,granduc'
 at line 2 at /usr/share/perl5/OAR/IO.pm line 6270.


[debug] [2014-11-20 10:27:17.210] [MetaSched] Begin processing of jobs to 
launch (start time <= 2014-11-20 10:27:17)
[debug] [2014-11-20 10:27:17.213] [MetaSched] End processing of jobs to launch
DBD::mysql::db do failed: Can't execute the given command because you have 
active locked tables or an active transaction at /usr/share/perl5/OAR/IO.pm 
line 6372.
DBD::mysql::db do failed: Can't execute the given command because you have 
active locked tables or an active transaction at /usr/share/perl5/OAR/IO.pm 
line 6373.
DBD::mysql::db do failed: Duplicate entry '53085' for key 'PRIMARY' at 
/usr/share/perl5/OAR/IO.pm line 6375.
DBD::mysql::db do failed: Duplicate entry '53083-721' for key 'PRIMARY' at 
/usr/share/perl5/OAR/IO.pm line 6380.



Also, after some stress tests, the queue was "stalled" and not rescheduled on
new events (in example, jobs finishing before the end of their walltime).
At this point, I've exported the logs and a dump of the database, and I've
rolled back to 2.5.3.




# Vagrant environment / Debian Jessie


I've tried to reproduce and describe our problems using the vagrant environment
deb_debian8_mysql. Here are the steps to start this testing environment and
import our oar 2.5.3 mysql database


1. bootstrap the testing environment

@local: vagrant up
@local: vagrant ssh server

2. Import and upgrade the OAR database

@server: sudo service oar-server stop
@server: mysql oar < oar2-2014-12-22.sql

@server: oar-database --check
[Failed] OAR database version mismatch. Current version is 2.5.2 while 2.5.4 is 
required.
@server: oar-database --upgrade
WARNING: Please make sure to stop oar-server service before upgrading.
         Please consider backing up the database before upgrading.
Continue? [y/N]: y
The current schema version is 2.5.2. Upgrading to 2.5.4.
Uprgading from '2.5.2' to '2.5.4'...

@server: sudo mv /var/log/oar.log /var/log/oar.log.1
@server: sudo touch /var/log/oar.log
@server: sudo chown oar: /var/log/oar.log
@server: sudo service oar-server start

3. Disable all the nodes, create a new node

for i in $(seq 1 22) ; do oarnodesetting -h granduc-$i.luxembourg.grid5000.fr 
-s Dead ; done
for i in $(seq 1 16) ; do oarnodesetting -h 
petitprince-$i.luxembourg.grid5000.fr -s Dead ; done
echo node-1 > /tmp/newnode
oar_resources_init /tmp/newnode
source /tmp/oar_resources_init.cmd
oarnodesetting -h node-1 -p desktop_computing=NO
oarnodesetting -h node-1 -p maintenance=NO

4. Use it

@local: vagrant ssh frontend
@frontend: oarsub -I -l core=1
[ADMISSION RULE] Set default walltime to 3600.
[ADMISSION RULE] Modify resource description with type constraints
OAR_JOB_ID=57208
Interactive mode : waiting...
Starting...

Connect to OAR job 57208 via the node node-1
[OAR] OAR_JOB_ID=57208
[OAR] Your nodes are:
      node-1*1
[user1@node-1|~](57208-->59mn)$


The web services (drawgantt, monika) are working correctly and the frontend
seems to be working. However, there are still some errors in the logs.


* typing errors:

[debug] [2014-12-22 15:45:33.069] [MetaSched] [57142] job is (0,u:,,)
Argument "node-1" isn't numeric in vec at /usr/lib/oar/oar_meta_sched line 342.
Argument "node-1" isn't numeric in vec at /usr/lib/oar/oar_meta_sched line 357.

* SQL errors:

DBD::mysql::db do failed: 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 'luxembourg.grid5000.fr
),(57155,petitprince-12.luxembourg.grid5000.fr),(57155,pet' at line 2 at 
/usr/share/perl5/OAR/IO.pm line 6270.
DBD::mysql::db do failed: Unknown column 'node' in 'field list' at 
/usr/share/perl5/OAR/IO.pm line 6270.
DBD::mysql::db do failed: Unknown column 'node' in 'field list' at 
/usr/share/perl5/OAR/IO.pm line 6270.
DBD::mysql::db do failed: 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 ')' at line 2 at /usr/share/perl5/OAR/IO.pm line 6270.
DBD::mysql::db do failed: 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 ')' at line 2 at /usr/share/perl5/OAR/IO.pm line 6270.

If needed, I can provide the full logs publicly, and the database in private.

Thanks for your help,

Best regards,

Hyacinthe Cartiaux

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-3-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages oar-server-mysql depends on:
ii  libdbd-mysql-perl  4.028-2+b1
ii  libdbi-perl        1.631-3+b1

Versions of packages oar-server-mysql recommends:
ii  mysql-client-5.5 [mysql-client]  5.5.40-1

Versions of packages oar-server-mysql suggests:
ii  mysql-server  5.5.40-1

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to