-
Notifications
You must be signed in to change notification settings - Fork 847
TS-3960: traffic_line -x doesn't reload SSL certs content #301
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
|
@zwoop @jpeach @SolidWallOfCode mind doing a review for me? |
|
I will review this. Hoping to get to it by the weekend of Oct 17th. There are some style changes to make, but I'm mainly concerned about the integration with the config files mechanics and the |
|
ink_file_lmtime
If you make these ink_file_mtime changes and update Rollback to use This change crashes traffic_manager every time for me, with the following It looks like this is a side-effect of always sending events. listened_var_name is an array literal, so you can always calculate SSLCertificateConfig::need_reconfigure() should not have the There are various problems with SSLCertificateConfig::FileInfo and VarInfo:
We should not need the static data in SSLCertificateConfig. In general, I don't like this approach. The additional config files for SSL It looks like you handle the additional files for a SSL context can A better approach to explore is adding the capability for traffic_server |
|
Thanks @jpeach for the comment. I'll consider about another way to handle this. |
|
@jpeach , the approach you're describing sounds incredibly complex given the problem we're trying to solve. With respect to the following: |
|
I don't think it is that complex. All the machinery for doing this exists, it just needs to be tied together in a sightly different way. My view is that this approach adds complexity in the wrong place (though I definitely agree that the config file management code can be refactored and simplified). One approach would be to make an upcall to Note that both |
|
Ok @jpeach : i'll bite on the proposal to allow server to send a message to manager, perhaps the most general purpose way to do this is to allow server to specify that file F is associated with config C and if F changes it means that C is also considered changed, the set of F associated with a given C will last until the config C is reloading next. I believe this is what you're suggesting. My next question is, how do you think this should be implemented, what message passing mechanism should we use? |
|
The local manager can be used to send a message from I think that you are correct that the temporary watches need to be associated with a top-level config file. When the parent (?) watch triggers, then we can automatically drop all the child watches. |
774e5b2 to
1316949
Compare
|
hey @jpeach , I updated the branch with your opinion. Would you mind taking another look at it? |
|
|
Thanks @jpeach for the helpful comments.
After considering about the pros and cons about applying a tree structure in this issue, I prefer ConfigFileGroup. |
If you have a tree of
Since the message to Although I agree that the tree is more general than strictly necessary, I think that the code for that will turn out to be fairly clean. I am OK with file groups, but please add a back pointer from the file group to the parent |
249dc53 to
e986946
Compare
|
Thanks, I'll review again next week. I don't think I understand what you mean about the marshaling APIs being unsuitable. Here's how you would use it to send a local manager message: |
e986946 to
15a4f50
Compare
15a4f50 to
ea3f28b
Compare
|
@jpeach Thanks for your reply. |
|
@jpeach , after I rewrote the whole patch on your idea, I found it way more clear and concise than before. Thank you for your great suggestions. |
|
@zizhong Great! I don't see the new patch here though? |
|
@jpeach ,Sorry! You can see the lastest version of patch in this pull request. I updated this old request rather than making a new one. |
|
Ok the next thing we need to do is remove the In You don't need In I found the logic of which files trigger the change notification confusing because it is split between In places where you check I tested this and it writes backup copies of certificates: Do we really want this to happen for certificates? What about for private keys?. This is why I suggested sending flags with the management message so that the rollback can turn this off. It looks like this change only tracks certificate files. What about all the other files that contribute to the SSL context? |
…n james suggestions
|
@jpeach you are right. Coping SSL related files can cause secure issues. In my opinion, all the child files should not be copied. what do you think handling it in this way? |
|
This looks pretty good. in a previous comment I suggested sending a flags field with the child rollback registration. Maybe that could be a way to request that the child not be versioned? |
|
@jpeach I reviewed this latest commit and it lgtm. If you're cool w/ this please go ahead and land it, otherwise I'm happy to do it in the next day or so. |
…ned option by a more clear way
|
@jpeach Thanks for the useful comments. I've made a new commit on your suggestions. Would you mind having another look? |
|
@jpeach , I noticed you have changed the some details of the last commit. Thanks for your help. However, there is a bug that you introduced with the changes. |
|
Thanks @zizhong |
9.0.x merge 2020 07 23
traffic_line -x doesn't reload when SSL certs change file contents without changing the file names.