Skip to content

Adding back set_connect_fail for generic I/O error#9181

Merged
serrislew merged 5 commits intoapache:masterfrom
serrislew:set_generic_connect_fail
Nov 15, 2022
Merged

Adding back set_connect_fail for generic I/O error#9181
serrislew merged 5 commits intoapache:masterfrom
serrislew:set_generic_connect_fail

Conversation

@serrislew
Copy link
Contributor

Without setting the generic I/O error, the server doesn't know it has failed and t_state.current.server->had_connect_fail() in HttpSM::track_connect_fail() always returns false. As a result, when the server has exhausted its attempts, it fails to reach mark_host_failure and does not update that HostDBInfo entry's last_failure timeout field

I am not sure why it was deleted before and do not see its replacement where the server's connect_result field is updated

@masaori335 masaori335 added this to the 10.0.0 milestone Nov 7, 2022
@masaori335 masaori335 added the HTTP label Nov 7, 2022
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. A few quick questions:

  • Can we add an autest for this?
  • You mention in the description that this was removed in a previous patch. Which PR took this out? I didn't find it when scanning patches to this file, so I'm probably not looking in the right place.
  • Just checking: I notice this is marked for 9.2.x. Was the issue you're fixing introduced with the hostdb restructure in #8953? If so, that restructure only went into master/10-Dev.

@serrislew
Copy link
Contributor Author

Yes, I will definitely add an autest. The PR is #7580. I spoke to Susan about this and it was initially deleted since NET_EVENT_OPEN should have preemptively set the server connect failure code (EIO) but the failed case I've been testing doesn't reach this event. Instead of setting the EIO as I have it now (since it could possibly override other more specific failures), I will set it before NET_EVENT_OPEN so it applies to all cases.

@serrislew
Copy link
Contributor Author

[approve ci]

@serrislew serrislew force-pushed the set_generic_connect_fail branch from 4b3c398 to befad54 Compare November 10, 2022 21:14
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for adding the test. I just have a few minor comments.

Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

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

Looks great.

@serrislew serrislew merged commit ea01774 into apache:master Nov 15, 2022
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Nov 15, 2022
* Adding back set connect fail for generic I/O error

* Set generic error earlier & added autest

* Format issues

* Lower timeout limit

* Improved autest with comments and additional checks

Co-authored-by: Serris Lew <lserris@apple.com>
zwoop pushed a commit that referenced this pull request Nov 17, 2022
* Adding back set connect fail for generic I/O error

* Set generic error earlier & added autest

* Format issues

* Lower timeout limit

* Improved autest with comments and additional checks

Co-authored-by: Serris Lew <lserris@apple.com>
(cherry picked from commit ea01774)
@zwoop
Copy link
Contributor

zwoop commented Nov 17, 2022

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Nov 17, 2022
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* Adding back set connect fail for generic I/O error

* Set generic error earlier & added autest

* Format issues

* Lower timeout limit

* Improved autest with comments and additional checks

Co-authored-by: Serris Lew <lserris@apple.com>
(cherry picked from commit ea01774)
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Revert "Make separate read and write vc_handlers (apache#8301)"
  AuTest: Update to Proxy Verifier 2.5.2 (apache#9223)
  AuTest: Update to Proxy Verifier v2.5.0 (apache#9221)
  Updated ChangeLog
  Adding back set_connect_fail for generic I/O error (apache#9181)
  AuTest: make MakeATSProcess accessible for TestRuns (apache#9195)
  Traffic Dump: Allow unlimited disk utilization (apache#9186)
  AuTest: bind stdout/stderr to traffic.out (apache#8919)
  Adds support for serving statichit content out of a directory (apache#9107)
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.

4 participants