Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Stanacar, StefanX" <stefanx.stanacar@intel.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] qemu: add recommend of kernel-modules for all qemu machines
Date: Thu, 5 Sep 2013 13:09:02 +0000	[thread overview]
Message-ID: <1378386554.27411.14.camel@firebird.rb.intel.com> (raw)
In-Reply-To: <CAJTo0LaPJjQqR80ZpowVBfjhYFLwqUvFF0wQm+S1VfKWeEDqdg@mail.gmail.com>



On Thu, 2013-09-05 at 11:45 +0100, Burton, Ross wrote:
> On 5 September 2013 11:20, Burton, Ross <ross.burton@intel.com> wrote:
> > I've also decided that maybe systemd isn't being quite as clever as it
> > should and maybe fixing it there is the real fix.
> 
> s/systemd/Linux/.
> 
> The bug is that doing a "df" on a qemu systemd image results in it
> attempting to automount /proc/sys/fs/binfmt_misc.  The automount unit
> has ConditionPathExists=/proc/sys/fs/binfmt_misc/ to stop it
> attempting to automount when binfmt is disabled but hooray Linux if
> binfmt_misc is a module that directory exists even when the module
> isn't actually loaded, giving a no such device error when accessed.
> The intention here I believe is so that an access to that directory
> can invoke an automounter (systemd, in this case) which can then load
> the modules and mount the virtual filesystem.
> 
> There appear to be two options.
> 
> 1) The QA scripts ignore any binfmt_misc unit mounts failing
> 2) systemd RRECOMMENDS kernel-module-binfmt-misc
> 
> (the third option of teaching systemd how to recognise this situation
> and refuse to start the unit appears impossible)
> 

I honestly like second option more. And the third even better :) (sure
changing the test to ignore binfmt_misc unit from systemctl --failed
output can be easily done, but seems like just hiding the fail to me).

I just tested that the third option can be done (for this case at least)
by changing ConditionPathExists=/proc/sys/fs/binfmt_misc/ to
ConditionDirectoryNotEmpty=/proc/sys/fs/binfmt_misc/ for
proc-sys-fs-binfmt_misc.automount unit file and 
"df" doesn't complain as it doesn't attempt to automount anymore. On a
system which does have that module loaded there are two files there so
that's why the condition works.

Cheers,
Stefan


> (CCing Stefan for his input)
> 
> To be honest I'm leaning towards (1) right now as binfmt_misc is only
> required in specific situations.
> 
> Ross


  reply	other threads:[~2013-09-05 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 16:22 [PATCH] qemu: add recommend of kernel-modules for all qemu machines Ross Burton
2013-09-04 22:01 ` Richard Purdie
2013-09-05  0:51   ` Bruce Ashfield
2013-09-05  7:11     ` Martin Jansa
2013-09-05 10:20       ` Burton, Ross
2013-09-05 10:45         ` Burton, Ross
2013-09-05 13:09           ` Stanacar, StefanX [this message]
2013-09-05 14:19             ` Burton, Ross
2013-09-05 14:39               ` Burton, Ross
2013-09-05 12:21       ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378386554.27411.14.camel@firebird.rb.intel.com \
    --to=stefanx.stanacar@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox