Skip to main content

Debug Davos: inventory, backup, and restoration of Medulla images

Applies to: Medulla – Imaging
Version: all
Environment: On-Premise
Category: Imaging

Launch Davos, then press CTRL+C.

Two options: local connection or SSH connection.

Local connection

# in the Davos console
sudo su
dpkg-reconfigure keyboard-configuration
systemctl restart keyboard-setup
python3

SSH connection

First, retrieve the workstation’s IP address, then, from the relay server:

ssh user@<IP>

Password: live

sudo su
python3

Register the workstation

from davos import davosManager
from davos.inventory import Inventory

davos = davosManager()
inv = Inventory(davos)
#
# Enter the hostname in the input
# this will send the XML to pulse2-register-pxe

print("mac address: {}".format(inv.macaddress))
print("ip address: {}".format(inv.ipaddress))
print("netmask: {}".format(inv.netmask))
print("disk : {}".format(inv.disk)) 

# The inventory (unmodified) is located in:
less /tmp/inventory.xml
# There must be a missing / between tmp and macaddress, causing the file to be generated in /
/tmp<macaddress.xml

Debug the backup

from davos import davosManager
from davos.image_saver import imageSaver

davos = davosManager()
saver = imageSaver(davos)
saver.start()

Finalize the backup:

saver.imaging_api.imageDone(saver.manager.mac, saver.image_uuid)

Debug the restore

from davos import davosManager
from davos.image_restorer import imageRestorer

davos = davosManager()
img = imageRestorer(davos, "unicast") 

To start a full restore:

img.start()

To run only the post-installations:

img.run_postimaging()

Logs

Davos logs are located in:

/var/log/davos.log
/var/log/davos_restorer.log

The post-installation logs are located in:

/tmp/postinst.xxx.log

Post-installation scripts are located in /imaging_server/masters/<master_uuid>/postinst.d/
The master's UUID is located in the imaging.Image table in the database.