Product SiteDocumentation Site

9.3.4. Migrazione delle risorse

Some resources, such as Xen virtual guests, are able to move to another location without loss of state. We call this resource migration; this is different from the normal practice of stopping the resource on the first machine and starting it elsewhere.
Not all resources are able to migrate, see the Migration Checklist below, and those that can, won’t do so in all situations. Conceptually there are two requirements from which the other prerequisites follow:
Il cluster supporta sia la migrazione "da" che quella "verso" richiedendo al resource agent di supportare due nuove azioni:migrate_to (eseguita sulla locazione attuale) e migrate_from (eseguita sulla destinazione).
In push migration, the process on the current location transfers the resource to the new location where is it later activated. In this scenario, most of the work would be done in the migrate_to action and, if anything, the activation would occur during migrate_from.
Al contrario per l'azione "a" l'azione migrate_to è praticamente nulla mentre la maggior parte del lavoro è svoloto durante migrate_from, che estrae lo stato rilevante della risorsa nella vecchia locazione e lo attiva.
Non esiste una via giusta o sbagliata di implementare la migrazione di un servizio, finché questa funziona.

9.3.4.1. Lista di controllo della migrazione

  • La risorsa potrebbe non essere un clone
  • La risorsa deve usare un agent di tipo OCF
  • La risorsa non deve essere in stato failed o degraded.
  • La risorsa non deve, direttamente o indirettamente, dipendere da una primitiva o da un gruppo di risorse.
  • The resource must support two new actions: migrate_to and migrate_from, and advertise them in its metadata.
  • The resource must have the allow-migrate meta-attribute set to true (which is not the default).
Se la risorsa dipende da un clone e, nel momento in cui questa deve essere spostata, il clone ha istanze che stanno partendo o fermandos, allora la risorsa verrà spostata in maniera tradizionale. Il Policy Engine (motore delle politiche di spostamento) non è ancora in grado di modellare questa situazione correttamente e quindi prende la via più sicura (e meno ottimale).