Bug 1767704 - FFU - Controllers Upgrade fails JMESPathError in json_query filter plugin Unexpected token
Summary: FFU - Controllers Upgrade fails JMESPathError in json_query filter plugin Une...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Luke Short
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-01 06:36 UTC by Mustafa Aydın
Modified: 2020-03-10 11:22 UTC (History)
12 users (show)

Fixed In Version: openstack-tripleo-common-8.7.1-8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-10 11:22:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
post-deploy.yaml (3.51 KB, text/plain)
2019-11-01 06:44 UTC, Mustafa Aydın
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1853321 0 None None None 2019-11-20 15:04:07 UTC
OpenStack gerrit 695750 0 None MERGED Escape invalid JSON characters during deployment. 2020-06-25 17:22:53 UTC
Red Hat Product Errata RHBA-2020:0760 0 None None None 2020-03-10 11:22:45 UTC

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


Note You need to log in before you can comment on or make changes to this bug.