Re: [systemd-devel] About stable network interface names

2017-05-28 Thread Greg KH
On Mon, May 29, 2017 at 02:35:12AM +0200, Cesare Leonardi wrote:
> I ask because I've done several tests, with different motherboards, adding
> and removing PCI-express cards and that expectation was not satisfied in
> many cases.
> 
> For example, in one of those tests I initially had this setup:
> Integrated NIC: enp9s0
> PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
> PCIE2 (x16): empty
> PCIE3 (x1): dual port ethernet card [enp7s0, enp8s0]
> 
> Then i inserted a SATA controller in the PCIE2 slot and three NICs got
> renamed:
> Integrated NIC: enp10s0
> PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
> PCIE2 (x16): empty
> PCIE3 (x1): dual port ethernet card [enp8s0, enp9s0]

Do you mean to show that PCIE2 is still empty here?

Anyway, PCI can, and will sometimes, renumber it's devices on booting
again, that's a known issue.  It is rare, but as you have found out,
will happen.  So anything depending on PCI numbers will change.  Nothing
we can really do about that.

thanks,

greg k-h
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Systemd -- Using Environment variable in a Unit file from Environment File

2017-05-28 Thread Raghavendra. H. R
Guys,

Any suggestions about this kind of problem ?


--
Regards,

Raghavendra. H. R
(Raghu)

On Fri, May 26, 2017 at 3:06 PM, Raghavendra. H. R 
wrote:

> Hi All,
>
> I'm in the situation where path of my server changes due to version
> change. I don't want to modify my systemd unit file everytime, instead I
> want to go ahead with my environement file for modification.
>
> My Env file system.env contains environment variables
>
> system.env
> 
> SERVER_PATH=/home/raghu/TAP/server/V110
>
> In my systemd unit file I have included this enviroment file.
>
> Tap.service
> 
> [Unit]
> Description=Starting TAP server
>
> [Service]
> EnvironmentFile=/home/raghu/system.env
> *WorkingDirectory=${SERVER_PATH}*
> *ExecStart=/home/raghu/TAP/out  "./server.js"*
>
> [Install]
> WantedBy=multi-user.target
>
> I'm stuck with the below error
>
> *error: Cannot find module '/server.js'*
>
> ${SERVER_PATH} is not set to my WorkingDirectory. Instead of using this
> variable, if I give the absolute path, my unit file works well.
>
> Need help in resoling this issue.
>
> --
> Regards,
>
> Raghavendra. H. R
> (Raghu)
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Systemd crash when trying to boot Angstrom image with systemd enabled

2017-05-28 Thread Sonu Abraham
Hi ,

I get the following kernel panic when trying to using system-console image from 
Angstrom distribution on imx28evk board

[9.506682] UBIFS (ubi0:0): FS size: 236302336 bytes (225 MiB, 1861 LEBs), 
journal size 9023488 bytes (8 MiB, 72 LEBs)
[9.517600] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[9.523667] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 
1E931B3C-5F0D-4F1E-B289-76950FFCF30B, small LPT model
[9.546773] VFS: Mounted root (ubifs filesystem) readonly on device 0:13.
[9.564543] devtmpfs: mounted
[9.570181] Freeing unused kernel memory: 296K (c0836000 - c088)
[9.576590] This architecture does not have kernel memory protection.
[   10.736655] systemd[1]: System time before build time, advancing clock.
Mounting cgroup to /sys/fs/cgroup/blkio of type cgroup with options blkio.
Mounting cgroup to /sys/fs/cgroup/devices of type cgroup with options devices.
Mounting cgroup to /sys/fs/cgroup/freezer of type cgroup with options freezer.
Mounting cgroup to /sys/fs/cgroup/pids of type cgroup with options pids.
Mounting cgroup to /sys/fs/cgroup/debug of type cgroup with options debug.
Mounting cgroup to /sys/fs/cgroup/cpu,cpuacct of type cgroup with options 
cpu,cpuacct.
Mounting cgroup to /sys/fs/cgroup/perf_event of type cgroup with options 
perf_event.
Mounting cgroup to /sys/fs/cgroup/memory of type cgroup with options memory.
Mounting cgroup to /sys/fs/cgroup/cpuset of type cgroup with options cpuset.
systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK 
+SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL -XZ +LZ4 -SECCOMP +BLKID 
-ELFUTILS +KMOD +IDN)
No virtualization found in DMI
No virtualization found in CPUID
Virtualization XEN not found, /proc/xen/capabilities does not exist
No virtualization found in /proc/device-tree/*
No virtualization found in /proc/cpuinfo.
This platform does not support /proc/sysinfo
Found VM virtualization none
Detected architecture arm.

Welcome to The Ångström Distribution v2016.12!

Set hostname to .
Initializing machine ID from random generator.
Installed transient /etc/machine-id file.
[   12.502389] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x008b
[   12.502389]
[   12.511603] CPU: 0 PID: 1 Comm: systemd Not tainted 4.8.17-fslc+g35ef795 #1
[   12.518592] Hardware name: Freescale MXS (Device Tree)
[   12.523819] [] (unwind_backtrace) from [] 
(show_stack+0x10/0x14)
[   12.531638] [] (show_stack) from [] (panic+0xbc/0x23c)
[   12.538588] [] (panic) from [] (do_exit+0xa30/0xa7c)
[   12.545347] [] (do_exit) from [] 
(do_group_exit+0x38/0xbc)
[   12.552634] [] (do_group_exit) from [] 
(get_signal+0x1ec/0x890)
[   12.560342] [] (get_signal) from [] 
(do_signal+0xb4/0x44c)
[   12.567615] [] (do_signal) from [] 
(do_work_pending+0xc0/0xd8)
[   12.575231] [] (do_work_pending) from [] 
(slow_work_pending+0xc/0x20)
[   12.583506] ---[ end Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x008b
[   12.583506]

Please let me know if I am missing out any changes in kernel configuration or 
do i need to pass any specific command line parameters to kernel command line.


Regards,

Sonu Abraham
Software Engineer



[RFI LOGO]  P:  +612 8814 2300 (Switch)
P: +612 8814 2383 (Direct)
F: +61 2 9630 0844
E: sonu.abra...@rfi.com.au
W: www.rfi.com.au

Please consider our environment before printing this email. This email and any 
file attachments are for the named person's use only.  It may contain 
confidential or legally privileged information or both. No confidentiality or 
privilege is waived or lost by any mistransmission.  If you have received this 
correspondence in error please immediately delete it from your system and 
notify the sender. Any views expressed in this message are those of the 
individual sender, except where the sender expressly, and with authority, 
states them to be the views of RFI. Please note that emails to and from 
individual recipients at RFI may be monitored as a part of our ongoing 
infrastructure management process. All emails and attachments sent to and from 
this server are scanned for viruses using McAfee VirusScan but due to the 
dynamics of computer viruses, we are unable to guarantee that emails are virus 
free
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] About stable network interface names

2017-05-28 Thread Cesare Leonardi

Hello, I've some dubts related to predictable network interface names.

If I understand correctly the reference document about this topic is:
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Take this paragraph from that document:
-
We believe it is a good default choice to generalize the scheme 
pioneered by "biosdevname". Assigning fixed names based on 
firmware/topology/location information has the big advantage that the 
names are fully automatic, fully predictable, that they stay fixed even 
if hardware is added or removed (i.e. no reenumeration takes place) and 
that broken hardware can be replaced seamlessly.

-

And this one:
-
Stable interface names even when hardware is added or removed, i.e. no 
re-enumeration takes place (to the level the firmware permits this).

-

They say that no re-enumeration take place if hardware is added or 
removed, with the last quote that puts a depends on firmware.


I ask because I've done several tests, with different motherboards, 
adding and removing PCI-express cards and that expectation was not 
satisfied in many cases.


For example, in one of those tests I initially had this setup:
Integrated NIC: enp9s0
PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
PCIE2 (x16): empty
PCIE3 (x1): dual port ethernet card [enp7s0, enp8s0]

Then i inserted a SATA controller in the PCIE2 slot and three NICs got 
renamed:

Integrated NIC: enp10s0
PCIE1 (x1): dual port ethernet card [enp3s0, enp4s0]
PCIE2 (x16): empty
PCIE3 (x1): dual port ethernet card [enp8s0, enp9s0]

Why?
Didn't this interface naming scheme supposed to avoid this kind of renaming?
From what i've experimented network names are guaranteed to be stable 
across reboots *and* if you doesn't add or remove hardware.


Please, can you clarify on this?

Cesare.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] pid namespaces, systemd and signals on reboot(2)

2017-05-28 Thread Michał Zegan


W dniu 28.05.2017 o 20:43, Mike Gilbert pisze:
> On Sat, May 27, 2017 at 2:51 PM, Michał Zegan
>  wrote:
>> Hello.
>>
>> I came across the following:
>> The manpage reboot(2) says, that inside of a pid namespace, a reboot
>> call that normally would trigger restart actually triggers sending
>> sighup to the init of a namespace, and sigint is sent in case of
>> halt/poweroff.
>> I have verified that reboot actually triggers sighup. does it mean you
>> cannot "reboot -f" in a pid namespace, because it will actually trigger
>> something like "systemctl daemon-reload"? (confusing behavior)...
>> About poweroff, I used unshare -Upfr and then typed poweroff -f, and the
>> bash started by unshare exited. Bash does not exit on sigint, so not
>> sure what was sent? sigkill?
>> Also, how does systemd handle this case when you tell systemd to power
>> off/reboot? it probably exits instead of calling reboot(2), but does it
>> make it possible to distinguish reboot from power off?
>> Sorry for such an partially offtopic question.
> 
> I think that section of reboot(2) is inaccurate. I don't see any
> trappable signal actually being sent to the init process.
> 
> What actually seems to happen is this:
> 
> - All processes in the PID namespace are terminated by the kernel (SIGKILL?).
> - The exit status on the "init" process is set so that it appears to
> have been killed using SIGHUP or SIGINT. The parent process can use
> this to distinguish between a reboot and a halt request.
> 

Oooh, well, it seems you are probably right.
Tested by setting a trap on bash level (bash is pidns pid1), and sending
it sighup. It didn't kill it, but reboot -f did kill it as though sighup
would happen, but without actually sending sighup (trap not called).
Someone could verify that, and knowing how systemd handles
reboot/poweroff in pidns is still interesting to me.



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Group of temporary but related units?

2017-05-28 Thread Benno Fünfstück
Hey list,

what would be a good way to manage temporary development environments with
systemd? For example, if I quickly want to spawn up an environment where my
service + perhaps some db or a queue or some other services are running. It
would be nice to reuse systemd's service management capabiltiies for this.
Or should I really write two sets of unit files for my services, one for
spinning up a testing / development environment using some other
supervision suite + another one for deployment with systemd?

Perhaps there is a more lightweight alternative of systemd-nspawn, that
doesn't require root and doesn't replace the file system?

Kind regards,
Benno
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel