Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

stage1: mask systemd output #690

Closed
jonboulle opened this issue Mar 27, 2015 · 12 comments
Closed

stage1: mask systemd output #690

jonboulle opened this issue Mar 27, 2015 · 12 comments
Assignees
Milestone

Comments

@jonboulle
Copy link
Contributor

When running rkt without the --debug flag, we should not see all this on stdout:

Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Unmounting file systems.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/pts.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/shm.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/sys.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/proc.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/console.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/tty.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/urandom.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/random.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/full.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/zero.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/pts.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/shm.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/sys.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/proc.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/console.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/tty.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/urandom.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/random.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/full.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/zero.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/dev/null.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/dev/null.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/db.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/db.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs/db.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs/db.
Unmounting /proc/sys/kernel/random/boot_id.
Unmounting /opt/stage2/sha512-3ab70b05b72133592ca5d9034981f854/rootfs.
Unmounting /opt/stage2/sha512-3930490f1ec99cfc49f2b19d6cec3d1f/rootfs.
All filesystems unmounted.
Halting system.

A long time back we succeeded in eliminating all the pre-application-start output; we should do the same for the shutdown info as well.

@jonboulle
Copy link
Contributor Author

@vcaputo @alban any ideas on this?

@alban
Copy link
Member

alban commented Mar 31, 2015

Not sure what's the best way to hide the umounts.

log_info("Unmounting %s.", m->path);

There are some signals to increase the logs (SIGRTMIN+22, SIGRTMIN+23) but not to reduce them and some signals to change the target of the logs (SIGRTMIN+26, SIGRTMIN+27, SIGRTMIN+28, SIGRTMIN+29). Maybe if the logs are removed from the "console" target when it is shutting down?

@vcaputo
Copy link
Contributor

vcaputo commented Apr 1, 2015

patch in usr_from_src? usr_from_coreos... sigh.

@alban
Copy link
Member

alban commented Apr 13, 2015

@jonboulle
Copy link
Contributor Author

👍

On Mon, Apr 13, 2015 at 5:18 AM, Alban notifications@github.com wrote:

I asked feedback on
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030685.html


Reply to this email directly or view it on GitHub
#690 (comment).

@jonboulle jonboulle added this to the v0.7.0 milestone May 20, 2015
@jonboulle
Copy link
Contributor Author

@alban what ended up happening here?

@alban
Copy link
Member

alban commented Jun 17, 2015

@jonboulle : I think nothing happened, I didn't work more on it.

@iaguis
Copy link
Member

iaguis commented Jun 17, 2015

We don't get this anymore:

> sudo rkt --insecure-skip-verify run docker://busybox
rkt: found image in local store, skipping fetching from docker://busybox
2015/06/17 12:38:21 Preparing stage1
2015/06/17 12:38:22 Loading image sha512-e17fc826c76437429a085f2c276d3feb4312dd67f57390cefaf582739e8c8c19
2015/06/17 12:38:22 Writing pod manifest
2015/06/17 12:38:22 Setting up stage1
2015/06/17 12:38:22 Writing image manifest
2015/06/17 12:38:22 Wrote filesystem to /var/lib/rkt/pods/run/10b74c16-28ca-4e6b-9d5c-3f8ef190ac0c
2015/06/17 12:38:22 Writing image manifest
2015/06/17 12:38:22 Pivoting to filesystem /var/lib/rkt/pods/run/10b74c16-28ca-4e6b-9d5c-3f8ef190ac0c
2015/06/17 12:38:22 Execing /init
/etc/localtime is not a symlink, not updating container timezone.
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Halting system.

@jonboulle
Copy link
Contributor Author

cool, would be great to eliminate these last ones if possible:

/etc/localtime is not a symlink, not updating container timezone.
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Halting system.

@iaguis
Copy link
Member

iaguis commented Jun 18, 2015

#1069 can remove the last three.

The first one is printed by systemd-nspawn in warning level and the --quiet option doesn't cover this.

As a workaround, starting rkt with SYSTEMD_LOG_LEVEL=err plus #1069 suppresses all output:

> sudo SYSTEMD_LOG_LEVEL=err rkt --insecure-skip-verify run docker://busybox
rkt: found image in local store, skipping fetching from docker://busybox
2015/06/18 16:36:00 Preparing stage1
2015/06/18 16:36:00 Loading image sha512-9d710100ce6769569b12a39100318bfed5b6b98115ee6315b724c11658db3751
2015/06/18 16:36:00 Writing pod manifest
2015/06/18 16:36:00 Setting up stage1
2015/06/18 16:36:00 Writing image manifest
2015/06/18 16:36:00 Wrote filesystem to /var/lib/rkt/pods/run/f0702f7e-e233-4b30-9e75-86125aa8b6d1
2015/06/18 16:36:00 Writing image manifest
2015/06/18 16:36:00 Pivoting to filesystem /var/lib/rkt/pods/run/f0702f7e-e233-4b30-9e75-86125aa8b6d1
2015/06/18 16:36:00 Execing /init
>

@jonboulle
Copy link
Contributor Author

@iaguis should we make SYSTEMD_LOG_LEVEL=err the default?

@iaguis
Copy link
Member

iaguis commented Jul 1, 2015

I think so, if something's wrong the user can always use --debug to get the messages. #1093

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants