Project

General

Profile

Tâche #33047

Scénario #32868: hapy 2.8.1 : onerst failed (restauration BD)

Traceback onerst

Added by Emmanuel GARETTE about 2 months ago. Updated 13 days ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
06/29/2021
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

00:05:49.347             MONITOR: onerst --config-file /etc/one/onebck.conf --backup-directory /var/tmp/sauvegardes
00:05:49.347             undefined method `restore' for nil:NilClass
00:05:49.347             /usr/bin/onerst:174:in `block in <main>'
00:05:49.347             /usr/bin/onerst:173:in `each'
00:05:49.347             /usr/bin/onerst:173:in `<main>'
00:05:49.347             MONITOR: EOF action:$FIN_OK

Associated revisions

Revision 57ba6855 (diff)
Added by Joël Cuissinat 29 days ago

logparser : ajout error "undefined method"

Ref: #33047

Revision b1511857 (diff)
Added by Emmanuel GARETTE 28 days ago

bin/onerst : ne pas faire de traceback si la VM n'est pas dans la base de donnée (ref #33047)

Revision e04b7fac (diff)
Added by Matthieu Lamalle 24 days ago

chown on resored files ref #33047

History

#1 Updated by Emmanuel GARETTE about 2 months ago

  • Status changed from Nouveau to En cours

#2 Updated by Emmanuel GARETTE about 2 months ago

  • Assigned To set to Emmanuel GARETTE

Dans la base de donnée il n'y a pas d'info sur les pool des VMs :

root@hapy:~# sqlite3 /var/lib/one/one.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> select * from vm_pool;
sqlite> 

Pourtant j'ai bien des données si je sauvegarde/restaure un serveur hapy.

#3 Updated by Emmanuel GARETTE about 2 months ago

  • Status changed from En cours to Résolu

#4 Updated by Gilles Grandgérard about 1 month ago

le fichier one.db de la sauvegarde est un DUMP sql...
la procédure de restauration doit prendre en compte ce fait.

#5 Updated by Emmanuel GARETTE about 1 month ago

  • Status changed from Résolu to En cours

Même si ce cas ne devrait pas arriver, il faudrait avoir une erreur explicite plutôt qu'un traceback.

#6 Updated by Emmanuel GARETTE 28 days ago

  • Status changed from En cours to À valider
  • % Done changed from 0 to 100

#7 Updated by Emmanuel GARETTE 25 days ago

  • Status changed from À valider to En cours

#9 Updated by Gilles Grandgérard 25 days ago

Manque un 'end'...

root@hapy:/mnt/eole-ci-tests/tests/hapy# /usr/bin/onerst 
/usr/bin/onerst:203: syntax error, unexpected end-of-input, expecting `end'
root@hapy:/mnt/eole-ci-tests/tests/hapy# vim /usr/bin/onerst

apres correction :

root@hapy:/mnt/eole-ci-tests/tests/hapy# /usr/bin/onerst 
No such file or directory - /mnt/sauvegardes/one
/usr/lib/ruby/2.7.0/find.rb:43:in `block in find'
/usr/lib/ruby/2.7.0/find.rb:43:in `collect!'
/usr/lib/ruby/2.7.0/find.rb:43:in `find'
/usr/bin/onerst:169:in `<main>'
root@hapy:/mnt/eole-ci-tests/tests/hapy# onerst --config-file /etc/one/onebck.conf --backup-directory /var/tmp/sauvegardes
Restoring vm 0 from /var/tmp/sauvegardes/one/datastores/100/0
ERROR - Source file [/var/tmp/sauvegardes/one/datastores/100/0/disk.0] is a symlink but destination [/var/lib/one/datastores/100/0/disk.0] is not
VM 0 restored
root@hapy:/mnt/eole-ci-tests/tests/hapy#

#10 Updated by Emmanuel GARETTE 24 days ago

Les droits ne sont pas bon :

root@hapy:~# ls -alh /var/lib/one/datastores/100/0/
total 147M
drwxr-xr-x 2 root     root     4,0K sept. 24 15:30 .
drwxr-xr-x 3 oneadmin oneadmin 4,0K sept. 24 15:30 ..
-rw-r--r-- 1 root     root     147M sept. 24 15:30 checkpoint
-rw-r--r-- 1 root     root     1,5K sept. 24 15:30 deployment.0
lrwxrwxrwx 1 root     root       60 sept. 24 15:30 disk.0 -> /var/lib/one/datastores/101/e0816f1ac14d0bb3fccf3e00f94e2454
-rw-r--r-- 1 root     root     364K sept. 24 15:30 disk.1

#11 Updated by Emmanuel GARETTE 24 days ago

  • Status changed from En cours to Résolu

La machine démarre après restauration lors des tests manuels.

#12 Updated by Joël Cuissinat 13 days ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

Tests OK en 2.8.0 et 2.8.1.

Also available in: Atom PDF