Re: [systemd-devel] Erlang bindings for systemd-notify API
Hello All! 2016-06-24 17:28 GMT+02:00 Lennart Poettering : > On Thu, 23.06.16 16:12, Peter Lemenkov (lemen...@gmail.com) wrote: > >> Sorry for resurrecting of an old thread, but I really hope to finish >> this task :) >> What should I do for moving this library under systemd umbrella? >> What's the next step? > > I copied your repo now into the systemd umbrella, made the "erlang" > group we already have admin of it, and added you to it. Cool, thanks! > I hope this is all that's needed? Yes, I think so. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Erlang bindings for systemd-notify API
Sorry for resurrecting of an old thread, but I really hope to finish this task :) What should I do for moving this library under systemd umbrella? What's the next step? 2016-05-30 12:18 GMT+02:00 Lennart Poettering : > On Sun, 29.05.16 22:24, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote: > >> On Sun, May 29, 2016 at 10:59:23AM +0200, Peter Lemenkov wrote: >> > Hello All! >> > I'd like to introduce another systemd-related project - >> > erlang-sd_notify. That's just a bindings for sd_notify API. Currently >> > it implements bindings just for two functions - sd_notify and >> > sd_notifyf, which is enough for using "Type=notify" as a service type. >> > >> > https://github.com/lemenkov/erlang-sd_notify >> > >> > Library is a very simple one. It has been in use in a production >> > environments for a couple of years already. >> > >> > I wonder if it's possible to host it somewhere at github.com/systemd >> > among other bindings or it's too small to be promoted? >> >> I think it'd be reasonable to move it under the systemd umbrella. >> We already have "Erlang" team in systemd, that has one "ejournald" >> repo: https://github.com/orgs/systemd/teams/erlang. > > Yeah, I agree, it certainly makes sense to add this to the systemd > umbrella. Not entirely sure what the workflow is supposed to be though > to make this happen... > > Lennart > > -- > Lennart Poettering, Red Hat -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Erlang bindings for systemd-notify API
Hello All! I'd like to introduce another systemd-related project - erlang-sd_notify. That's just a bindings for sd_notify API. Currently it implements bindings just for two functions - sd_notify and sd_notifyf, which is enough for using "Type=notify" as a service type. https://github.com/lemenkov/erlang-sd_notify Library is a very simple one. It has been in use in a production environments for a couple of years already. I wonder if it's possible to host it somewhere at github.com/systemd among other bindings or it's too small to be promoted? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Asking for advice - two network interfaces in a container
Hello All! My system has two network planes - control plane (several 10.0.0.0/8 networks) and data plane (non-RFC1918 network, visible to end-users). These two networks separated by two different bridges and some iptables magic. All my business logic is handled using control plane (using various network protocols). So far all my containers connected to a control plane only - I have a lot of them actually. They work fine, orchestrated properly (with high availability, load balancing etc). Also I've got three VMs (KVM if it matters) which provides a different services to the end-users. Thus they has to be connected to a data plane. So all of them have two separate NICs - one for end user interaction, and another one for control plane. Although it's possible to handle all the business logic via "data plane" I'd rather to avoid that. Could anyone give me an advice/hint on how to design something like this properly? So far I don't see a standard method for systemd-nspawn to assign more that one NIC to the container. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH 1/1] Ensure that /run/systemd/network exists
This directory is used for storing transient/generated network service files. Unfortunately it doesn't generated during systemd-networkd startup. Let's fix that. --- src/network/networkd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/networkd.c b/src/network/networkd.c index 543a4e4..a98855f 100644 --- a/src/network/networkd.c +++ b/src/network/networkd.c @@ -67,6 +67,9 @@ int main(int argc, char *argv[]) { if (r < 0) log_warning_errno(r, "Could not create runtime directory 'lldp': %m"); +/* Create a directory for the generated transient network services */ +mkdir_p("/run/systemd/network", 0755); + r = drop_privileges(uid, gid, (1ULL << CAP_NET_ADMIN) | (1ULL << CAP_NET_BIND_SERVICE) | -- 2.4.1 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Adding additional network interfaces "dynamically", after networkd startup finishes
Hello All! My network is managed via systemd-networkd. I'm trying to create additional network bridge after another one service (VPN) is started. Right now I'm having a ExecStartPost directive, which creates /run/systemd/network, creates a necessary netdev/link/network files here, and restarts networkd (/bin/systemctl restart systemd-networkd.service). I wonder if it's a correct way to "dynamically" create network interfaces? Is it possible to ask networkd to re-read its configuration w/o restarting? Maybe D-Bus commands or something? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH 1/1] Fix typo
Looks like sizeof(struct Header) is 240 not 224 Signed-off-by: Peter Lemenkov --- src/journal/journal-def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-def.h b/src/journal/journal-def.h index ab089cb..39c9dd0 100644 --- a/src/journal/journal-def.h +++ b/src/journal/journal-def.h @@ -220,7 +220,7 @@ struct Header { le64_t n_tags; le64_t n_entry_arrays; -/* Size: 224 */ +/* Size: 240 */ } _packed_; #define FSS_HEADER_SIGNATURE ((char[]) { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' }) -- 2.1.0 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] systemd-networkd bridge doesn't work until switched to promiscous mode
Hello All! I see that promiscous mode was discussed a few times before but I'm not sure if I found something new or not. I've got the following setup - a physical interface (enp1s0f0), which I wanted to add to the bridge (br0). My setup consists of the following files * br0.netdev: [NetDev] Name=br0 Kind=bridge * br0.network: [Match] Name=br0 [Network] Address=xx.yy.zz.27/27 Gateway=xx.yy.zz.17 * enp1s0f0.network: [Match] Name=enp1s0f0 [Network] Bridge=br0 So this looks pretty simple. Unfortunately it doesn't work. If I start pinging xx.yy.zz.17, then I see (using tcpdump) that the gateway even replies, and this reply was received at physical interface but br0 doesn't recognize it (and consequently ping didn't get a reply back). But if I change the br0 mode with "ifconfig br0 promisc" it starts receiving data. Is this a known issue? Or maybe I missed something in docs? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn@.service is unusable
2014-12-05 16:25 GMT+03:00 Lennart Poettering : > On Fri, 05.12.14 16:58, Peter Lemenkov (lemen...@gmail.com) wrote: > >> Ok, now I've got something. Here is a a diff between good (1st, >> commandline) and bad (2nd, systemd service) sessions: >> >> * https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff >> >> More specifically I found these pieces interesting: >> >> * >> https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff-L253-L258 >> >> Notice "open("/dev/urandom", O_RDONLY|O_NOCTTY|O_CLOEXEC) = -1 EACCES >> (Permission denied)" when started as systemd service: >> >> * >> https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff-L699-L700 >> >> Notice "unlink("/run/systemd/journal/dev-log") = -1 EACCES >> (Permission denied)" followed by "bind(7, {sa_family=AF_LOCAL, >> sun_path="/run/systemd/journal/dev-log"}, 30) = -1 EADDRINUSE (Address >> already in use)". >> >> Looks like systemd-nspawn either doesn't mounts (bind mounts) a >> necessary devices or doesn't create them properly. > > Hmm, do you have SELinux enabled and in enforcing mode? > > nspawn mounts a tmpfs to /run, very early on, before invoking the > first binary, it should definitely be writable. Yes! That's a SELinux denial. I'm sorry for bothering you and for not trying switching selinux off and on again - I actually thought that all the SELinux issues are gone already. In case you're interested - here is a dump of dmesg | audit2allow: #= getty_t == allow getty_t devpts_t:chr_file { write getattr setattr read open ioctl }; allow getty_t rpm_var_lib_t:file open; allow getty_t tmpfs_t:chr_file read; #= syslogd_t == allow syslogd_t tmpfs_t:chr_file { read write ioctl open }; allow syslogd_t tmpfs_t:dir { write create add_name }; allow syslogd_t tmpfs_t:file { create setattr }; allow syslogd_t tmpfs_t:sock_file write; #= systemd_logind_t == allow systemd_logind_t tmpfs_t:filesystem mount; allow systemd_logind_t tmpfs_t:sock_file write; allow systemd_logind_t user_tmp_t:dir mounton; #= systemd_sysctl_t == # This avc can be allowed using the boolean 'domain_kernel_load_modules' allow systemd_sysctl_t kernel_t:system module_request; #== And here is a full explanation: https://paste.fedoraproject.org/156932/78730514/ I'll try to open a bug reports in RHBZ on each issue found. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn@.service is unusable
2014-12-05 4:43 GMT+03:00 Lennart Poettering : > On Thu, 04.12.14 20:12, Peter Lemenkov (lemen...@gmail.com) wrote: > >> Hello All! >> >> I'm playing with systemd-nspawn@.service and cannot make it work. It >> seems that similar issues were discussed (and addressed upstream) in >> Debian bug #770275 ( https://bugs.debian.org/770275 ) however I >> believe I've hit by something else. >> >> What I've done so far: >> >> * Ensured that /var/lib/container exists >> * Created both /var/log/journal/ and >> /var/lib/container//var/log/journal/ >> * Ensured that Storage=persistent is set in >> /var/lib/container//etc/systemd/journald.conf >> >> Every my attempt to run "systemctl status >> systemd-nspawn@" ended up like this: >> >> https://paste.fedoraproject.org/156640/14177088/ >> >> Please note that systemd-journald fails so I can't find out what's >> going on there. I'm stuck right here. Some other services failed as >> well, and I can't login using "machinectl login" but that's another >> story I believe. >> >> Any advice on how to debug this and make >> systemd-nspawn@ usable are highly appreciate! > > What happens if you run the same nspawn command from the command line? > Does journald then start up correctly in it? > > What happens if you add "debug" to the end of the nspawn cmdline? Do > you see anything interesting in the additional log output this > generates? > > If it fails then, too. Can you "strace -ff -o ~/nspawnlogs" the whole nspawn > process > (and hence also its child processes), then find the strace log this > created for journald, and check what the last bits are that it does. Ok, now I've got something. Here is a a diff between good (1st, commandline) and bad (2nd, systemd service) sessions: * https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff More specifically I found these pieces interesting: * https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff-L253-L258 Notice "open("/dev/urandom", O_RDONLY|O_NOCTTY|O_CLOEXEC) = -1 EACCES (Permission denied)" when started as systemd service: * https://gist.github.com/lemenkov/ee70c42baedcb9b43189#file-sessions-diff-L699-L700 Notice "unlink("/run/systemd/journal/dev-log") = -1 EACCES (Permission denied)" followed by "bind(7, {sa_family=AF_LOCAL, sun_path="/run/systemd/journal/dev-log"}, 30) = -1 EADDRINUSE (Address already in use)". Looks like systemd-nspawn either doesn't mounts (bind mounts) a necessary devices or doesn't create them properly. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn@.service is unusable
2014-12-05 12:41 GMT+03:00 Peter Lemenkov : > 2014-12-05 4:43 GMT+03:00 Lennart Poettering : >> On Thu, 04.12.14 20:12, Peter Lemenkov (lemen...@gmail.com) wrote: >> >>> Hello All! >>> >>> I'm playing with systemd-nspawn@.service and cannot make it work. It >>> seems that similar issues were discussed (and addressed upstream) in >>> Debian bug #770275 ( https://bugs.debian.org/770275 ) however I >>> believe I've hit by something else. >>> >>> What I've done so far: >>> >>> * Ensured that /var/lib/container exists >>> * Created both /var/log/journal/ and >>> /var/lib/container//var/log/journal/ >>> * Ensured that Storage=persistent is set in >>> /var/lib/container//etc/systemd/journald.conf >>> >>> Every my attempt to run "systemctl status >>> systemd-nspawn@" ended up like this: >>> >>> https://paste.fedoraproject.org/156640/14177088/ >>> >>> Please note that systemd-journald fails so I can't find out what's >>> going on there. I'm stuck right here. Some other services failed as >>> well, and I can't login using "machinectl login" but that's another >>> story I believe. >>> >>> Any advice on how to debug this and make >>> systemd-nspawn@ usable are highly appreciate! >> >> What happens if you run the same nspawn command from the command line? >> Does journald then start up correctly in it? > > Yes, it works perfectly fine if I run it as > > $ sudo /usr/bin/systemd-nspawn --keep-unit --boot > --directory=/var/lib/container/earlyannounce > > I can login and see logs. Unfortunately no logs from the previous boot > are available (due to failed systemd-journald.service). > >> What happens if you add "debug" to the end of the nspawn cmdline? Do >> you see anything interesting in the additional log output this >> generates? > > Can't say for sure. Here is a diff between two logs (with whitespace > ignored) - first one is successful boot, second one is the failed boot > (using systemd service): > > * https://paste.fedoraproject.org/156867/77223114/raw/ > > And here are actual boot logs: > > * https://paste.fedoraproject.org/156862/17770249/ (from the service-file) > * https://paste.fedoraproject.org/156862/17770249/ (using the command > mentioned above) Wrong last link, sorry. Here is a proper one: * https://paste.fedoraproject.org/156894/79578141/ (using the command mentioned above) -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-nspawn@.service is unusable
2014-12-05 4:43 GMT+03:00 Lennart Poettering : > On Thu, 04.12.14 20:12, Peter Lemenkov (lemen...@gmail.com) wrote: > >> Hello All! >> >> I'm playing with systemd-nspawn@.service and cannot make it work. It >> seems that similar issues were discussed (and addressed upstream) in >> Debian bug #770275 ( https://bugs.debian.org/770275 ) however I >> believe I've hit by something else. >> >> What I've done so far: >> >> * Ensured that /var/lib/container exists >> * Created both /var/log/journal/ and >> /var/lib/container//var/log/journal/ >> * Ensured that Storage=persistent is set in >> /var/lib/container//etc/systemd/journald.conf >> >> Every my attempt to run "systemctl status >> systemd-nspawn@" ended up like this: >> >> https://paste.fedoraproject.org/156640/14177088/ >> >> Please note that systemd-journald fails so I can't find out what's >> going on there. I'm stuck right here. Some other services failed as >> well, and I can't login using "machinectl login" but that's another >> story I believe. >> >> Any advice on how to debug this and make >> systemd-nspawn@ usable are highly appreciate! > > What happens if you run the same nspawn command from the command line? > Does journald then start up correctly in it? Yes, it works perfectly fine if I run it as $ sudo /usr/bin/systemd-nspawn --keep-unit --boot --directory=/var/lib/container/earlyannounce I can login and see logs. Unfortunately no logs from the previous boot are available (due to failed systemd-journald.service). > What happens if you add "debug" to the end of the nspawn cmdline? Do > you see anything interesting in the additional log output this > generates? Can't say for sure. Here is a diff between two logs (with whitespace ignored) - first one is successful boot, second one is the failed boot (using systemd service): * https://paste.fedoraproject.org/156867/77223114/raw/ And here are actual boot logs: * https://paste.fedoraproject.org/156862/17770249/ (from the service-file) * https://paste.fedoraproject.org/156862/17770249/ (using the command mentioned above) -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] systemd-nspawn@.service is unusable
Hello All! I'm playing with systemd-nspawn@.service and cannot make it work. It seems that similar issues were discussed (and addressed upstream) in Debian bug #770275 ( https://bugs.debian.org/770275 ) however I believe I've hit by something else. What I've done so far: * Ensured that /var/lib/container exists * Created both /var/log/journal/ and /var/lib/container//var/log/journal/ * Ensured that Storage=persistent is set in /var/lib/container//etc/systemd/journald.conf Every my attempt to run "systemctl status systemd-nspawn@" ended up like this: https://paste.fedoraproject.org/156640/14177088/ Please note that systemd-journald fails so I can't find out what's going on there. I'm stuck right here. Some other services failed as well, and I can't login using "machinectl login" but that's another story I believe. Any advice on how to debug this and make systemd-nspawn@ usable are highly appreciate! -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] networkd - how to start service right after the "link configured" stage?
Hello All! I'm currently doing a great stuff with systemd-networkd but one thing is holding me back. One of my services is starting too early. I'd love to delay its startup right after the "link configured" stage.So far I've got the followng in journal logs: el7 ~: sudo journalctl -M mycontainer -b --unit="systemd-networkd" -- Logs begin at Пн 2014-11-24 16:41:18 MSK, end at Вт 2014-11-25 14:53:14 MSK. -- ноя 25 14:53:08 mycontainer systemd[1]: Starting Network Service... ноя 25 14:53:08 mycontainer systemd[1]: Started Network Service. ноя 25 14:53:08 mycontainer systemd-networkd[29]: host0 : gained carrier ноя 25 14:53:08 mycontainer systemd-networkd[29]: host0 : DHCPv4 address 192.168.122.169/24 via 192.168.122.1 ноя 25 14:53:14 mycontainer systemd-networkd[29]: host0 : link configured el7 ~: So far I've got few questions: - Does networkd emit some D-Bus event when the network link is configured? - If yes is it possible to add a systemd service triggered by this D-Bus message? - If no is there a way to start systemd service after the given network link is configured? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [HEADS-UP] PID 1 now ported to libsystemd-bus
2013/11/21 Lennart Poettering : > Heya! > > I just pushed a huge patch that ports the last remaining bit from > libdbus to libsystemd-bus: PID 1 itself. It's a large patch, touching a > lot of code. I did quite a bit of (personal and automated) testing but > given how large this is I am sure I broke something. So, please, be > careful around git for now, test it please, and don't be too surprised > if it is a bit rougher than usual, thanks! Great! > Of course, this means we can now go on to the next step: boot without > dbus-daemon, and use kdbus instead. is it available in upstream kernel or should anyone interested use some personal fork instead? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Need advice on daemon's architecture
Hello All! I'm working on a system service which uses systemd intensively. Right now it's socket-activated, with main service of type "simple". I recently added support for querying and publishing some internals via D-Bus, so it has a D-Bus name now. Does it add anything if I change type of a main service to "dbus" thus allowing systemd to know for sure if my service is fully initialized? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to properly start user session from DM?
Hello All! I'm trying to properly start a user's session from systemd. Actually I already did that and I just want to improve my experience further. Here is my story. I'm using XDM which is cool and simple DM. When someone submits proper login and password it loads "/etc/X11/xdm/xdm-config" file, searches for "DisplayManager*session" key and runs whatever is written here ("/etc/X11/xdm/Xsession" by default, "/usr/bin/systemd --user" in my case). So far everything works perfectly. Important note - it runs this as a user which has just logged in. I'm trying to replace "/usr/bin/systemd --user" with something which looks more proper - with "/usr/bin/systemctl --user start user@`id -n -u`.service" but it logs out almost immediately. I tried it with and w/o "--user" switch but nothing really changed - I see some login attempts in journalctl logs and xdm is just restarted (looks like someone pressed ctrl+alt+bksp). I suspect it's due to the act that "/usr/bin/systemctl --user" stays forever while systemctl returns almost immediately. So I've got a two questions: * What did I do wrong and how to fix that? * Could someone please explain what's the purpose of this /usr/lib/systemd/system/user@.service file and how to use it? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Disable firmware loading when firmware file is 0 byte
Hello All. 2012/11/16 Umut Tezduyar : > If firmware file is not found in the file system, udev > terminates firmware loading. This is not the case if > firmware file exists in the file system but doesn't have > any data in it. This sounds like an error which must be fixed somewhere else. Just my 2c. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] XDM and systemd --user
Hello All! 2012/9/28 Peeters Simon : >> Second question - I've lost all /etc/profile stuff which was set up >> somehow in the depths of Xorg-related script's swamp. I'd like to run >> it (as well as some other shell scripts) and borrow its envvars (at >> least for some applications) - is it possible? > > systemd currently does not parse /etc/profile (and never will?) > you can work around by creating a shell script like this: > > cat < /bin/systemd-session > #!/bin/bash -l > exec /usr/bin/systemd --user $@ > EOF > > and point your xdm-config to /bin/systemd-session > (this lets bash start a 'login' shell, thus parsing /etc/profile. and > exec's systemd afterwards) Thanks! Works like a charm. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] XDM and systemd --user
Hello All! I'm switching to "systemd --user" now and it mostly works but I encountered some issues. First of all I'd like to describe my setup. I'm using XDM and FVWM. If user successfully enters valid authentication data, then XDM starts (under that user's privileges) application listed under "DisplayManager*session" in "/etc/X11/xdm/xdm-config" (default value is "/etc/X11/xdm/Xsession"). I simply replaced it with "/usr/bin/systemd --user" and it correctly loads my FVWM and so on. First question - is this a correct way to run systemd --user? I saw a "user@.service script" but it does requires root permission to run. Second question - I've lost all /etc/profile stuff which was set up somehow in the depths of Xorg-related script's swamp. I'd like to run it (as well as some other shell scripts) and borrow its envvars (at least for some applications) - is it possible? Sorry for somewhat lame questions :). -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] XFS Mount issues (multiple mount concurrency issue?)
Hello! 2012/9/11 Colin Guthrie : > Hi guys. > > Quick straw poll: Has anyone had issues mounting XFS partitions on boot? > I have a user who has several and one usually mounts fine the the others > do not. When in the emergency shell they all mount fine manually. This sounds pretty much the same as what I've been stuck with! See this thread: http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/5244 Also I found this today in the journal logs: [root@nostromo ~]# systemctl status partition1.mount partition1.mount - Partition no.1 Loaded: loaded (/etc/systemd/system/partition1.mount; enabled) Active: failed (Result: exit-code) since Fri, 14 Sep 2012 08:42:01 +0400; 13min ago Where: /media/partition1 What: UUID="5ace7388-bccb-439f-ac03-2a51046ff9a8" Process: 343 ExecMount=/bin/mount UUID="5ace7388-bccb-439f-ac03-2a51046ff9a8" /media/partition1 -t xfs -o defaults,noatime,nodiratime,rw (code=exited, status=32) CGroup: name=systemd:/system/partition1.mount Sep 14 08:42:01 nostromo mount[343]: mount: unknown filesystem type 'xfs' -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Newbie systemd-related question - how to run a service w/o anything but network?
Hello All. I'm trying to write a systemd service for epmd (Erlang Port Mapper Daemon, if someone is curious). its only purpose is to open a TCP port 4369 at 0.0.0.0 and act as a simple messaging (very simple actually) bus between erlang nodes. I'd like to run it w/o anything and under a most restricted system account. So far I'm using this service: [Unit] Description=Erlang Port Mapper Daemon After=network.target [Service] User=nobody Group=nobody Type=simple PrivateTmp=true NoNewPrivileges=true ExecStart=/usr/bin/epmd ExecSop=/usr/bin/epmd -kill [Install] WantedBy=multi-user.target Could someone propose me something to restrict it further? it really doesn't need fs access, no exec, no /dev/* access, etc - just open socket and send/receive messages. Any advise will be very appreciated). -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] using native *.mount units instead of /etc/fstab - unpredictable state in case of many disks
Hello. I've hit by a strange issue on a machine with 8 hard disks. if I list them all in /etc/fstab they mounts fine. If I provide native *.mount files then almost every reboot one or several disks failed to mount (with 32 error, e.g. "code=exited, status=32", which means that no hadrwae is available at the moment of mount attempt, wrong fs, etc). If I login and run "systemctl restart media-mypathX.mount" it mounts just fine. Here is how these *.mount files looks like (no RAID, no LVM, etc - just plain alone single-partitioned hard disk): === [Unit] Description=Random Stuff Directory #After=media.mount systemd-udev-settle.service dev-disk-by\x2dlabel-heap.device After=media.mount Before=nfs-server.service [Mount] #What=LABEL="heap" What=/dev/disk/by-label/heap Where=/media/heap Type=xfs Options=defaults,noatime,nodiratime === You can see - I tried to start it after systemd-udev service as well as after appropriate *.device but w/o success. Also I tried to mount using labels and using corresponding paths. No success either. Could someone point me out what did I miss? I'm sure there is some specific *.service or *.target file I must add it as a dependency. Fedora 18 if it matters. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to modify files from within systemd *.service? (for example using /bin/echo and stdout redirection)
Hello! 2012/5/26 Canek Peláez Valdés : > Have you tried to add hid_apple.fnmode=2 to your kernel command line in > Grub? I don't use modules, I compile everything I need inside my kernel, and > this is the only way I have to pass parameters to my "modules". Thanks! It works now even w/o systemd service. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to modify files from within systemd *.service? (for example using /bin/echo and stdout redirection)
Hello! 2012/5/26 Joachim : > It doesnt work because redirects are a shell feature and systemd starts > programs without the help of a shell. So this line > > ExecStart=/bin/echo 2 > /tmp/test.txt > > would need to be transformed into > > ExecStart=/bin/bash -c 'echo 2 > /tmp/test.txt' > > untested, but should work. Thanks - this indeed works. I just tested it. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to modify files from within systemd *.service? (for example using /bin/echo and stdout redirection)
Hello! 2012/5/26 shawn : > I have the same keyboard. You are doing this the hard (and slow) way. > > just add > > options hid_apple fnmode=2 > > to > > /etc/modprobe.d/hid_apple.conf I am aware of this method. Unfortunately (and quite surprisingly it is never worked for me (for whatever reasons). I tried it again and it still doesn't work. Perhaps Fedora powerpc kernel config is different in some aspects. -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to modify files from within systemd *.service? (for example using /bin/echo and stdout redirection)
Hello All! I've got Apple Mac keyboard which behaviour depends on a value stored in /sys/module/hid_apple/parameters/fnmode file (default is "1"). Before systemd I did the following - I added the "echo 2 > /sys/module/hid_apple/parameters/fnmode" line to the end of /etc/rc.d/rc.local . Recently I tried to do the same using native systemd *.service file and quickly created the following one: == [Unit] Description=Fix Apple Keyboard Fn Behaviour [Service] Type=oneshot RemainAfterExit=yes ConditionPathExists=/sys/module/hid_apple/parameters/fnmode ExecStart=/bin/echo 2 > /sys/module/hid_apple/parameters/fnmode [Install] WantedBy=multi-user.target == Unfortunately it doesn't work at all. Although systemctl tells me that everything is ok, the contents of the /sys/module/hid_apple/parameters/fnmode file remains intact. After a brief examination I found that I just can't simply redirect stdout to the file (e.g. if I change ExecStart to someting like this "ExecStart=/bin/echo 2 > /tmp/test.txt" then the file /tmp/test.txt" will not be created). So questions are * Can I somehow modify the given file from systemd files w/o too much efforts? "Too much" means w/o writing simple console utility only with systemd+shell means. * How to restore the original ">" and "<" behaviour if required? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to properly allow user to adjust LimitNOFILE?
Hello! I already found that I could add "LimitNOFILE=2048" to the "Service" section to explicitly set max number of opened files but I need something different. I want to allow user to specify it and set it only in case he specifies it. It looks like I should use something like "ExecStartPre=ulimit -n $ULIMIT_MAX_FILES" where ULIMIT_MAX_FILES is read from EnvironmentFile, but maybe there are some other recommended ways? -- With best regards, Peter Lemenkov. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel