Bug 1767704

Summary: FFU - Controllers Upgrade fails JMESPathError in json_query filter plugin Unexpected token
Product: Red Hat OpenStack Reporter: Mustafa Aydın <maydin>
Component: openstack-tripleo-commonAssignee: Luke Short <lshort>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: amoralej, emacchi, jjoyce, jschluet, jstransk, lshort, maydin, mburns, mgarciac, rrubins, slinaber, tvignaud
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-common-8.7.1-8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-10 11:22:07 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
post-deploy.yaml none

Description Mustafa Aydın 2019-11-01 06:36:03 UTC
Description of problem:

Controller upgrade fails at the post deployment steps if there is a "-" at the heat template resource definitions;

PLAY [Server Post Deployments] *************************************************

TASK [include] *****************************************************************
Thursday 31 October 2019  16:13:58 +0300 (0:00:00.276)       0:30:40.821 ******
included: /var/lib/mistral/eebc1388-af6b-465d-9b39-8d2bba8507b4/Controller/deployments.yaml for cauqctr02, cauqctr03, cauqctr01
included: /var/lib/mistral/eebc1388-af6b-465d-9b39-8d2bba8507b4/Controller/deployments.yaml for cauqctr02, cauqctr03, cauqctr01
included: /var/lib/mistral/eebc1388-af6b-465d-9b39-8d2bba8507b4/Controller/deployments.yaml for cauqctr02, cauqctr03, cauqctr01

TASK [Lookup deployment UUID] **************************************************
Thursday 31 October 2019  16:13:58 +0300 (0:00:00.536)       0:30:41.357 ******
fatal: [cauqctr02]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n                 ^"}
fatal: [cauqctr03]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n                 ^"}
fatal: [cauqctr01]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n                 ^"}

Version-Release number of selected component (if applicable):

OSP10z12 --> OSP13z7 FFU

How reproducible:

Always

Steps to Reproduce:
1. Put a "-" at a definition in the Extra config post file

OS::TripleO::NodeExtraConfigPost: ../post-deploy/post-deploy.yaml


Ex:

  ExtraDeployments-sriov:         <<<<<<<<<<<<<<<<<<<<<<<<< here
    type: OS::Heat::StructuredDeployments
    properties:
      servers:  {get_param: servers}
      config: {get_resource: ExtraConfigSriov}
      # Do this on CREATE/UPDATE (which is actually the default)
      actions: ['CREATE', 'UPDATE']


2. Start the controller upgrade with the command "openstack overcloud upgrade run --nodes Controller --skip-tags validation"




Actual results:

TASK [Lookup deployment UUID] **************************************************
Thursday 31 October 2019  16:13:58 +0300 (0:00:00.536)       0:30:41.357 ******
fatal: [cauqctr02]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n                 ^"}
fatal: [cauqctr03]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n                 ^"}
fatal: [cauqctr01]: FAILED! => {"msg": "JMESPathError in json_query filter plugin:\nUnexpected token: -2: Parse error at column 16, token \"-2\" (NUMBER), for expression:\n\"ExtraDeployments-2.id\"\n  

Expected results:

Upgrade of the controller proceeds without any error

Additional info:

Workaround:  Remove the "-" at the definition and start the FFU process from scratch

Comment 1 Mustafa Aydın 2019-11-01 06:44:15 UTC
Created attachment 1631361 [details]
post-deploy.yaml

Comment 3 Jiri Stransky 2019-11-04 14:01:01 UTC
This is an edge case naming that the config-download mechanism does not currently handle, the problematic spot is here:

https://github.com/openstack/tripleo-common/blob/a0498da85659216c85a42c6aace298411fc407d4/tripleo_common/templates/deployments.yaml#L3

The same problem would most likely pop up also on deployment of a more recent OSP version, which uses config-download (the issue does not look specific to the FFU). I'll leave up to DF folks consideration whether we can make the hyphens work or not.

Comment 8 errata-xmlrpc 2020-03-10 11:22:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0760