The unmount occurs after the pivot_root, so the path used to unmount
should take into account the new root directory. This will allow the
umount to actually succeed.
(cherry picked from commit 23f25b1496)
We always read system uptime before log start time. So the uptime
should be always smaller number, except it includes system suspend
time. It seems better to ask for --rel and exit() than try to be
smart and try to recovery from this situation or generate huge
messy graphs.
(cherry picked from commit 9a6f36c08f)
* systemd-bootchart always parses /proc/uptime, although the
information is unnecessary when --rel specified
* use /proc/uptime is overkill, since Linux 2.6.39 we have
clock_gettime(CLOCK_BOOTTIME, ...). The backend on kernel side is
get_monotonic_boottime() in both cases.
* main() uses "if (graph_start <= 0.0)" to detect that /proc is
available.
This is fragile solution as graph_start is always smaller than zero
on all systems after suspend/resume (e.g. laptops), because in this
case the system uptime includes suspend time and uptime is always
greater number than monotonic time. For example right now difference
between uptime and monotonic time is 37 hours on my laptop.
Note that main() calls log_uptime() (to parse /proc/uptime) for each
sample when it believes that /proc is not available. So on my laptop
systemd-boochars spends all live with /proc/uptime parsing +
nanosleep(), try
strace /usr/lib/systemd/systemd-bootchart
to see the never ending loop.
This patch uses access("/proc/vmstat", F_OK) to detect procfs.
(cherry picked from commit c358d728e7)
All tests for compiler support were failing with:
/usr/bin/ld: /tmp/ccwnVc2A.o: relocation R_ARM_MOVW_ABS_NC against `a' can not be used when making a shared object; recompile with -fPIC
(cherry picked from commit 0943f4b7b2)
When the state restore is disabled, we would print:
"Unknown verb: load" instead of simply skipping loading the
state.
(cherry picked from commit b76388e123)
Upstream commit:
commit e8206972be
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Tue Sep 2 14:29:51 2014 +0200
timesyncd: allow two missed replies before reselecting server
After receiving a reply from the server, allow two missed replies before
switching to another server to avoid unnecessary clock hopping when
packets are getting lost in the network.
Conflicts:
src/timesync/timesyncd-manager.c
Upstream commit:
commit 63463bf091
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed Aug 27 16:47:24 2014 +0200
timesyncd: wait before reconnecting to first server
When all servers are exhausted, wait for one poll interval before trying
to connect again to the first server in the list. Also, keep increasing
the polling interval to make sure a client not getting any valid replies
will not send requests to any server more frequently than is allowed by
the maximum polling interval.
Conflicts:
src/timesync/timesyncd-manager.c
Upstream commit:
commit 3af0442c52
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed Aug 27 16:47:20 2014 +0200
timesyncd: check root distance
NTPv4 servers don't reply with unsynchronized status when they lost
synchronization, they only keep increasing the root dispersion and it's
up to the client to decide at which point they no longer consider it
synchronized.
Ignore replies with root distance over 5 seconds.
Upstream commit:
commit 73c76e6330
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed Aug 27 16:47:18 2014 +0200
timesyncd: fix calculation of transmit time
The kernel timestamp (recv_time) is made earlier than current time
(now_ts), use the timestamp captured before sending packet directly.
Upstream commit:
commit 6a5c7b7e41
Author: Lennart Poettering <lennart@poettering.net>
Date: Sun Aug 10 23:40:48 2014 +0200
timesyncd: always use CLOCK_BOOTTIME if we can
After all we want to compare a monotonically increasing clock with the
remote clock, hence we shouldn't ignore system suspend periods.
Upstream commit:
commit 77ff2de999
Author: Tom Gundersen <teg@jklm.no>
Date: Thu Jul 24 18:36:37 2014 +0200
time-util: add clock_boottime_or_monotonic
CLOCK_BOOTTIME is not supported by timerfd on older kernels, so for the time beeing,
use this helper instead which will fallback to CLOCK_MONOTONIC if CLOCK_BOOTTIME is
not supported.
Conflicts:
src/shared/time-util.c
src/shared/time-util.h
Upstream commit:
commit a854881616
Author: Tom Gundersen <teg@jklm.no>
Date: Thu Jul 24 16:08:07 2014 +0200
sd-event: add support for CLOCK_BOOTTIME
This requires a very recent kernel (3.15), so care should be taken
when using this functionality.
It seems the return code of systemctl daemon-reload can be !=0 in some
circumstances, which causes a failure of the unit and breaks booting in
the initrd.
(cherry picked from commit f3b8fbb1da)
The check, if the directory/file already exists is only executed, if
there is a symlink target specified. In case of "/root", there is none,
so it is unconditionally tried to create the directory.
In case of a readonly filesystem, errno != EEXIST, but errno == EROFS,
so base_filesystem_create() and switch_root does not succeed.
This patch checks for existance not only in the symlink case.
(cherry picked from commit 6f4f8056d3)
Also, fix fopen_temporary_label to set proper context. By chance,
all users so far used the same context, so the error didn't matter.
Also, check return value from label_init().
https://bugzilla.redhat.com/show_bug.cgi?id=1121806
(cherry picked from commit 9f1c19405a)
A system that is running on a logical partition (LPAR) provided by
PR/SM has access to physical hardware (except CPU). It is true that
PR/SM abstracts the hardware, but only for sharing purposes.
Details are statet at:
http://publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eicaz/eicazzlpar.htm
-->--
In other words, PR/SM transforms physical resources into virtual resources so
that many logical partitions can share the same physical resources.
--<--
Still, from the OS point of view, the shared virtual resource is real
hardware. ConditionVirtualization must be set to false if the OS runs
directly on PR/SM (e.g. in an LPAR).
[zj: reorder code so that variables are not allocated when #if-def is
false. Add commit message.]
(cherry picked from commit f41925b4e4)
The sleep(10) in test-journal-send is quite aggressive. We need it only
for the journal to get our cgroup information. But even that information
is not vital to the test, so a sleep(1) should be just fine.
(cherry picked from commit 037ee337f0)
The conditional for detection xen virtualization contained a little mistake.
It is checking for i to be empty: 'if (!i) {', but it must check for cap instead,
because: 'cap = strsep(&i, ",")' will set cap to the discovered value and i to
the next value after the separator.
Hence, i would be empty, if there is only control_d in domcap, leading to a wrong
domU detection.
https://bugs.freedesktop.org/show_bug.cgi?id=77271
(cherry picked from commit a71516dfd1)
For pluggable ttys such as USB serial devices, the getty is restarted
and exits in a loop until the remove event reaches systemd. Under
certain circumstances the restart loop can overload the system in a
way that prevents the remove event from reaching systemd for a long
time (e.g. at least several minutes on a small embedded system).
Use the default RestartSec to prevent the restart loop from
overloading the system. Serial gettys are interactive units, so
waiting an extra 100ms really doesn't make a difference anyways
compared to the time it takes the user to log in.
(cherry picked from commit 4bf04322b8)
If a file was opened for writing, and then closed immediately without
actually writing any entries, on subsequent opening, it would be
considered "corrupted". This should be totally fine, and even in
read mode, an empty file can become non-empty later on.
(cherry picked from commit b3306e9c3c)
On Tue, Jul 15, 2014 at 1:52 PM, Alick Zhao <alick9188@gmail.com> wrote:
>>>
>>> So maybe ID_SOFTWARE_RADIO ?
>>
>> Hmm, SDR is more a term for a generic technology than for a device
>> class. To me it does not really sound like an administrator would know
>> what this is.
>>
>> What exactly is the device or subsystem you want to make accessible to
>> locally logged-in users only?
>
> Initially it is bladeRF, but many more are of interest: USRP, rtl-sdr,
> HackRF, ... [1]
>
> I agree an administrator might not know what SDR is, since it is
> currently still not widely known, and makes sense only for amateurs
> and researchers. But as a SDR fan, I see many new SDR peripherals
> are created recently, and expect to see more. So a generic ID seems
> reasonable to me.
>
> [1] http://en.wikipedia.org/wiki/List_of_software-defined_radios
(cherry picked from commit 30632d97d9)
This reverts previous commit and applies a different fix.
manager_clock_watch() callback calls manager_send_request() to kick
off a resync. We can only do that when we're actually connected to
something. It is not useful to setup the callback from manager_new().
Now the callback will be dropped in manager_connect() and requested
in manager_begin().
https://bugs.freedesktop.org/show_bug.cgi?id=80932
(cherry picked from commit c566ee3253)
We will happily use bridges/bonds as master devices, but we will not change their settings if they were created by
someone else.
(cherry picked from commit 7c1cff4ff7)
Turns out, making strings shell-proof is harder than expected:
# machinectl set-hostname "foo|poweroff" && . /etc/machine-info
(This could be simplified by quoting *and* escaping all characters,
which is harmless in shell but unnecessary.)
(cherry picked from commit 0ce5a80601)
We already encourage upstreams to keep the default configuration
separate from user customizations for software that is installed in
the system location. Let's allow that separation also for software
that is installed in the home directory.
Some discussion:
http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/19627
(cherry picked from commit 667a1cd645)
For the non-root user sysusers uses nologin as the default shell, not
login. Correct the documentation to match the code.
(cherry picked from commit eb34cba763)