From 09cda5ec9ce930dcb80bcf54e7f72fa08aea8e8f Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 3 Sep 2015 08:25:42 -0400 Subject: [PATCH] Improve logging for VMs to identify IPA issues Since the coreos config drive issue has been solved elsewhere we shall re-use the line to improve our logging so we can have useful configdrive logs. Change-Id: I0e044121e146f3036aa6b1830983dd9d7a68e9ac Depends-On: I76a2a23e2a75022bae3511700c81145b5cbeae77 --- .../tasks/ironic_config.yml | 6 +++--- troubleshooting.rst | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/ironic_config.yml b/playbooks/roles/bifrost-ironic-install/tasks/ironic_config.yml index dfd34b6b2..4a91a055d 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/ironic_config.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/ironic_config.yml @@ -38,9 +38,9 @@ - name: "If not testing, disable debug logging" lineinfile: dest=/etc/ironic/ironic.conf insertafter="[DEFAULT]" regexp='^(.*)debug=(.*)$' line="debug=false" when: testing | bool == false -- name: "For agent, disable coreos.configdrive" - lineinfile: dest=/etc/ironic/ironic.conf insertafter="[agent]" regexp='^(.*)agent_pxe_append_params=(.*)$' line="agent_pxe_append_params=coreos.configdrive=0" -- name: "For agent, disable coreos.configdrive" +- name: "For agent, Log to screen" + lineinfile: dest=/etc/ironic/ironic.conf insertafter="[agent]" regexp='^(.*)agent_pxe_append_params=(.*)$' line="agent_pxe_append_params=systemd.journald.forward_to_console=yes" +- name: "For agent, place agent pxe template" lineinfile: dest=/etc/ironic/ironic.conf insertafter="[agent]" regexp='^(.*)agent_pxe_config_template=(.*)$' line="agent_pxe_config_template=/etc/ironic/agent_config.template" - name: "Configure conductor api url" lineinfile: dest=/etc/ironic/ironic.conf insertafter="[conductor]" regexp='^(.*)api_url=(.*)$' line="api_url=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:6385/" diff --git a/troubleshooting.rst b/troubleshooting.rst index 581d17e7d..6fda2c983 100644 --- a/troubleshooting.rst +++ b/troubleshooting.rst @@ -84,14 +84,21 @@ deployment process. Obtaining IPA logs via the console ================================== -1) By default, in testing mode Bifrost sets the agent journal to be logged - to the console, hover testing mode is geared more towards local Virtual - machine testing. In order to get the IPA agent to at least detail - information to the screen, you will want to set the following setting - in ironic.conf:: +1) By default, Bifrost sets the agent journal to be logged to the system + console. Due to the variation in hardware, you may need to tune the + parameters passed to the deployment ramdisk. This can be done, as shown + below in ironic.conf:: agent_pxe_append_params=nofb nomodeset vga=normal console=ttyS0 systemd.journald.forward_to_console=yes + Parameters will vary by your hardware type and configuration, however the + systemd.journald.forward_to_console=yes setting is a default, and will only + work for systemd based IPA images such as the default CoreOS image. + + The example above, effectively disables all attempts by the Kernel to set + the video mode, defines the console as ttyS0 or the first serial port, and + instructs systemd to direct logs to the console. + 2) Once set, restart the ironic-conductor service, e.g. `service ironic-conductor restart` and attempt to redeploy the node. You will want to view the system console occurring. If possible, you