Re: [systemd-devel] start database mysql.

2016-08-19 Thread Lennart Poettering
On Thu, 18.08.16 14:48, Alfredo Garzon (lgarz...@hotmail.com) wrote:

> hi, we have a problem, we install  rpm of mysql5.7.9, at the beginning start 
> database   please, someone give some idea to correct this: the messages is:
> 
> bgtlhnbd2etc#systemctl start mysqld
> Job for mysqld.service failed. See 'systemctl status mysqld.service' and 
> 'journalctl -xn' for details.
> sbgtlhnbd2etc#systemctl status mysqld.service
> mysqld.service - SYSV: MySQL database server.
>Loaded: loaded (/etc/rc.d/init.d/mysqld)
>Active: failed (Result: exit-code) since Wed 2016-08-17 22:25:13 COT; 17s 
> ago
>   Process: 16562 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, 
> status=1/FAILURE)
> 
> Aug 17 22:25:10 sbgtlhnbd2 systemd[1]: Starting SYSV: MySQL database 
> server
> Aug 17 22:25:13 sbgtlhnbd2 mysqld[16562]: MySQL Daemon failed to start.
> Aug 17 22:25:13 sbgtlhnbd2 mysqld[16562]: Starting mysqld:  [FAILED]
> Aug 17 22:25:13 sbgtlhnbd2 systemd[1]: mysqld.service: control process 
> exited, code=exited status=1

mysqld's start job failed with exit code 1. This is not a systemd
problem really, but some issue with mysql. Please check mysql's logs
in order to figure out what might have gone wrong.

Lennart

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


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Lennart Poettering
On Fri, 19.08.16 13:18, Juanjo Presa (juan...@gmail.com) wrote:

> Ok, thanks for your reply.
> 
> Any suggestion to achieve something similar? I'm trying with btrfs
> subvolumes but I don't get to make union of /usr from OS subvolume with
> /usr from runtime subvolume

btrfs subvolumes and snapshots don't permit you to merge arbitrary
directory trees. They only allow you to make a cheap copy of a
directory tree and then operate on that without affecting the original version.

Lennart

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


Re: [systemd-devel] unknown problem with systemd

2016-08-19 Thread Lennart Poettering
On Sun, 14.08.16 03:58, Michał Zegan (webczat_...@poczta.onet.pl) wrote:

> Hello. I have installed systemd version 231 from arch repos. actually it
> is systemd-selinux from aur. now, the problem:
> the system boots. but some services fail to start, notably
> systemd-journald and systemd-networkd, not sure if others fail too.
> When checking what happened using dmesg as journald does not work, I get
> that the control process received signal 31, marked sigsys. no explanation.
> I have normal systemd 231 on my laptop, and it works with journal and
> all. In addition, running processes normally on this pc where it does
> not work does not kill them with signal sigsys.
> Does anyone know or suspect what may be the cause? My kernel has a
> heavily modified configuration, and I just upgraded from 4.6 to 4.7 and
> configured using make oldconfig.

This smells a lot like one of thee issues:

https://github.com/systemd/systemd/issues/3970
https://github.com/systemd/systemd/issues/3962

Most likely it's the latter, in which case an update of libselinux
should fix the issue for you.

Lennart

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


Re: [systemd-devel] machinectl pull image error

2016-08-19 Thread Lennart Poettering
On Tue, 02.08.16 18:06, Maxim Lacrima (lacrima.ma...@gmail.com) wrote:

> Hi!
> 
> I am just trying to use machinectl. Here is a command I execute:
> 
> maxim@maxim ~ % sudo machinectl --verify=no pull-raw
> https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Atomic-23-20151030.x86_64.raw.xz
> Failed to transfer image: Message recipient disconnected from message bus
> without replying
> 
> And corresponding entries in journal:
> 
> Aug 02 17:53:25 maxim sudo[9365]:maxim : TTY=pts/1 ; PWD=/home/maxim ;
> USER=root ; COMMAND=/usr/bin/machinectl --verify=no pull-raw
> https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Atomic-23-20151030.x86_64.raw.xz
> Aug 02 17:53:25 maxim sudo[9365]: pam_unix(sudo:session): session opened
> for user root by (uid=0)
> Aug 02 17:53:25 maxim dbus[373]: [system] Activating via systemd: service
> name='org.freedesktop.import1' unit='dbus-org.freedesktop.import1.service'
> Aug 02 17:53:25 maxim systemd[1]: Starting Virtual Machine and Container
> Download Service...
> Aug 02 17:53:25 maxim dbus[373]: [system] Successfully activated service
> 'org.freedesktop.import1'
> Aug 02 17:53:25 maxim systemd[1]: Started Virtual Machine and Container
> Download Service.
> Aug 02 17:53:25 maxim systemd[1]: systemd-importd.service: Main process
> exited, code=killed, status=31/SYS

importd aborted by SIGSYS. this is almost definitely caused by the
seccomp policy we enable these days for all our services, and it is
apparently too strict for importd, which results in SIGSYS as soon as
importd invokes some system call that isn't whitelisted.

THis is a bug in systemd, and I have now filed an issue about this and
made it a blocker for the next release:

https://github.com/systemd/systemd/issues/3996

Lennart

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


Re: [systemd-devel] -b switch fails where --since works

2016-08-19 Thread Lennart Poettering
On Wed, 10.08.16 09:29, Chris Murphy (li...@colorremedies.com) wrote:

> Hi,
> 
> I reported this against systemd-222-10.fc23.x86_64, but it's been a
> problem for longer than that, and it's still a problem in
> systemd-229-9.fc24.x86_64.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1294002
> 
> The gist is that -b switch works for a while, but then at some point
> it breaks and from that point it doesn't ever work again. By "doesn't
> work" I mean, the results are incomplete (dozen lines instead of
> thousands) and the wrong date (wrong boot entirely).
> 
> Meanwhile --since works fine, it's just a bit tedious to get back to a
> previous boot because I have to --list-boots first, and then
> copy/paste a date+time for --since.
> 
> I have no idea what breaks -b function, I'd guess it has something to
> do with inevitable journal file corruption and the -b code is getting
> confused where --since doesn't?

Most likely your system was rebooted/shutdown cleanly at a certain
point, and a journal file was synced incompletely and out-of-order,
which confuses the seeking code.

There has been quite some work to make journalctl handle that nicely
in v230, please try at least dc00966228ff90c554fd034e588ea55eb605ec52
and check if that makes things work for you. It's highly likely that
journalctl will start to just work for you if you update to that
version.

If this remains an issue even with current git or v231, please file a
bug and please provide me with the journal files that trigger this
behaviour, since there's little we can do otherwise.

Lennart

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


Re: [systemd-devel] libsystemd export message_append_cmdline

2016-08-19 Thread Lennart Poettering
On Mon, 15.08.16 11:05, Brad Bishop (bradl...@fuzziesquirrel.com) wrote:

> 2 - Should I not be writing my own app - i.e. is this something
> busctl can do or makes sense to extend it to do?

busctl is a debugging tool and useful for calling methods. It's not a
good fit if you want to actively watch remote objects for specific
conditions, really.

> 3 - If I write my own application, message_append_cmdline seems to
> be a perfect fit for parsing cmdlines…how does the community feel
> about exporting it?

Hmm, I figure exposing the bus message serialization and
deserialization to user strings as part of sd-bus would be OK. But
it need some clean-ups and tests first.

Lennart

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


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Lennart Poettering
On Tue, 16.08.16 15:43, Juanjo Presa (juan...@gmail.com) wrote:

> Hi, I'm trying to compose a container with several layers and join together
> with overlay option but seems that is not supported.
> 
> I want to get something like:
> systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
> /foo/bar --boot
> 
> Maybe I'm misunderstanding the overlay option.
> 
> So, what do you suggest to accomplish a similar model. Maybe just mount the
> desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
> option? Something similar with btrfs subvolumes?
> 
> Thanks in advance.

Yeah, we currently do not support overlayfs as root dir, see

https://github.com/systemd/systemd/issues/3847

We should probably make that work. But do note that overlayfs
introduces as many new problems as it solves IRL... Because of that
there's no first level support for it in place right now (i.e. no
support for using it as backing for --ephemeral or so).

Lennart

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


Re: [systemd-devel] systemd-nspawn overlay and rootfs

2016-08-19 Thread Juanjo Presa
Ok, thanks for your reply.

Any suggestion to achieve something similar? I'm trying with btrfs
subvolumes but I don't get to make union of /usr from OS subvolume with
/usr from runtime subvolume

Nowadays I'm workarouding with:

systemd-nspawn
--overlay=/var/lib/machines/os/usr:/var/lib/machines/runtime/usr:/usr -D
/var/lib/machines/os --machine=foo -b -x

On Fri, Aug 19, 2016 at 1:02 PM, Lennart Poettering 
wrote:

> On Tue, 16.08.16 15:43, Juanjo Presa (juan...@gmail.com) wrote:
>
> > Hi, I'm trying to compose a container with several layers and join
> together
> > with overlay option but seems that is not supported.
> >
> > I want to get something like:
> > systemd-nspawn --overlay=/foo/ubuntu-base:/foo/app-runtime:/foo/app:/ -D
> > /foo/bar --boot
> >
> > Maybe I'm misunderstanding the overlay option.
> >
> > So, what do you suggest to accomplish a similar model. Maybe just mount
> the
> > desired overlay sideways in /foo/bar and dismiss systemd-nspawn overlay
> > option? Something similar with btrfs subvolumes?
> >
> > Thanks in advance.
>
> Yeah, we currently do not support overlayfs as root dir, see
>
> https://github.com/systemd/systemd/issues/3847
>
> We should probably make that work. But do note that overlayfs
> introduces as many new problems as it solves IRL... Because of that
> there's no first level support for it in place right now (i.e. no
> support for using it as backing for --ephemeral or so).
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Emulate two cron tab entries to start/stop service unit natively?

2016-08-19 Thread Lennart Poettering
On Mon, 01.08.16 23:59, John (da_audioph...@yahoo.com) wrote:

> Is it possible to use a systemd timer unit to start and stop a
> service unit according to set times of the day?  In my case,
> openvpn.service is a forking type if that matters. I can do this
> using cron, but am wondering if/how to do it with systemd natively.
> 
> In cron terms, one could do this like so:
> # start at 7 AM
> * 7 * * * systemctl start openvpn.service
> 
> 
> # stop at 5 PM
> * 17 * * * systemctl stop openvnp.service
> 
> The syntax of the timer with differential commands (ie start the
> service at 7 AM and stop it at 5 PM) isn't clear to me even after
> consulting `man systemd.time` and `man systemd.timer`.

You can do the exact same thing with timer units, and invoke systemctl
start/stop based on time. As timers actviate services you can also
simply activate the service drirectly via a timer. However, systemd
does not support natively to stop services by timer, currently. This
means for the "systemctl stop" part you always have to explicitly
invoke it.

An alternative is to use RuntimeMaxSec=10h in the service, which means
you'd make the service terminate after 10h. In this case the shutdown
would be scheduled monotonically however, not by calendar.

Lennart

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


Re: [systemd-devel] systemd-networkd - Could not append VLANs / operation not permitted

2016-08-19 Thread Lennart Poettering
On Thu, 11.08.16 18:40, arnaud gaboury (arnaud.gabo...@gmail.com) wrote:

> - Systemd version 213-1
> - OS: Arch linux
> - a systemd nspawn container is running
> - host network is managed by systemd-networkd
> 
> After an upgrade, systemd-networkd is broken, exactly the way descibed
> in this issue #3876[0]

Please upgrade to 231, where this should be fixed.

Lennart

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