Skip to contentSkip to conversation

xl errors if /var/log/xen doesn't exist

DISCUSSION Andrew Cooper 3 participants 3 messages Jan 13, 2014

lore
Share & tools
lore
#0 lore raw

Hello,

As part of running XenRT on a XenServer experimental build on top of Xen-4.4.0-rc1, I encountered the following error which is far from helpful:

$ xl create /root/minios.cfg
xl: fatal error: xl_cmdimpl.c:457: No such file or directory: logfile =
open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)
Parsing config from /root/minios.cfg
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus:
daemonizing child [32476] exited with error status 3
Parsing config from /root/minios.cfg

The root cause of the issue is that the directly /var/log/xen didn't exist (because I messed up the packaging).

Because of the CHK_SYSCALL() macro which prints a string-ized version of its argument, the error message omits the key detail (i.e. which file doesn't exist). Furthermore, the string 'fullname' is a complete path which has been returned from "libxl_create_logfile()" without error.

If the failure to create a logfile is a fatal error (which itself is probably not correct - what about a RO dom0 which strictly logs to rsyslog?), then either xl or libxl should assume the responsibility of ensuring that its logging directory actually exists, and "libxl_create_logfile()" seems like a prime candidate to assume this responsibility.

~Andrew

#1 lore raw

create ^
thanks

Thanks for the report, I've created a bug for tracking purposes.

Quoted 13 lines · Andrew Cooper

Hello,

As part of running XenRT on a XenServer experimental build on top of Xen-4.4.0-rc1, I encountered the following error which is far from helpful:

$ xl create /root/minios.cfg
xl: fatal error: xl_cmdimpl.c:457: No such file or directory: logfile =
open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)
Parsing config from /root/minios.cfg
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus:
daemonizing child [32476] exited with error status 3
Parsing config from /root/minios.cfg
Quoted 2 lines

The root cause of the issue is that the directly /var/log/xen didn't exist

Right, I do think we ought to cope with this a bit more gracefully.

Quoted 5 lines

(because I messed up the packaging).

Because of the CHK_SYSCALL() macro which prints a string-ized version of its argument, the error message omits the key detail (i.e. which file doesn't exist).

Oops!

Quoted 6 lines

Furthermore, the string 'fullname' is a complete path which has been returned from "libxl_create_logfile()" without error.

If the failure to create a logfile is a fatal error (which itself is probably not correct - what about a RO dom0 which strictly logs to rsyslog?),

Even a R/O dom0 would need a writeable /var I think -- otherwise xl's behaviour is the least of your worries. A tmpfs for example.

In any case presumably that use case would warrant making further changes in order to have the option to direct these logs to syslog too.

Quoted 4 lines

then either xl or libxl should assume the responsibility of
ensuring that its logging directory actually exists, and "libxl_create_logfile()" seems like a prime candidate to assume this responsibility.

It sounds like it, yes.

Ian.

#2 lore raw

Processed: Re: xl errors if /var/log/xen doesn't exist

Processing commands for [email protected]:

Quoted 1 line

create ^

Created new bug #33 rooted at `<[email protected]>'
Title: `Re: xl errors if /var/log/xen doesn't exist'

Quoted 1 line

thanks

Finished processing.

Modified/created Bugs:
- 33: http://bugs.xenproject.org/xen/bug/33 (new)

---
Xen Hypervisor Bug Tracker
See http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen for information on reporting bugs Contact [email protected] with any infrastructure issues