Bug 1598879

Summary: Typo in NIC config causes meaningless error message
Product: Red Hat OpenStack Reporter: Ian Pilcher <ipilcher>
Component: openstack-tripleo-heat-templatesAssignee: Harald Jensås <hjensas>
Status: CLOSED DUPLICATE QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: aschultz, bfournie, mburns
Target Milestone: Upstream M1Keywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-17 19:12:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Malformed NIC config file none

Description Ian Pilcher 2018-07-06 17:44:45 UTC
Created attachment 1457058 [details]
Malformed NIC config file

Attempting to deploy with an improper NIC config file gives the following error message:

Started Mistral Workflow tripleo.validations.v1.check_pre_deployment_validations. Execution ID: 22525591-df41-49af-97cb-c6651438f9e9
Waiting for messages on queue 'tripleo' with no timeout.
Creating Swift container to store the plan
Creating plan from template files in: /tmp/tripleoclient-3eSH8z/tripleo-heat-templates
Started Mistral Workflow tripleo.plan_management.v1.create_deployment_plan. Execution ID: 16e7c825-e4f6-41ed-825c-5ab1e82255ee
Plan created.
Processing templates in the directory /tmp/tripleoclient-3eSH8z/tripleo-heat-templates
Action tripleo.parameters.update execution failed: Error validating environment for plan overcloud: ERROR: Internal Error

The actual error message is in heat-engine.log:

Error: Error parsing template http://192.168.19.1:8080/v1/AUTH_b3b3d52e338147b3a77864221eb23621/overcloud/user-files/home/stack/templates/nic-configs/ceph-storage.yaml wh
ile parsing a block mapping
  in "<unicode string>", line 1, column 1:
    heat_template_version: pike
    ^
expected <block end>, but found '<block mapping start>'
  in "<unicode string>", line 125, column 3:
      ControlPlane2NetCidr:
      ^

Unfortunately, there is absolutely nothing to tell the administrator to look at heat-engine.log.  I was only able to figure it out because I stumbled on https://bugzilla.redhat.com/show_bug.cgi?id=1547149

Comment 1 Bob Fournier 2018-09-10 23:09:00 UTC
This looks to be a problem with the formatting in the Parameters section:
rontrolPlaneNetCidr:
    default: ''
    description: foo
    type: string

I think with the jinja changes and the use of network_data.yaml to generate the nic config files the issue of a typo in the parameters section largely goes, including for multiple https://review.openstack.org/#/c/582180/.  

I'd suggest we either close this as fixed with these jinja changes or define a separate  validation that would be useful for checking general nic config validity.

Comment 2 Bob Fournier 2018-09-17 00:41:21 UTC
Since this was due to manually entering the parameters for Spine/Leaf, and that is no longer needed with of the fixes in https://review.openstack.org/#/c/582180/ we're targeting that bug to this fix.

Comment 6 Bob Fournier 2018-12-17 19:12:10 UTC
Since this fix requires multiple changes to minimize the amount of spine/leaf configuration that needs to be done marking this as a duplicate of the RFE that has those changes.

*** This bug has been marked as a duplicate of bug 1601576 ***