[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13815997#comment-13815997 ] Igor Galić commented on TS-2259: This also needs to be documented in the reference configuration for logs_xml.config > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang >Assignee: Yunkai Zhang > Fix For: 4.1.0 > > Attachments: > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.V2.patch, > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.patch > > > I have submitted a patch which will introduce failover hosts for collation > host by using '|' delimiter > to extend tags in logs_xml.config. > Let me give an example: > {code} > > {code} > In the example above, host2/host3 are failover hosts for host1. When host1 > disconnected, log entries will be sent to host2, and then if host2 failed > again, > log entries will be sent to host3 until host1 or host2 comes back. > Let's give another more complex example: > {code} > > {code} > In this example, there are two host groups: (host1|host2|host3) and > (host4|host5), > 1) host2/host3 are failover hosts for host1, > 2) host5 is failover host for host4. > All log entries will be both send to these two host groups, but in each > group, log entries will only be sent to the first connected host. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782636#comment-13782636 ] ASF subversion and git services commented on TS-2259: - Commit 54883f2ff62a5b09d238b54ffb4279ea9f45e796 in branch refs/heads/master from [~yunkai] [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=54883f2 ] TS-2259: Introduce failover hosts for logging system This patch introduce failover hosts for collation host by using '|' delimiter to extend tags in logs_xml.config. Let me give an example: In the example above, host2/host3 are failover hosts for host1. When host1 disconnected, log entries will be sent to host2, and then if host2 failed again, log entries will be sent to host3 until host1 or host2 comes back. Signed-off-by: Yunkai Zhang > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang >Assignee: Yunkai Zhang > Fix For: 4.1.0 > > Attachments: > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.patch, > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.V2.patch > > > I have submitted a patch which will introduce failover hosts for collation > host by using '|' delimiter > to extend tags in logs_xml.config. > Let me give an example: > {code} > > {code} > In the example above, host2/host3 are failover hosts for host1. When host1 > disconnected, log entries will be sent to host2, and then if host2 failed > again, > log entries will be sent to host3 until host1 or host2 comes back. > Let's give another more complex example: > {code} > > {code} > In this example, there are two host groups: (host1|host2|host3) and > (host4|host5), > 1) host2/host3 are failover hosts for host1, > 2) host5 is failover host for host4. > All log entries will be both send to these two host groups, but in each > group, log entries will only be sent to the first connected host. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13782638#comment-13782638 ] ASF subversion and git services commented on TS-2259: - Commit 70d7b0141212b5234e0765fb2640eaaf36fd9eaf in branch refs/heads/master from [~yunkai] [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=70d7b01 ] Add CHANGES for TS-2259/TS-2260 Signed-off-by: Yunkai Zhang > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang >Assignee: Yunkai Zhang > Fix For: 4.1.0 > > Attachments: > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.patch, > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.V2.patch > > > I have submitted a patch which will introduce failover hosts for collation > host by using '|' delimiter > to extend tags in logs_xml.config. > Let me give an example: > {code} > > {code} > In the example above, host2/host3 are failover hosts for host1. When host1 > disconnected, log entries will be sent to host2, and then if host2 failed > again, > log entries will be sent to host3 until host1 or host2 comes back. > Let's give another more complex example: > {code} > > {code} > In this example, there are two host groups: (host1|host2|host3) and > (host4|host5), > 1) host2/host3 are failover hosts for host1, > 2) host5 is failover host for host4. > All log entries will be both send to these two host groups, but in each > group, log entries will only be sent to the first connected host. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781967#comment-13781967 ] Yunkai Zhang commented on TS-2259: -- Hi [~jamespeach]: I have developed a patch to implement failover hosts, and I have tested it today:). I didn't introduce "" tag, but extends the tag in my patch which also keeps backward compatibility. Now I will submit my patch to here, I hope you would like it. > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang > Attachments: > 0001-TS-2259-Introduce-failover-hosts-for-logging-system.patch > > -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781941#comment-13781941 ] James Peach commented on TS-2259: - I'm currently working on supporting log collation for the error log, but after that I was planning to work on log host failover. Here's my plan to implement this in a compatible way for 4.x ... Currently, we support logging to multiple log hosts, let's call this a target group. The first step is to add support for a tag. This tag nests inside the CollationHosts tag and turns it from a target group into a failover group. The semantics of a failover group are that ATS will log to the first member, switching to subsequent members when the current target fails. Now we can support failover, but we have broken target groups. We can bring back target group support my allowing multiple CollationHosts tags. Each CollationHosts tag can be defined as a target group or a failover group. The final target group is the union of all the target groups defined by the CollationHosts tag. This is a compatible change for 4.x because none of the semantics are altered until the administrator adds the new tag. > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang > -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781343#comment-13781343 ] Yunkai Zhang commented on TS-2259: -- Hi [~jamespeach], are you working on this feature? If not, I can give a patch for it:) > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang > -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (TS-2259) Introduce failover for logging system
[ https://issues.apache.org/jira/browse/TS-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781335#comment-13781335 ] Yunkai Zhang commented on TS-2259: -- We had discussed this feature in email: ==James Peach== Hi Yunkai, We have been asked to look at ATS log host failover, so I started reading the logging source code. It looks to me that I could easily modify LogHostList::preproc_and_try_delete() to just write to the first available log host. After that, I could add more advanced logic to keep the current host if a failed log host came back to life Do you think that this is a reasonable approach? ==Yunkai Zhang== "just write to the first available log host" seems will break something -- user may want to write the log to multiple log hosts at the same time. Maybe we can add *m_next_failover_host* member into LogHost: class LogHost { ... LogHost *m_next_failover_host; ... }; And then, in LogHostList::preproc_and_try_delete(), make the for-loop looks like: for (LogHost * host = first(); host && nr; host = next(host)) { int ret = host->preproc_and_try_delete(lb); while (ret == FAILOVER) { LogHost *failover_host = host->m_next_failover_host; if (failover_host == NULL) //Fail to failover break; ret = failover_host->preproc_and_try_delete(lb); } nr--; } FYI:) ==Yongming Zhao== I'd like the idea of adding a failover log host option, that will be a good enhancement. +1 > Introduce failover for logging system > - > > Key: TS-2259 > URL: https://issues.apache.org/jira/browse/TS-2259 > Project: Traffic Server > Issue Type: New Feature > Components: Logging >Reporter: Yunkai Zhang > -- This message was sent by Atlassian JIRA (v6.1#6144)