From 447049070a56796bad0b6f8fe3da4760169e8885 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 7 Aug 2018 15:19:07 +0200 Subject: [PATCH] Set kernel logging to 'quiet' in AIOs Currently the default CentOS value is to set printk to 7 4 1 7, showing up all the DEBUG messages. OpenSUSE Leap 42.3 is using 1 4 1 7, while Ubuntu is using 4 4 1 7. This patch changes the default console_loglevel to 4 in AIOs to only print KERN_WARNING, KERN_ERR, KERN_CRIT, and KERN_ALERT, as this seems the best balance of reducing logging IO while still exposing relevant errors in tests. This patch also ensures users are aware that centos have a higher level of kernel logging by default, so they can take their own decisions about it. Change-Id: I4ceb5b7d436b258656b0193dd5e2ef3efb44f592 --- deploy-guide/source/targethosts-prepare.rst | 7 +++++++ .../bootstrap-host/templates/user_variables.aio.yml.j2 | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/deploy-guide/source/targethosts-prepare.rst b/deploy-guide/source/targethosts-prepare.rst index 78b9b2c92b..a7864ee65f 100644 --- a/deploy-guide/source/targethosts-prepare.rst +++ b/deploy-guide/source/targethosts-prepare.rst @@ -119,6 +119,13 @@ Configure CentOS # systemctl enable ntpd.service # systemctl start ntpd.service +#. (Optional) Reduce the kernel log level by changing the printk + value in your sysctls: + + .. code-block:: shell-session + + # echo "kernel.printk='4 1 7 4'" >> /etc/sysctl.conf + #. Reboot the host to activate the changes and use the new kernel. diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 0f5d48700e..75bd997910 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -188,6 +188,12 @@ repo_build_pip_extra_indexes: - "{{ _pypi_wheel_mirror.stdout_lines[1] }}" {% endif %} +# Set all the distros to the same value: a "quiet" print +# of kernel log messages. +openstack_user_kernel_options: + - key: 'kernel.printk' + value: '4 1 7 4' + {% raw %} # We now have access to the branchname in testing variables. findgitreview: