[systemd-commits] 3 commits - TODO src/journal src/shared src/systemctl src/udev units/systemd-journal-gatewayd.service.in units/systemd-journal-upload.service.in units/systemd-journald.service.in
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Jan 7 18:21:44 PST 2015
TODO | 2 +-
src/journal/journalctl.c | 5 +++++
src/shared/util.h | 2 ++
src/systemctl/systemctl.c | 5 +++++
src/udev/udevadm-settle.c | 19 +++++++++++++++----
units/systemd-journal-gatewayd.service.in | 4 ++++
units/systemd-journal-upload.service.in | 4 ++++
units/systemd-journald.service.in | 4 +++-
8 files changed, 39 insertions(+), 6 deletions(-)
New commits:
commit 92ff080be100aff15f292e2631921131c610afe7
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jan 8 03:20:10 2015 +0100
update TODO
diff --git a/TODO b/TODO
index df59baf..ee682c0 100644
--- a/TODO
+++ b/TODO
@@ -47,7 +47,7 @@ Features:
* nspawn: don't change superblock mount options from nspawn for cgroup hierarchies
-* "machinectl list-images" should show os-release data
+* "machinectl list-images" should show os-release data, as well as machine-info data (including deployment level)
* nspawn: when start a container "foobar" look for its configuration in a file "foobar.nspawn" in /etc/systemd/nspawn/ as well as next to the actualy directory or image to boot
commit de45d726034f33afdb0a185e62fc61bf10a0acd2
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jan 8 03:17:50 2015 +0100
journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
When there are a lot of split out journal files, we might run out of fds
quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible.
Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K,
the hard at 4K by default for normal user processes, this code hence
bumps this up for users to 4K.
https://bugzilla.redhat.com/show_bug.cgi?id=1179980
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 62931f1..db9576c 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1722,6 +1722,11 @@ int main(int argc, char *argv[]) {
signal(SIGWINCH, columns_lines_cache_reset);
sigbus_install();
+ /* Increase max number of open files to 16K if we can, we
+ * might needs this when browsing journal files, which might
+ * be split up into many files. */
+ setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
+
if (arg_action == ACTION_NEW_ID128) {
r = generate_new_id128();
goto finish;
diff --git a/src/shared/util.h b/src/shared/util.h
index 31103e9..3b3035a 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -1074,3 +1074,5 @@ int same_fd(int a, int b);
int chattr_fd(int fd, bool b, int mask);
int chattr_path(const char *p, bool b, int mask);
+
+#define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim })
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 6795414..86b5ae0 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7409,6 +7409,11 @@ int main(int argc, char*argv[]) {
goto finish;
}
+ /* Increase max number of open files to 16K if we can, we
+ * might needs this when browsing journal files, which might
+ * be split up into many files. */
+ setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
+
if (!avoid_bus())
r = bus_open_transport_systemd(arg_transport, arg_host, arg_scope != UNIT_FILE_SYSTEM, &bus);
diff --git a/units/systemd-journal-gatewayd.service.in b/units/systemd-journal-gatewayd.service.in
index 5bd8e4b..987220e 100644
--- a/units/systemd-journal-gatewayd.service.in
+++ b/units/systemd-journal-gatewayd.service.in
@@ -20,5 +20,9 @@ PrivateNetwork=yes
ProtectSystem=full
ProtectHome=yes
+# If there are many split upjournal files we need a lot of fds to
+# access them all and combine
+LimitNOFILE=16384
+
[Install]
Also=systemd-journal-gatewayd.socket
diff --git a/units/systemd-journal-upload.service.in b/units/systemd-journal-upload.service.in
index 359ff10..b2e3c76 100644
--- a/units/systemd-journal-upload.service.in
+++ b/units/systemd-journal-upload.service.in
@@ -17,5 +17,9 @@ PrivateTmp=yes
PrivateDevices=yes
WatchdogSec=20min
+# If there are many split up journal files we need a lot of fds to
+# access them all and combine
+LimitNOFILE=16384
+
[Install]
WantedBy=multi-user.target
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index e3eea25..a3540c6 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -26,5 +26,7 @@ WatchdogSec=1min
FileDescriptorStoreMax=1024
# Increase the default a bit in order to allow many simultaneous
-# services being run since we keep one fd open per service.
+# services being run since we keep one fd open per service. Also, when
+# flushing journal files to disk, we might need a lot of fds when many
+# journal files are combined.
LimitNOFILE=16384
commit 2ac23519d04835e8d8dfbce3d08d9ff76db58a68
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jan 8 01:59:58 2015 +0100
udevadm: don't hit an assert when obsolete parameters are passed
https://bugzilla.redhat.com/show_bug.cgi?id=1178051
diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
index 9eab8b2..6bcb3a9 100644
--- a/src/udev/udevadm-settle.c
+++ b/src/udev/udevadm-settle.c
@@ -48,12 +48,12 @@ static void help(void) {
static int adm_settle(struct udev *udev, int argc, char *argv[]) {
static const struct option options[] = {
- { "seq-start", required_argument, NULL, '\0' }, /* removed */
- { "seq-end", required_argument, NULL, '\0' }, /* removed */
{ "timeout", required_argument, NULL, 't' },
{ "exit-if-exists", required_argument, NULL, 'E' },
- { "quiet", no_argument, NULL, 'q' }, /* removed */
{ "help", no_argument, NULL, 'h' },
+ { "seq-start", required_argument, NULL, 's' }, /* removed */
+ { "seq-end", required_argument, NULL, 'e' }, /* removed */
+ { "quiet", no_argument, NULL, 'q' }, /* removed */
{}
};
const char *exists = NULL;
@@ -63,8 +63,9 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) {
struct udev_queue *queue;
int rc = EXIT_FAILURE;
- while ((c = getopt_long(argc, argv, "s:e:t:E:qh", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "t:E:hs:e:q", options, NULL)) >= 0) {
switch (c) {
+
case 't': {
int r;
@@ -76,14 +77,24 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) {
};
break;
}
+
case 'E':
exists = optarg;
break;
+
case 'h':
help();
return EXIT_SUCCESS;
+
+ case 's':
+ case 'e':
+ case 'q':
+ log_info("Option -%c no longer supported.", c);
+ return EXIT_FAILURE;
+
case '?':
return EXIT_FAILURE;
+
default:
assert_not_reached("Unknown argument");
}
More information about the systemd-commits
mailing list