-
Notifications
You must be signed in to change notification settings - Fork 852
Short circuit remap reload when non-existent remap file is specified #7768
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
Conversation
proxy/http/remap/RemapConfig.cc
Outdated
| case ENOENT: | ||
| Warning("Can't open remapping configuration file %s - %s", path, strerror(ec.value())); | ||
| break; | ||
| return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had false earlier but, that fails some autest that seems to expect true for a non-existent file.
https://ci.trafficserver.apache.org/job/autest-github/15470/console
file /var/tmp/ausb-7768.15470/thread_config/ts-1_exec-0_accept-1_task-1_aio/log/diags.log : diags.log should not contain errors - Failed Reason: Contents of /var/tmp/ausb-7768.15470/thread_config/ts-1_exec-0_accept-1_task-1_aio/log/diags.log contains expression: "FATAL:" Details: [Apr 30 11:29:45.164] traffic_server FATAL: remap.config failed to load : 34
|
If PR #7777 were committed, the If |
|
Thinking more deeply on this and after a discussion with @sudheerv, I think the approach would be
This would change startup behavior such that a missing "remap.config" would not prevent startup. As we've wanted to move toward fewer required files, I think this is a feature, not a bug. It would be consistent with the more general rule that has been adopted to treat a missing file as if it were an empty file. This would be detected (if the missing file is actually a problem) by 404 responses and the |
+1 . That sounds reasonable, I just left the check in |
Ensures resiliency against config errors erasing remaps previously loaded. Note that failing to load remap.config during startup will no longer fail the TS startup to allow for optionality in remap.config
Ah gotcha! Removed the switch/case as well. |
|
Closing this in favor of #7782 |
This fixes issue #7767
Ensures resiliency against config errors erasing remaps previously loaded.