ironic_inspector.common.coordination module

class ironic_inspector.common.coordination.Coordinator(prefix=None)[source]

Bases: object

Tooz coordination wrapper.

get_lock(uuid)[source]

Get lock for node uuid.

get_members()[source]

Get members in the service group.

group_name = b'ironic_inspector.service_group'
join_group()[source]

Join service group.

leave_group()[source]

Leave service group

lock_prefix = 'ironic_inspector.'
run_elect_coordinator()[source]

Trigger a new leader election.

start(heartbeat=True)[source]

Start coordinator.

Parameters:

heartbeat – Whether spawns a new thread to keep heartbeating with the tooz backend. Unless there is periodic task to do heartbeat manually, it should be always set to True.

stop()[source]

Disconnect from coordination backend and stop heartbeat.

ironic_inspector.common.coordination.get_coordinator(prefix=None)[source]