xenconsoled logging to syslog
Hi all,
I found an old thread from this list a long time ago ( May 2012 -
http://xen.1045712.n5.nabble.com/PATCH-tools-xenconsoled-Add-syslog-td5699696.html
) and I can see that it was signed off etc...
I was trying to find out what happened to this thread and why it doesn't seem to be present these days?
Has anyone got any further news other than it was delayed due to the v4.2 feature freeze?
Signature · 6 lines
Steven Haigh Email: [email protected] Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Steven Haigh
Hi all,
I found an old thread from this list a long time ago ( May 2012 -
http://xen.1045712.n5.nabble.com/PATCH-tools-xenconsoled-Add-syslog-td5699696.html
) and I can see that it was signed off etc...
S-o-b != Acked. I asked some questions which were never answered (at least not according to that link).
Jean has since moved on, I think Eric has too.
Quoted 5 lines
I was trying to find out what happened to this thread and why it doesn't seem to be present these days?
Has anyone got any further news other than it was delayed due to the v4.2 feature freeze?
At least on the basis of the thread you found it was never updated based on the feedback and therefore was never acked and never applied. If it was reposted then presumably that new thread would have more information on what happened to it.
But given that it evidently isn't in the tree now and the people involved are no longer around someone else needs to step up, address the issues with it and resubmit it for it to have a chance to go in. Are you interested in doing that?
Ian.
Quoted 23 lines · Ian Campbell
Quoted 5 lines · Steven Haigh
Hi all,
I found an old thread from this list a long time ago ( May 2012 -
http://xen.1045712.n5.nabble.com/PATCH-tools-xenconsoled-Add-syslog-td5699696.html
) and I can see that it was signed off etc...S-o-b != Acked. I asked some questions which were never answered (at least not according to that link).
Jean has since moved on, I think Eric has too.
Quoted 5 lines
I was trying to find out what happened to this thread and why it doesn't seem to be present these days?
Has anyone got any further news other than it was delayed due to the v4.2 feature freeze?
At least on the basis of the thread you found it was never updated based on the feedback and therefore was never acked and never applied. If it was reposted then presumably that new thread would have more information on what happened to it.
Quoted 4 lines
But given that it evidently isn't in the tree now and the people involved are no longer around someone else needs to step up, address the issues with it and resubmit it for it to have a chance to go in. Are you interested in doing that?
I'm not exactly sure if I am well enough versed in C programming to really know what is going on - but I can have a look at it...
I did find a v2 of the patch on the Xen mailing lists:
http://lists.xen.org/archives/html/xen-devel/2012-05/msg01796.html
It doesn't quite apply properly as is to Xen 4.4.0:
$ patch -p1 < ../xenconsoled-syslog.patch patching file tools/console/daemon/io.c Hunk #1 succeeded at 63 (offset 1 line). Hunk #2 succeeded at 87 with fuzz 2 (offset 6 lines). Hunk #3 succeeded at 124 (offset 9 lines). Hunk #4 succeeded at 193 (offset 9 lines). Hunk #5 succeeded at 237 (offset 9 lines). Hunk #6 succeeded at 337 (offset 10 lines). Hunk #7 succeeded at 363 (offset 11 lines). Hunk #8 FAILED at 693. Hunk #9 succeeded at 774 (offset 25 lines). Hunk #10 FAILED at 930. Hunk #11 succeeded at 1047 (offset 65 lines). 2 out of 11 hunks FAILED -- saving rejects to file tools/console/daemon/io.c.rej patching file tools/console/daemon/main.c
Those failures are Hunk 8:
@@ -656,6 +693,7 @@ static struct domain *create_domain(int domid)
dom->remote_port = -1;
dom->interface = NULL;
dom->xce_handle = NULL;+ dom->name = NULL;
if (!watch_domain(dom, true))
goto out;
and Hunk 10:
@@ -888,17 +931,23 @@ static void handle_hv_logs(void)
return;
if (xc_readconsolering(xch, bufptr, &size, 0, 1, &index) == 0 &&size > 0) {
- int logret;
- if (log_time_hv)
- logret = write_with_timestamp(log_hv_fd, buffer,
size,
- &log_time_hv_needts);
- else
- logret = write_all(log_hv_fd, buffer, size);
+ if (log_hv_fd != -1) {
+ int logret;
+ if (log_time_hv)
+ logret = write_with_timestamp(log_hv_fd,
buffer, size,
+&log_time_hv_needts);
+ else
+ logret = write_all(log_hv_fd, buffer, size);
+
+ if (logret < 0)
+ dolog(LOG_ERR, "Failed to write
hypervisor log: "
+ "%d (%s)", errno,
strerror(errno));
+ }
- if (logret < 0)
- dolog(LOG_ERR, "Failed to write hypervisor log: "
- "%d (%s)", errno, strerror(errno));
- }
+ if (use_syslog)
+ write_syslog(NULL, buffer, size);
+
+ }
(void)xc_evtchn_unmask(xce_handle, port);
}
To be perfectly honest, I'm not sure what is going on in Hunk 10 - and Hunk 8 may well just have been rewritten for later versions of Xen.
Sadly, there is no other version information in the patch or documents to give a hint as to what version of Xen this was targetted at - except that it was originally posted around May 2012...
Signature · 6 lines
Steven Haigh Email: [email protected] Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: xenconsoled logging to syslog (HELP REQUESTED)
Just giving this a bump in hope that someone can take up the challenge.
Quoted 111 lines · Steven Haigh
Quoted 23 lines · Ian Campbell
Quoted 5 lines · Steven Haigh
Hi all,
I found an old thread from this list a long time ago ( May 2012 -
http://xen.1045712.n5.nabble.com/PATCH-tools-xenconsoled-Add-syslog-td5699696.html
) and I can see that it was signed off etc...S-o-b != Acked. I asked some questions which were never answered (at least not according to that link).
Jean has since moved on, I think Eric has too.
Quoted 5 lines
I was trying to find out what happened to this thread and why it doesn't seem to be present these days?
Has anyone got any further news other than it was delayed due to the v4.2 feature freeze?
At least on the basis of the thread you found it was never updated based on the feedback and therefore was never acked and never applied. If it was reposted then presumably that new thread would have more information on what happened to it.
Quoted 4 lines
But given that it evidently isn't in the tree now and the people involved are no longer around someone else needs to step up, address the issues with it and resubmit it for it to have a chance to go in. Are you interested in doing that?
I'm not exactly sure if I am well enough versed in C programming to really know what is going on - but I can have a look at it...
I did find a v2 of the patch on the Xen mailing lists:
http://lists.xen.org/archives/html/xen-devel/2012-05/msg01796.htmlIt doesn't quite apply properly as is to Xen 4.4.0:
$ patch -p1 < ../xenconsoled-syslog.patch patching file tools/console/daemon/io.c Hunk #1 succeeded at 63 (offset 1 line). Hunk #2 succeeded at 87 with fuzz 2 (offset 6 lines). Hunk #3 succeeded at 124 (offset 9 lines). Hunk #4 succeeded at 193 (offset 9 lines). Hunk #5 succeeded at 237 (offset 9 lines). Hunk #6 succeeded at 337 (offset 10 lines). Hunk #7 succeeded at 363 (offset 11 lines). Hunk #8 FAILED at 693. Hunk #9 succeeded at 774 (offset 25 lines). Hunk #10 FAILED at 930. Hunk #11 succeeded at 1047 (offset 65 lines). 2 out of 11 hunks FAILED -- saving rejects to file tools/console/daemon/io.c.rej patching file tools/console/daemon/main.cThose failures are Hunk 8:
(quoted diff) +1
-0@@ -656,6 +693,7 @@ static struct domain *create_domain(int domid) dom->remote_port = -1; dom->interface = NULL; dom->xce_handle = NULL; + dom->name = NULL; if (!watch_domain(dom, true)) goto out;and Hunk 10:
(quoted diff) +10
-6@@ -888,17 +931,23 @@ static void handle_hv_logs(void) return; if (xc_readconsolering(xch, bufptr, &size, 0, 1, &index) == 0 && size > 0) { - int logret; - if (log_time_hv) - logret = write_with_timestamp(log_hv_fd, buffer, size, - &log_time_hv_needts); - else - logret = write_all(log_hv_fd, buffer, size); + if (log_hv_fd != -1) { + int logret; + if (log_time_hv) + logret = write_with_timestamp(log_hv_fd, buffer, size, + &log_time_hv_needts); + else + logret = write_all(log_hv_fd, buffer, size); + + if (logret < 0) + dolog(LOG_ERR, "Failed to writehypervisor log: "
+ "%d (%s)", errno,
strerror(errno));(quoted diff) +5
-4+ } - if (logret < 0) - dolog(LOG_ERR, "Failed to write hypervisor log: " - "%d (%s)", errno, strerror(errno)); - } + if (use_syslog) + write_syslog(NULL, buffer, size); + + } (void)xc_evtchn_unmask(xce_handle, port); }To be perfectly honest, I'm not sure what is going on in Hunk 10 - and Hunk 8 may well just have been rewritten for later versions of Xen.
Sadly, there is no other version information in the patch or documents to give a hint as to what version of Xen this was targetted at - except that it was originally posted around May 2012...
Signature · 6 lines
Steven Haigh Email: [email protected] Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel