XAPI Pool Join: Difference between revisions
From Xen
Jump to navigationJump to search
Lars.kurth (talk | contribs) No edit summary |
Dave.scott (talk | contribs) (Add a note about truth and the source code) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<!-- MoinMoin name: XAPI_Pool_Join --> |
|||
<!-- Comment: --> |
|||
<!-- WikiMedia name: XAPI Pool Join --> |
|||
<!-- Page revision: 00000001 --> |
|||
<!-- Original date: Wed Nov 4 20:21:01 2009 (1257366061000000) --> |
|||
__NOTOC__ |
|||
<!-- ## Please edit system and help pages ONLY in the moinmaster wiki! For more --> |
|||
<!-- ## information, please see [[MoinMaster]]:[[MoinPagesEditorGroup]]. --> |
|||
<!-- ##master-page:[[Category:Template]] --> |
|||
<!-- ##master-date:Unknown-Date --> |
|||
<!-- #format wiki --> |
|||
<!-- #language en --> |
|||
== XAPI Pool Join == |
== XAPI Pool Join == |
||
This page describes the internal mechanism behind the pool join process |
This page partly describes the internal mechanism behind the pool join process. |
||
The ultimate source of truth is in the [[https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_pool.ml source code]]: this page simply gives a flavour of the kind of thing that goes on. |
|||
The term "candidate host" is used to refer to the host which is attempting to join the pool. |
The term "candidate host" is used to refer to the host which is attempting to join the pool. |
||
Line 60: | Line 48: | ||
[[Category:XAPI Devel]] |
[[Category:XAPI Devel]] |
||
[[Category:Design Document]] |
[[Category:Design Document]] |
||
[[Category:Developers]] |
Latest revision as of 21:32, 20 January 2015
XAPI Pool Join
This page partly describes the internal mechanism behind the pool join process. The ultimate source of truth is in the [source code]: this page simply gives a flavour of the kind of thing that goes on.
The term "candidate host" is used to refer to the host which is attempting to join the pool.
Preliminaries
- Check that the candidate host does not have HA enabled.
- Read the non-shared SRs from the local database.
- Log in to the pool's master.
- Check that HA isn't enabled in the pool.
Pre-join assertions
- Check that the candidate host is not attempting to join itself (assert_not_joining_myself).
- Check that there are no other hosts in the local database (assert_i_know_of_no_other_hosts).
- Check that there are no running or suspended VMs on the candidate host (assert_no_running_or_suspended_vms_on_me).
- Check that there are no VMs with current operations (assert_no_vms_with_current_ops).
- Check that hosts are homogeneous in terms of software version and CPU (unless the "force" option is used on the pool join operation) (assert_hosts_homogeneous).
- Check that the candidate host has no shared SRs (assert_no_shared_srs_on_me).
- Check that the management interface is (or contains) a physical NIC (assert_management_interface_is_physical).
- Check that the external authentication type and service name matches the master (assert_external_auth_matches).
Set up
- Obtain the pool's "cluster secret" (Client.Pool.initial_auth).
- Fetch a backup of the master's database (Pool_db_backup.fetch_database_backup).
Synchronise state with the master
This is done in a best-effort fashion; errors are suppressed. As much state as possible is synchronised.
- Get the record for the candidate host (or create one none already exists) (create_or_get_host_on_master).
- Create records for SR and PBD on master (SR.introduce; copy other-config over; PBD.create) (create_sr_and_pbd_on_master).
- Create records for VMs on master (create_vm_on_master).
- Remap VDIs to have SR fields matching the newly created SR records (remap_vdi).
- Create records for VDIs on master (create_vdi_on_master).
- Remap VBDs to have VDI/VM fields matching the newly created VDI records (remap_vbd).
- Create records for VBDs on master (create_vbd_on_master).
- Create physical PIFs (create_pif_and_maybe_network). Re-use the corresponding network if the master has a corresponding PIF. Otherwise create a new network.
- Remap VIFs to have network fields matching the newly created Network records (remap_vif).
- Create records for VIFs on master (create_vif_on_master).
- Set the default crashdump SR and default suspend-image SR on the candidate host's host record.
Finish-up
- Write the cluster secret to the Xapi_globs.pool_secret_path file.
- Set the candidate host's pool role to be a slave (Pool_role.set_role).
- Restart xapi (Xapi_fuse.light_fuse_and_run).