Re: [systemd-devel] Yet another crash when D-Bus goes away

2011-02-26 Thread Andrey Borzenkov
On Sat, Feb 26, 2011 at 3:14 AM, Dan Williams  wrote:
> On Sun, 2011-02-20 at 16:10 +0300, Andrey Borzenkov wrote:
>> I get this every time on shutdown under systemd. NM debug stack trace
>> attached. Version is 0.8.2 + 2ce6f2 + 975133.
>
> You also want:
>
> 6068ae49a21ed329611a5ddcde63c2e97b3a3aac
>

Yep.

To comment on commit log question:

I'm not entirely sure why we hit this only at shutdown with
systemd; it could be that systemd is killing the bus daemon at
the same time as we're running the dispatcher and that's why the
GetNameOwner call doesn't complete.

This happens, because in current systemd design there is no stop
dependency between dbus.service and any service that requires D-Bus.
So D-Bus is stopped as soon as possible, leaving all dependent
services orphan.

Nor is there any start dependency :) But this is emulated by autospawn
on dbus.socket access.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] /usr on separate file system

2011-02-26 Thread Lennart Poettering
On Fri, 25.02.11 14:54, Matthew Miller (mat...@mattdm.org) wrote:

> 
> On Fri, Feb 25, 2011 at 08:37:47PM +0100, Lennart Poettering wrote:
> > > Is this flagged for the Fedora 15 release notes?
> > Why would it? It's just a statement of fact, as a warning. Thinks like
> 
> Because to my knowledge it's never been said before, and if the project
> wants to draw a line in the sand and make that declaration, it should be
> officially said somewhere.

This is not about drawing lines in the sand. 

And a lot of folks have been aware of this since years, and have been
saying this.

I am not sure release notes are the right place to advertise facts that
a) aren't really news and b) have been public knowledge since a while.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] /usr on separate file system

2011-02-26 Thread Lennart Poettering
On Fri, 25.02.11 13:35, Adam Spragg (a...@spra.gg) wrote:

> 
> On Friday 25 Feb 2011 13:00:51 Andrey Borzenkov wrote:
> > Commit
> > http://cgit.freedesktop.org/systemd/commit/?id=80758717a6359cbe6048f43a17c
> > 2b53a3ca8c2fa declared separate /usr unsupported. What is really the reason
> > for it?
> 
> This does seem odd. Might I also point out...
> 
> >From 
> 
> To boot a system, enough must be present on the root partition to mount other 
> filesystems. This includes utilities, configuration, boot loader information, 
> and other essential start-up data. /usr, /opt, and /var are designed such 
> that 
> they may be located on other partitions or filesystems.

Well, turns out no distro really follows the spec here, do they?

I think this is mostly wishful thinking by some folks who wrote the FHS,
and does not describe what really is.

> > Are there any bug reports that lead to this decision?
> 
> No idea, but given that there are probably a fair few systems out there which 
> currently have a separate /usr, I predict quite a few bug reports because of 
> this change...

There is no change here. All we added is a warning about something that
was already broken.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How can i disable bluetooth.service in fc15

2011-02-26 Thread Lennart Poettering
On Thu, 24.02.11 23:39, Rave it (chat-to...@raveit.de) wrote:

> Hi,
> i want to disable bluetooth.service in fedora 15 because i don't
> needed.

Traditionally bus activated services could not be disabled. In systemd
we can implement this now, and maybe we should do that for bluez, if
there's a really good reason to.

In the meantime you can mask bluez entirely, which makes it impossible
to start it, neither manually, nor automatically via bus or hw
activation.

ln -sf /dev/null /etc/systemd/system/bluetooth.service && systemctl 
daemon-reload

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How can i disable bluetooth.service in fc15

2011-02-26 Thread Lennart Poettering
On Fri, 25.02.11 20:05, Miklos Vajna (vmik...@frugalware.org) wrote:

> On Thu, Feb 24, 2011 at 11:39:49PM +0100, Rave it  
> wrote:
> > i want to disable bluetooth.service in fedora 15 because i don't needed.
> > Normaly i removed bluez but now a days bluez have gnome-shell as an
> > dependency.
> > I try to do this with:
> > [root@mother rave]# systemctl stop bluetooth.service
> > [root@mother rave]# systemctl disable bluetooth.service
> > 
> > But this helps only for a moment, after a restart bluetooth.service
> > starts again.
> > I think disabling bluetooth.service is possible because:
> > [root@mother rave]# systemctl show -p "Wants" bluetooth.service
> > Wants=
> > 
> > So what i can do to solve this prob? Or isn't it possible?
> 
> It starts because of bus activation.
> 
> A hack I can imagine is copying /lib/systemd/system/bluetooth.service to
> /etc/systemd/system/bluetooth.service and change /usr/sbin/bluetoothd -n
> to /bin/true.

It's much nicer to "mask" things. In systemd if a service file is linked
to /dev/null systemd will notice that and show it as "masked" and refuse
any kind of activation. It's a bit of a hidden feature, since the normal
way of disabling things should be good enough and we don't want to
confuse users unnecessarily, but for everything else there is this
hardcore way of disabling called masking.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] It is impossible to distinguish between services that never run or were skipped

2011-02-26 Thread Andrey Borzenkov
Consider

{pts/1}% systemctl status plymouth-start.service
plymouth-start.service - Show Plymouth Boot Screen
  Loaded: loaded (/lib/systemd/system/plymouth-start.service)
  Active: inactive (dead)
  CGroup: name=systemd:/system/plymouth-start.service
{pts/1}% systemctl status plymouth-quit.service
plymouth-quit.service - Terminate Plymouth Boot Screen
  Loaded: loaded (/lib/systemd/system/plymouth-quit.service)
  Active: inactive (dead)
  CGroup: name=systemd:/system/plymouth-quit.service

The former did run on boot, but actual execution was skipped due to
/dev/.systemd/plymouth.
The latter was never run because in run level 5 we do not stop
plymouth and rely on prefdm to either hand over screen or stop it.

How do you tell the difference?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-logger and external syslog daemon

2011-02-26 Thread Andrey Borzenkov
On Wed, Feb 23, 2011 at 10:48 AM, Mike Kazantsev  wrote:
> Good day,
>
>
> I've recently deployed systemd on a machine that uses some syslog
> monitoring software and the software went nuts because messages from
> systemd logger were inconsistent with other logging - they all look
> like this:
>
>  kernel.warning kernel[-]: process[pid]: message contents
>

I confirm this at least for one special case - redirecting service
output to syslog. Here is how it looks like:

Mar  1 06:35:53 localhost kernel: crond[847]: Starting crond: [  OK  ]^M[  OK  ]
Mar  1 06:35:53 localhost kernel: atd[850]: Starting atd: [  OK  ]

Syslog output from other programs is OK, so it looks like internal
systemd issue.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] allow explicit stdout/stderr configuration for SysV services

2011-02-26 Thread Andrey Borzenkov
Currently it is possible to either output legacy initscripts on
console which often messes it up completely, or suppress output
alltogether which makes it hard to debug boot issues.

While DefaultStandardOutput could be used to force syslog, it will
affect *all* services, also those that set stdin to tty and rely
on inheriting it. So make it possible for SysV to explicitly control
output.

Signed-off-by: Andrey Borzenkov 

---
 man/systemd.conf.xml |2 +
 man/systemd.xml  |   39 +++-
 src/dbus-manager.c   |4 +++
 src/main.c   |   52 +-
 src/manager.h|1 +
 src/service.c|5 +++-
 src/system.conf  |2 +
 7 files changed, 101 insertions(+), 4 deletions(-)

diff --git a/man/systemd.conf.xml b/man/systemd.conf.xml
index 8faedda..2d73d6e 100644
--- a/man/systemd.conf.xml
+++ b/man/systemd.conf.xml
@@ -80,6 +80,8 @@
 CrashShell=no
 ShowStatus=yes
 SysVConsole=yes
+
SysVStandardOutput=inherit
+
SysVStandardError=inherit
 CrashChVT=1
 
DefaultStandardOutput=null
 
DefaultStandardError=inherit
diff --git a/man/systemd.xml b/man/systemd.xml
index 2c42a02..7f97d39 100644
--- a/man/systemd.xml
+++ b/man/systemd.xml
@@ -194,8 +194,8 @@
 
 --sysv-console=
 
-Controls whether
-output of SysV init scripts will be
+Forces
+output of SysV init scripts to be
 directed to the console. This switch
 has no effect when run as user
 instance. Takes a boolean argument
@@ -204,6 +204,29 @@
 true.
 
 
+
--sysv-standard-output=
+
--sysv-standard-error=
+
+Sets the default
+output resp. error output for SysV
+init scripts, i.e. controls
+the default for
+StandardOutput=
+resp. StandardExecute=
+(see
+
systemd.exec5
+for details). Takes one of
+inherit,
+null,
+tty,
+syslog,
+syslog+console,
+kmsg,
+kmsg-console.  If the
+argument is omitted it defaults to
+inherit.
+
+
 --log-target=
 
 Set log
@@ -993,6 +1016,18 @@
 
 
 
+
systemd.sysv_standard_output=
+
systemd.sysv_standard_error=
+Controls default
+standard output/error output for
+SysV init scripts, with the same effect as the
+--sysv-standard-output=
+resp. --sysv-standard-error=
+command line arguments described
+above.
+
+
+
 
systemd.log_target=
 
systemd.log_level=
 
systemd.log_color=
diff --git a/src/dbus-manager.c b/src/dbus-manager.c
index 6f98aa7..d1cdcb1 100644
--- a/src/dbus-manager.c
+++ b/src/dbus-manager.c
@@ -175,6 +175,8 @@
 #ifdef HAVE_SYSV_COMPAT
 #define BUS_MANAGER_INTERFACE_PROPERTIES_SYSV   \
 "  \n" \
+"  \n" \
+"  \n" \
 "  \n" \
 "  \n"
 #else
@@ -329,6 +331,8 @@ static DBusHandlerResult 
bus_manager_message_handler(DBusConnection *connection,
 { "org.freedesktop.systemd1.Manager", "DefaultStandardError",  
bus_manager_append_exec_output, "s", &m->default_std_error  },
 #ifdef HAVE_SYSV_COMPAT
 { "org.freedesktop.systemd1.Manager", "SysVConsole",   
bus_property_append_bool,  "b",  &m->sysv_console   },
+{ "org.freedesktop.systemd1.Manager", "SysVStandardOutput", 
bus_manager_append_exec_output, "s", &m-