From ff05c51d404b6ba4950fc6844a500f61abc2c6c1 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 17 Jun 2016 15:35:30 +0100 Subject: [PATCH] Follow-up patch of 8068e1f6d92d22bf25a56b8327c1abd0821b1bcd This is a follow-up patch of 8068e1f6d92d22bf25a56b8327c1abd0821b1bcd addressing the remaining comments after it was merged. The changes are: * Rename the "retrieve_deploy_logs" configuration option to "deploy_logs_collect" to be more consistent with the other related configuration options (they are all prefixed with "deploy_logs") * Remove /proc/cmdline from the files/output to be tar gzipped because the booting cmdline is already printed in the kernel logs. * Extend the file name template to include the file extension and the timestamp format. * Collect the logs at "deploying" state, prior to moving the node to "deploy failed" or "active" provision state. * Fix typos Change-Id: Ib3c1a86916f94507692d09a82d02616215455108 --- .../approved/collect-system-logs-from-ipa.rst | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/specs/approved/collect-system-logs-from-ipa.rst b/specs/approved/collect-system-logs-from-ipa.rst index 906dc63d..e4c491a5 100644 --- a/specs/approved/collect-system-logs-from-ipa.rst +++ b/specs/approved/collect-system-logs-from-ipa.rst @@ -72,7 +72,7 @@ the distros today: The logs from all distributions independent of the init system, will also contain the output of the following commands files: ``ps``, ``df``, -``iptables`` and ``/proc/cmdline``. +and ``iptables``. Changes in Ironic ----------------- @@ -80,9 +80,9 @@ Changes in Ironic New configuration options will be added to Ironic under the ``[agent]`` group: -#. ``retrieve_deploy_logs`` (string): Whether Ironic should retrieve - the deployment logs or not. Valid options are: "always", "on_failure" - or "never". Defaults to "on_failure". +#. ``deploy_logs_collect`` (string): Whether Ironic should collect the + deployment logs or not. Valid options are: "always", "on_failure" or + "never". Defaults to "on_failure". #. ``deploy_logs_storage_backend`` (string): The name of the storage backend where the response file will be stored. One of the two: @@ -111,10 +111,10 @@ group: the operator to configure an external job to do it, if wanted. -Depending on the value of the ``retrieve_deploy_logs`` Ironic will +Depending on the value of the ``deploy_logs_collect`` Ironic will invoke ``log.collect_system_logs`` as part of the deployment of the node (right before powering it off or rebooting). For example, if -``retrieve_deploy_logs`` is set to **always** Ironic will collect the logs +``deploy_logs_collect`` is set to **always** Ironic will collect the logs independently of the deployment being a success or a failure; if it is set to **on_failure** Ironic will collect the logs upon a deployment failure; if it is set to **never**, Ironic never collect the deployment logs. @@ -122,10 +122,10 @@ if it is set to **never**, Ironic never collect the deployment logs. When the logs are collected, Ironic should decode the base64 encoded tar.gz file and store it according to the ``deploy_logs_storage_backend`` configuration. All log objects will be named with the following pattern: -*[_]_*. Note that, ``instance_uuid`` -is not a required field for deploying a node when Ironic is configured -to be used in **standalone** mode so, if present it will be appended to -the name. +*[_]_.tar.gz*. Note +that, ``instance_uuid`` is not a required field for deploying a node when +Ironic is configured to be used in **standalone** mode so, if present +it will be appended to the name. When using Swift, operators can associate the objects in the container with the nodes in Ironic and search for the logs of a specific node @@ -148,7 +148,7 @@ using the ``prefix`` parameter, for example: .. note:: Neither Ironic or IPA will be responsible for sanitizing any logs - before storing them. First because this spec is limited to collectint + before storing them. First because this spec is limited to collecting logs from the deployment only and at this point the tenant won't have used the node yet. Second, the services generating the logs should be responsible for masking secrets in their logs (like we do in Ironic), @@ -228,8 +228,8 @@ None Performance Impact ------------------ -The node will stay a little longer on the ``deploy fail`` or ``deploying`` -provision state while IPA is collecting the logs, if enabled. +The node will stay a little longer in the ``deploying`` provision state +while IPA is collecting the logs, if enabled. Other deployer impact --------------------- @@ -261,9 +261,9 @@ Work Items * Add the new configuration options described in the `Changes in Ironic`_ section. -* Invoke the new ``log.collect_system_logs`` method in IPA when a - deployment fails and store the response file according to the - ``deploy_logs_storage_backend`` configuration option. +* Invoke the new ``log.collect_system_logs`` method in IPA as part + of the deployment and store the response file according to the + ``deploy_logs_storage_backend`` configuration option (if enabled). Dependencies @@ -283,7 +283,7 @@ None. As a note, when using an old IPA ramdisk which does not support the new ``log.collect_system_logs`` command Ironic should handle such exception -and log a warning message to the operator if ``retrieve_deploy_logs`` +and log a warning message to the operator if ``deploy_logs_collect`` is set to **always** or **on_failure**. Documentation Impact