Fix neutron-adoption with ironic#1371
Fix neutron-adoption with ironic#1371gthiemonge wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
Conversation
Fix a conversion issue in neutron-adoption, the task triggers a bug:
[..]
oc patch openstackcontrolplane openstack --type=merge --patch '{'spec': {'neutron': {'template': {'ml2MechanismDrivers': ['ovn', 'baremetal']}}}}'
Error from server (BadRequest): error decoding patch: invalid character 's' looking for beginning of object key string
[..]
ironic_ml2_baremetal_patch is an ansible object, it needs to be
converted to a json string before it's used in an oc patch command
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@hjensas ^ FYI I'm testing it in a D/S CI job |
|
I guess it's a problem of single quotes within single quotes, and So this is not resilient to single quotes appearing inside the patch in a string, but since this is testing only, i think it's ok and should fix the mentioned problem. /lgtm |
another method would be the use of raw text that represents a yaml doc, for instance for neutron_config_patch: |
Fix a conversion issue in neutron-adoption, the task triggers a bug:
[..]
oc patch openstackcontrolplane openstack --type=merge --patch '{'spec': {'neutron': {'template': {'ml2MechanismDrivers': ['ovn', 'baremetal']}}}}' Error from server (BadRequest): error decoding patch: invalid character 's' looking for beginning of object key string [..]
ironic_ml2_baremetal_patch is an ansible object, it needs to be converted to a json string before it's used in an oc patch command