Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS-4747: make marking parent proxies down in hostdb configurable. #1464

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

jrushford
Copy link
Contributor

For the use case where a parent in parent.config has multiple ip's for failover, TS-4747 added marking the parent down in hostdb so that subsequent requests to the parent would go to another ip/host. For parent proxies listed in parent.config tat are not using multiple ips for failover, it is not desirable to mark the parent proxy down in hostdb as the parent selection system will manage the availability of the parent.

This PR reverts to the original behavior where parent proxies are not marked down in hostdb but adds a configuration option so that need parent proxies marked down in hostdb may enable it.

@jrushford jrushford added this to the 7.1.1 milestone Feb 17, 2017
@jrushford jrushford self-assigned this Feb 17, 2017
@atsci
Copy link

atsci commented Feb 17, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/12/ for details.

@@ -518,6 +518,8 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.http.parent_proxy.connect_attempts_timeout", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.update_hostdb_on_parent_proxy_connect_errors", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a rather long name of a configuration ... :) And it doesn't feel properly "name spaced" ? How about

CONFIG proxy.config.hostdb.mark_parent_down INT 0

or perhaps

CONFIG proxy.config.http.parent_proxy.mark_down_hostdb INT 0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fwiw, I like the first of my two alternative best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it is long, i prefer your second suggestion since it's used in the http transaction to update or not hostdb. All the ones named spaced to proxy.config.hostdb are internal to hostdb and its configuration. But if you prefer #1, I'll use it.

@@ -1255,6 +1257,7 @@ HttpConfig::reconfigure()
params->oride.parent_connect_attempts = m_master.oride.parent_connect_attempts;
params->per_parent_connect_attempts = m_master.per_parent_connect_attempts;
params->parent_connect_timeout = m_master.parent_connect_timeout;
params->parent_failures_update_hostdb = m_master.parent_failures_update_hostdb;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this configuration overridable instead? Or are we positive that this is something we always want completely on, or completely off? In general, new configurations ought to be overridable unless it's impossible to do so (i.e. configs outside of the HttpSM are difficult to make overridable).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a good point. In our case we would never mark a parent down in hostdb so completely off works for us. However making it overidable is a good idea. Let me make changes.

@atsci
Copy link

atsci commented Feb 17, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1579/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1473/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/144/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1580/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/13/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1474/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/145/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1476/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/15/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1582/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/147/ for details.

@jrushford
Copy link
Contributor Author

@zwoop, @bryancall, @PSUdaemon - changes were made, see last two commits. changed the config variable name and made it overridable. Tested with header_rewrite plugin and traffic_ctl

@jrushford
Copy link
Contributor Author

[approve ci]

@atsci
Copy link

atsci commented Feb 17, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/16/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1583/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1477/ for details.

@atsci
Copy link

atsci commented Feb 17, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/148/ for details.

proxy/InkAPI.cc Outdated
@@ -8153,6 +8153,10 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
typ = OVERRIDABLE_TYPE_STRING;
ret = &overridableHttpConfig->client_cert_filepath;
break;
case TS_CONFIG_PARENT_FAILURES_UPDATE_HOSTDB:
typ = OVERRIDABLE_TYPE_INT;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I see this, this type should probably be 'byte'. See some of the earlier examples how to do that (both in the SM structs as well as here). OVERRiDABLE_TYPE_BYTE is also the default, and we should use that (I probably need to take a look at this, to make sure it's done correctly elsewhere as well).

Also, I think the way this was written, the string types were all collected towards the end. Not sure that's important any more, but might be worth keeping that semantics?

@@ -563,6 +564,7 @@ struct OverridableHttpConfigParams {
// hostdb/dns variables //
//////////////////////////
MgmtByte srv_enabled;
MgmtInt parent_failures_update_hostdb;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, similar to above, but i think this should be MgmtByte.

@jrushford
Copy link
Contributor Author

changed type on parent_failures_update_hostdb from MgmtInt to MgmtByte.

@atsci
Copy link

atsci commented Feb 20, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/22/ for details.

@atsci
Copy link

atsci commented Feb 20, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1589/ for details.

@atsci
Copy link

atsci commented Feb 20, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1483/ for details.

@atsci
Copy link

atsci commented Feb 20, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/154/ for details.

@jrushford
Copy link
Contributor Author

@zwoop All changes are in, see the commits.

Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@atsci
Copy link

atsci commented Feb 23, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1605/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/37/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1499/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/38/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1500/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1606/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/169/ for details.

@atsci
Copy link

atsci commented Feb 23, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/170/ for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants