When trying to map a persistent disk for a virtual machine when using the lvm/iscsi backend, the command fails with the error:
Internal Server Error (500) - An error occurred while executing command: /usr/sbin/persistent-disk-backend.py --config /etc/stratuslab/pdisk-backend.cfg --action map ad0b7c02-2c50-4b5f-b900-3bbb3994f9f7.
Traceback (most recent call last):
File "/usr/sbin/persistent-disk-backend.py", line 139, in <module>
status = lun.map()
File "/var/lib/stratuslab/python/stratuslab/pdiskbackend/LUN.py", line 62, in map
status, _ = self._execute_action('map')
File "/var/lib/stratuslab/python/stratuslab/pdiskbackend/LUN.py", line 134, in _execute_action
if status == 0 and action in self.additional_opt_info:
UnboundLocalError: local variable 'status' referenced before assignment
This is because the 'status' variable is not set when the backend command is a no-op (i.e. an empty list).
When trying to map a persistent disk for a virtual machine when using the lvm/iscsi backend, the command fails with the error:
This is because the 'status' variable is not set when the backend command is a no-op (i.e. an empty list).