jrushford commented on a change in pull request #7925:
URL: https://github.com/apache/trafficserver/pull/7925#discussion_r689793759
##########
File path: proxy/http/remap/NextHopSelectionStrategy.cc
##########
@@ -108,7 +110,12 @@ NextHopSelectionStrategy::Init(ts::Yaml::Map &n)
} else if (ring_mode_val == exhaust_rings) {
ring_mode = NH_EXHAUST_RING;
} else if (ring_mode_val == peering_rings) {
- ring_mode = NH_PEERING_RING;
+ ring_mode = NH_PEERING_RING;
+ YAML::Node self_node = failover_node["self"];
+ if (self_node) {
Review comment:
@ywkaras Is this correct, `self` is part of the failover node`. I'm not
sure how this works in identifying the self host. Maybe I'm missing something.
In testing, I'm looping when the self host is selected
##########
File path: proxy/http/remap/NextHopSelectionStrategy.cc
##########
@@ -214,8 +221,13 @@ NextHopSelectionStrategy::Init(ts::Yaml::Map &n)
std::shared_ptr<HostRecord> host_rec =
std::make_shared<HostRecord>(hosts_list[hst].as<HostRecord>());
host_rec->group_index = grp;
host_rec->host_index = hst;
- if (mach->is_self(host_rec->hostname)) {
+ if ((self_host == host_rec->hostname) ||
mach->is_self(host_rec->hostname.c_str())) {
+ if (grp != 0) {
+ throw std::invalid_argument("self host (" + self_host + ")
can only appear in first host group");
+ }
h_stat.setHostStatus(host_rec->hostname.c_str(),
TSHostStatus::TS_HOST_STATUS_DOWN, 0, Reason::SELF_DETECT);
Review comment:
@ywkaras the self detection doesn't seem to work now. Host status
no-longer has a SELF_DETECT down for the self_host. I'm using the peering ring
mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]