Commit graph

15300 commits

Author SHA1 Message Date
Lennart Poettering cdb2b9d05a nspawn: restore journal directory is empty check
This undoes part of commit e6a4a517be.

Instead of removing the error message about non-empty journal bind mount
directories, simply downgrade the message to a warning and proceed.
2014-05-22 15:21:01 +09:00
Lennart Poettering 97c52b838b update TODO 2014-05-22 12:16:25 +09:00
Lennart Poettering 9a05490933 cgroups: simplify CPUQuota= logic
Only accept cpu quota values in percentages, get rid of period
definition.

It's not clear whether the CFS period controllable per-cgroup even has a
future in the kernel, hence let's simplify all this, hardcode the period
to 100ms and only accept percentage based quota values.
2014-05-22 11:53:12 +09:00
Lennart Poettering 609e002e78 time-util: make sure USEC_PER_SEC and friends are actually of type usec_t 2014-05-22 11:44:03 +09:00
Lennart Poettering 558c6490b1 logind: also escape external data when saving to /run
Better be safe than sorry...
2014-05-22 10:36:16 +09:00
Lennart Poettering eaa3b74dfd update TODO 2014-05-22 10:36:16 +09:00
Lennart Poettering ca5405bb4f machine: escape fields we store in /run, so that they can be properly unescaped by parse_env_file() 2014-05-22 10:36:16 +09:00
Kay Sievers 5052e3996d build-sys: let libsystemd_network pull in libudev-internal.la
On Thu, May 22, 2014 at 9:53 AM, Jan Engelhardt <jengelh@inai.de> wrote:
>
> If libsystemd-network.la is relying on that udev function, it ought
> to specify libudev(-internal).la in libsystemd_network_la_LIBADD.
2014-05-22 10:19:07 +09:00
Djalal Harouni e6a4a517be nspawn: allow to bind mount journal on top of a non empty container journal dentry
Currently if nspawn was called with --link-journal=host or
--link-journal=auto and the right /var/log/journal/machine-id/ exists
then the bind mount the subdirectory into the container might fail due
to the ~/mycontainer/var/log/journal/machine-id/ of the container not
being empty.

There is no reason to check if the container journal subdir is empty
since there will be a bind mount on top of it. The user asked for a bind
mount so give it.

Note: a next call with --link-journal=guest may fail due to the
/var/log/journal/machine-id/ on the host not being empty.

https://bugs.freedesktop.org/show_bug.cgi?id=76193

Reported-by: Tobias Hunger <tobias.hunger@gmail.com>
2014-05-22 09:55:23 +09:00
Kay Sievers 2f14583f47 build-sys: do not run symbol list export test for compat-only libs
The verbose link-time deprecation warnings are annoying. These libs
will never change or be extended; there is no need to test the list
of exported symbols.
2014-05-22 09:46:09 +09:00
Kay Sievers ffcf82d250 build-sys: fix linking order
./.libs/libsystemd-network.a(libsystemd_network_la-network-internal.o):
  network-internal.c:function net_get_unique_predictable_data:
  error: undefined reference to 'udev_device_get_property_value'
collect2: error: ld returned 1 exit status
2014-05-22 09:46:09 +09:00
Kay Sievers 5590bbe529 Makefile.am: fix whitespace 2014-05-22 09:46:09 +09:00
Jan Engelhardt f884afb206 build: put missing KMOD_CFLAGS into Makefile
The build fails if kmod is not in a default location.
2014-05-22 09:27:26 +09:00
Kay Sievers 52ffb444cb timesyncd: order after tmpfiles to get a working network monitor 2014-05-22 07:57:33 +09:00
Lennart Poettering 637f421e5c cgroups: always propagate controller membership to siblings, for all controllers
This is the behaviour the kernel cgroup rework exposes for all
controllers, hence let's do this already now for all cases.
2014-05-22 07:50:03 +09:00
Lennart Poettering db785129c9 cgroup: rework startup logic
Introduce a (unsigned long) -1 as "unset" state for cpu shares/block io
weights, and keep the startup unit set around all the time.
2014-05-22 07:13:56 +09:00
WaLyong Cho 95ae05c0e7 core: add startup resource control option
Similar to CPUShares= and BlockIOWeight= respectively. However only
assign the specified weight during startup. Each control group
attribute is re-assigned as weight by CPUShares=weight and
BlockIOWeight=weight after startup.  If not CPUShares= or
BlockIOWeight= be specified, then the attribute is re-assigned to each
default attribute value. (default cpu.shares=1024, blkio.weight=1000)
If only CPUShares=weight or BlockIOWeight=weight be specified, then
that implies StartupCPUShares=weight and StartupBlockIOWeight=weight.
2014-05-22 07:13:56 +09:00
Kay Sievers 7e4f9431ca Revert "update gitignore"
This reverts commit 351efdc7a4.
2014-05-22 06:14:41 +09:00
Tom Gundersen 424a873214 sd-dhcp-client: factor out dhcp packet allocation 2014-05-21 16:55:47 +02:00
Tom Gundersen 23289745d7 sd-dhcp: rely on FIONREAD working
This fallback will anyway never get tested, so rip it out.
2014-05-21 16:31:28 +02:00
Tom Gundersen 04b28be1a3 sd-dhcp: option_append - support falling back to 'sname' and 'file' 2014-05-21 16:09:05 +02:00
Tom Gundersen 2688ef60de sd-dhcp: make sure we can not fill options so much that there is no space for END 2014-05-21 15:27:53 +02:00
Tom Gundersen f5602be9da networkd: link - serialize link when addresses change
Thanks to Kay for tracking this down.
2014-05-21 11:32:03 +02:00
Kay Sievers 351efdc7a4 update gitignore 2014-05-21 18:21:02 +09:00
Kay Sievers 7ba52a1283 hwdb: update 2014-05-21 18:19:24 +09:00
Lennart Poettering 359a06aae9 util: fix a gcc compiler warning 2014-05-21 17:44:45 +09:00
Kay Sievers a6cb8f870d timesyncd: use STR_IN_SET() 2014-05-21 10:36:02 +09:00
Lennart Poettering a57a27b2ef timesyncd: fix english language typo 2014-05-21 09:36:49 +09:00
Lennart Poettering f7dc3ab9f4 logind: don't apply RemoveIPC= to system users
We shouldn't destroy IPC objects of system users on logout.

http://lists.freedesktop.org/archives/systemd-devel/2014-April/018373.html

This introduces SYSTEM_UID_MAX defined to the maximum UID of system
users. This value is determined compile-time, either as configure switch
or from /etc/login.defs. (We don't read that file at runtime, since this
is really a choice for a system builder, not the end user.)

While we are at it we then also update journald to use SYSTEM_UID_MAX
when we decide whether to split out log data for a specific client.
2014-05-21 09:36:49 +09:00
Tom Gundersen f5c0c00f40 dhcp-lease: add support for parsing a few more dhcp options 2014-05-20 23:31:22 +02:00
Tom Gundersen e140ae58f1 dhcp-lease: refactor lease parsing
Use helper functions, and add some more sanity checking/asserts.
2014-05-20 23:31:22 +02:00
Tom Gundersen 32008a9636 sd-dhcp: refactor parse_options
Similar to the previous patch, exchange a length and a pointer with only one offset variable.
Also fix the type of the options to be uint8_t[], rather than uint8_t*.
2014-05-20 23:31:22 +02:00
Tom Gundersen 20b958bf15 sd-dhcp: refactor dhcp_option_append
Store a pointer to the options in the DHCPMessage struct, and pass
this together with an offset around, rather than a uint8_t**.

This avoids us having to (re)compute the pointer; and changes
dhcp_option_append from adjusting both the pointer to the next
option and the remaining size of the options, to just adjusting
the current offset.

This makes the code a bit simpler to follow IMHO, but there should
be no functional change.
2014-05-20 23:31:22 +02:00
Lennart Poettering ece6e766cf timesyncd: save clock to disk everytime we get an NTP fix, and bump clock at boot using this
This is useful to make sure the system clock stays monotonic even on
systems that lack an RTC.

Also, why we are at it, also use the systemd release time for bumping
the clock, since it's a slightly less bad than starting with jan 1st,
1970.

This also moves timesyncd into the early bootphase, in order to make
sure this initial bump is guaranteed to have finished by the time we
start real daemons which might write to the file systemd and thus
shouldn't leave 1970's timestamps all over the place...
2014-05-21 00:23:39 +09:00
Harald Hoyer 83be2c3985 udevadm-settle: fixed return code for empty queue
If the udev queue is empty and "/run/udev/queue" does not exist,
"udevadm settle" would return with EXIT_FAILURE, because the inotify on
"/run/udev/queue" would fail with ENOENT.

This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case.
2014-05-20 12:25:16 +02:00
Susant Sahani 8477107dec TODO
IFLA_IPTUN_PMTUDISC
IFLA_IPTUN_FLAGS (ISA_TAP)

FLA_IPTUN_6RD_PREFIX
FLA_IPTUN_6RD_RELAY_PREFIX
IFLA_IPTUN_6RD_PREFIXLEN
IFLA_IPTUN_6RD_RELAY_PREFIXLEN
2014-05-19 22:58:15 +02:00
Susant Sahani abf446af60 networkd: introduce sit tunnel
This patch introduces sit tunnel support to networkd

Example conf:
file: sit.netdev

[NetDev]
Name=sit-tun
Kind=sit
MTUBytes=1480

[Tunnel]
Local=10.65.223.238
Remote=10.65.223.239

file: sit.network

[Match]
Name=em1

[Network]
Tunnel=sit-tun

[tomegun: rebased]
2014-05-19 22:50:23 +02:00
Tom Gundersen 473dfd7bd5 networkd-wait-online: wait for addresses to be configured 2014-05-19 22:00:35 +02:00
Tom Gundersen e56f363803 timesyncd: only attempt to connect when an address is configured
For now, we accept both link-local and routable addresses, maybe we want to
restrict ourselves to routable addresses only.
2014-05-19 20:54:42 +02:00
Tom Gundersen e375dcde72 networkd/sd-network: extend operational states
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
2014-05-19 20:44:21 +02:00
Tom Gundersen bcb7a07e0a networkd/sd-network: expose statically configured NTP servers 2014-05-19 18:42:14 +02:00
Tom Gundersen d408b50681 networkd: fixup static DNS serialization 2014-05-19 18:14:56 +02:00
Tom Gundersen 81d98a39eb sd-dhcp-lease/sd-network: modernization and fix leak 2014-05-19 18:14:56 +02:00
Tom Gundersen 091a364c80 resolved: add daemon to manage resolv.conf
Also remove the equivalent functionality from networkd.
2014-05-19 18:14:56 +02:00
Tom Gundersen 7dbf94a9c4 sd-network: expose DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen 7374f9d87c networkd: link - serialize DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen 09bee74d7a sd-dhcp-lease: move in_addr (de)serialization to shared network code 2014-05-19 18:14:56 +02:00
Lennart Poettering a077b666cb sd-login: add C API to query primary session of a user 2014-05-19 09:33:20 +09:00
Lennart Poettering 952d32609f logind: fix Display property of user objects
When we dropped support for creating a per-user to the "main" X11
display we stopped returning useful data in the "Display" user property.
With this change this is fixed and we again expose an appropriate
(graphical session) in the property that is useful as the "main" one, if
one is needed.
2014-05-19 09:03:20 +09:00
Evan Nemerson 2be6107255 gudev: add missing (nullable) annotations on return values 2014-05-18 18:58:40 +02:00