Skip to content

Commit

Permalink
B OpenNebula/one#1159: Fix DISPOSE for DS MAD (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel committed Mar 12, 2021
1 parent ca55952 commit ef90986
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Expand Up @@ -22,7 +22,7 @@ The job of the export is to:

* Calculate the ``MD5``, ``FORMAT``, ``SIZE``
* Generate an ``IMPORT_SOURCE`` so the ``<market_mad>/import`` can do the image => market dump
* Specify ``DISPOSE="YES"`` if the ``IMPORT_SOURCE`` is a temporary file that must be removed after the dump performed by ``<market_mad>/import``. ``DISPOSE="NO"`` if otherwise.
* Specify ``DISPOSE="YES"`` and ``DISPOSE_CMD`` if the ``IMPORT_SOURCE`` is a temporary file that must be removed after the dump performed by ``<market_mad>/import``. ``DISPOSE="NO"`` if otherwise.

**ARGUMENTS**: ``driver_dump_xml image_id``. The ``driver_dump_xml`` is an XML dump of the driver action encoded in Base 64, which contains all the required information: ``image_data`` and ``ds_data``.

Expand Down
Expand Up @@ -151,7 +151,7 @@ Action scripts for generic image datastores:

.. note:: You only need to implement one ``mv`` script, but consider the arguments received when the TM is used for the system datastore, a regular image datastore or both.

- **premigrate**: It is executed before a livemigration operation is issued to the hypervisor. Note that **only the premigrate script from the system datastore will be used**. Any customization must be done for the premigrate script of the system datastore, although you will probably add operations for other backends than that used by the system datastore.
- **premigrate**: It is executed before a livemigration operation is issued to the hypervisor. Note that **only the premigrate script from the system datastore will be used**. Any customization must be done for the premigrate script of the system datastore, although you will probably add operations for other backends than that used by the system datastore.


- Base64 encoded VM XML is sent via stdin.
Expand Down Expand Up @@ -309,7 +309,7 @@ The following combinations are supported by default:
- **CEPH** + **SSH** described in :ref:`Ceph SSH mode <ceph-ssh-mode>`
- **Qcow2/shared** + **SSH** described in :ref:`Qcow2/shared SSH mode <shared-ssh-mode>`

The support in oned is generic, in a *mixed mode* every TM action (such as ``clone`` or ``delete``) is suffixed with the driver name of the system DS in use. For example, an action like ``clone.ssh`` is actually invoked in CEPH + SSH mode. The driver first tries to find the complete action script, including the system DS suffix (e.g. ``ceph/clone.ssh``) and only if that does not exist fallbacks to the default (``ceph/clone``).
The support in oned is generic, in a *mixed mode* every TM action (such as ``clone`` or ``delete``) is suffixed with the driver name of the system DS in use. For example, an action like ``clone.ssh`` is actually invoked in CEPH + SSH mode. The driver first tries to find the complete action script, including the system DS suffix (e.g. ``ceph/clone.ssh``) and only if that does not exist fallbacks to the default (``ceph/clone``).

In this way other combinations can be easily added.

Expand Down Expand Up @@ -570,4 +570,5 @@ Export XML
<SIZE><![CDATA[<size>]]></SIZE>
<FORMAT><![CDATA[<format>]></FORMAT>
<DISPOSE><dispose></DISPOSE>
<DISPOSE_CMD><<![CDATA[<dispose command>]]>/DISPOSE_CMD>
</IMPORT_INFO>
5 changes: 5 additions & 0 deletions source/intro_release_notes/release_notes/compatibility.rst
Expand Up @@ -110,3 +110,8 @@ Sunstone SELinux Requirement
=============================

Now OCA and therefore Sunstone need [zmq gem](https://rubygems.org/gems/zmq), and for that, it is needed to enable the ``httpd_execmem`` SELinux boolean.


Custom Datastore drivers
========================
Custom :ref:`Datastore Driver <sd>` which use ``DISPOSE="YES"`` in the export now needs to add also ``<DISPOSE_CMD></DISPOSE_CMD>`` with the command to remove the temporary file by the :ref:`Market Driver <devel-market>`.
1 change: 1 addition & 0 deletions source/intro_release_notes/release_notes/whats_new.rst
Expand Up @@ -192,3 +192,4 @@ Other Issues Solved
- `CLI interprete backslash escapes <https://github.com/OpenNebula/one/issues/4981>`__.
- `Add instantiate VMs persistent by default <https://github.com/OpenNebula/one/issues/1501>`__.
- `Remove CLI extra columns <https://github.com/OpenNebula/one/issues/4974>`__.
- `Improve interoperability between Datastore and Market drivers <https://github.com/OpenNebula/one/issues/1159>`__.

0 comments on commit ef90986

Please sign in to comment.