Lines Matching defs:peer

79 			log_error ("ERROR: Failover peer, %s, has no referring"
80 " pools. You must refer to each peer in at"
88 "for failover peer, %s, "
108 /* In case the peer is already running, immediately try
123 log_error ("failover peer %s: %s", state -> name,
156 isc_result_t enter_failover_peer (peer)
157 dhcp_failover_state_t *peer;
162 status = find_failover_peer (&dup, peer -> name, MDL);
165 dhcp_failover_state_reference (&peer -> next,
170 dhcp_failover_state_reference (&failover_states, peer, MDL);
179 isc_result_t find_failover_peer (peer, name, file, line)
180 dhcp_failover_state_t **peer;
191 return dhcp_failover_state_reference (peer, p, file, line);
198 secondary state object that has a connection to its peer, there is
282 log_fatal ("failover peer %s: no local address.",
287 log_error("failover peer %s: 'address' parameter "
340 /* Allow the peer fifteen seconds to send us a
1327 /* If we already have a link to the peer, it must be
1392 /* XXX print message from peer if peer sent message. */
1435 XXX change, we are doing this when the peer state
1543 log_info ("peer %s: disconnected", state -> name);
1560 /* As the peer may not have received or may have
1725 /* Some peer states can require us not to respond, even if our
1732 state -> nrr = " (peer demands: recovering)";
1739 state -> nrr = " (peer demands: resolving conflicts)";
1742 /* Other peer states don't affect our behaviour. */
1807 /* If we're in certain states where we're sending updates, and the peer
1836 /* If we're in shutdown, peer is in partner_down, and we're moving
1859 log_info ("failover peer %s: I move from %s to %s",
1865 log_info("failover peer %s: Both servers normal", state->name);
1880 /* Tell the peer about it. */
2043 * If we have a peer state we must be connected.
2065 /* If we get a peer state change when we're
2083 log_info ("failover peer %s: peer moves from %s to %s",
2090 log_info("failover peer %s: Both servers normal", state->name);
2120 log_error("failover peer %s: Invalid state: %d", state->name,
2127 peer's state transition. */
2177 log_info ("failover peer %s: requesting %s",
2178 state -> name, "full update from peer");
2333 amnesic peer connects, go to the partner_down
2436 the peer's state change, do it now as a result of the fact that
2437 we got a state change from the peer. */
2441 /* For now, just set the service state based on the peer's state
2450 * sense sending a POOLREQ at this stage; the peer is likely about to schedule
2466 * peer).
2506 log_info("peer %s: Got POOLREQ, answering negatively! "
2546 /* Right now we're giving the peer half of the free leases.
2547 If we have more leases than the peer (i.e., more than
2549 of leases the peer has, will be how many more leases we
2550 have than the peer has. So if we send half that number
2551 to the peer, we should be even. */
2572 * up the peer (but more likely the db is inconsistent). But,
2588 reqlog = " (requesting peer rebalance!)";
2602 * peer which it would normally be responsible for (if
2604 * and the load-balance-algorithm chooses the peer to
2605 * answer that address), up to a hold% excess in the peer's
2628 * 1) We're on the first run through and the peer has
2711 dhcp_failover_state_t *peer;
2716 peer = pool->failover_peer;
2718 if(!peer || peer->me.state != normal)
2747 est1 = ((est1 * peer->max_lease_misbalance) + 50) / 100;
2748 est2 = ((est2 * peer->max_lease_misbalance) + 50) / 100;
2753 if(peer->i_am == primary)
2763 if(est1 > peer->max_balance)
2764 est1 = peer->max_balance;
2770 est2 = peer->last_balance + peer->min_balance;
2771 if(peer->last_balance && (est1 < est2))
2778 if(peer->sched_balance) {
2779 if (est1 >= peer->sched_balance)
2785 cancel_timeout(dhcp_failover_pool_rebalance, peer);
2789 peer->sched_balance = est1;
2797 add_timeout(&tv, dhcp_failover_pool_rebalance, peer,
2822 /* Can't update peer if we're not talking to it! */
2837 /* Send the update to the peer. */
2882 failover peer. */
3154 log_info ("failover peer %s: %s", state -> name,
3206 log_info ("failover peer %s: %s", state -> name,
3625 /* Look the failover state up by peer name. */
4384 log_error ("timeout waiting for failover peer %s", state -> name);
4692 * as reserved, toggle to the peer's 'free state', per the
4693 * draft. This gives the peer permission to alloc it to the
4718 * peer did not receive and process the BNDUPD. So at this point, we
4720 * impression the peer has been updated. Normally state changes like
4728 * informed the peer. Since we can't know if the peer received our
5221 * peer's is better. We only assert a problem if the lease is on
5335 * partner server. There is no real way to detect this, a peer may
5421 /* XXX if the transition the peer asked for isn't
5454 * peer is more likely to reallocate this lease
5466 * If we accept a peer's binding update, then we can't rewind a
5467 * lease behind the peer's state.
5482 /* If it is probably wise, assign lease to backup state if the peer
5528 /* The peer is not hoarding leases if we would send them more leases
5613 /* The peer will have made this state change, so set rewind. */
5622 * peer, process a binding update now to send
5814 log_info ("failover peer %s: peer update completed.",
6087 /* If the lease was free, and our peer is primary,
6097 peer to change its state anyway, but log a warning
6127 peer agrees that it's expired. */
6161 peer agrees that it's expired. */
6202 peer agrees that it's expired. */
6227 /* If the lease was in backup, and our peer
6257 in conflict with the peer. */
6339 (a) in the case that the time sent from the peer is earlier than
6342 (b) in the case that the time sent from the peer is later than
6344 later than the time sent from the peer by at least MCLT. */
6348 dhcp_failover_state_t *peer;
6351 (peer = lease->pool->failover_peer)) {
6356 * most conservative guess of the peer's state for this lease.
6374 if (peer -> i_am == primary)
6377 return(peer->service_state == service_partner_down &&
6378 ((lease->tsfp < peer->me.stos) ?
6379 (peer->me.stos + peer->mclt < cur_time) :
6380 (lease->tsfp + peer->mclt < cur_time)));
6386 * peer acknowledges their state change. However, as
6387 * this is impossible if the peer is offline, the
6391 * was last acknowledged by the peer.
6395 * to the peer, it can be returned to free and given
6398 if ((peer->i_am == primary) &&
6401 if ((peer->i_am == secondary) &&
6416 * past the actual tsfp we received from the peer, we
6423 return((peer->service_state == service_partner_down) &&
6432 if (peer->i_am == secondary)
6435 return((peer->service_state == service_partner_down) &&
6436 ((lease->tsfp < peer->me.stos) ?
6437 (peer->me.stos + peer->mclt < cur_time) :
6438 (lease->tsfp + peer->mclt < cur_time)));