Syntax error in TASK: mariadb : Change row format to DYNAMIC for legacy tables

Bug #1883141 reported by Will Szumski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Invalid
Undecided
Unassigned
Train
Fix Released
Medium
Radosław Piliszek

Bug Description

I'm trying to upgrade from stein to train. I'm hitting an error in the task:

TASK: mariadb : Change row format to DYNAMIC for legacy tables. The error seems to be result of:

fatal: [sv-b16-u23]: FAILED! => {"changed": true, "cmd": ["docker", "exec", "mariadb", "mysql", "-uroot", "-redacted, "--silent", "--skip-column-names", "-e", "ALTER TABLE murano.environment@002dtemplate

16:51:41.955571", "msg": "non-zero return code", "rc": 1, "start": "2020-06-11 16:51:41.865195", "stderr": "ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@002dtemplate ROW_FORMAT=DYNAMIC' at line 1", "stderr_lines": ["ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@002dtemplate ROW_FORMAT=DYNAMIC' at line 1"], "stdout": "", "stdout_lines": []

This is on centos 7 with centos base images.

Will Szumski (willjs)
description: updated
Revision history for this message
Will Szumski (willjs) wrote :

The workaround was to update this table manually, i.e:

MariaDB [murano]> ALTER TABLE murano.`environment-template` ROW_FORMAT=DYNAMIC;

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Hi Will, any idea where that "@002dtemplate" part came from?

Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Medium
status: New → Invalid
importance: Medium → Undecided
Revision history for this message
Will Szumski (willjs) wrote :

The table was called `environment-template`, so I'm guessing it can't deal with tables with tables with dashes in the name.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Ah, I see now, that could be it.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/735646

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/train)

Reviewed: https://review.opendev.org/735646
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=74be7b86a54e2ec8dc8a9f516527664577614d12
Submitter: Zuul
Branch: stable/train

commit 74be7b86a54e2ec8dc8a9f516527664577614d12
Author: Radosław Piliszek <email address hidden>
Date: Mon Jun 15 19:44:11 2020 +0200

    Escape table names in mariadb upgrade procedure

    (Train only)

    Some names may need escaping here due to special chars in them,
    notably murano's environment-template.

    Change-Id: Ic3ee350192ba0c70005588568d52b5c24639c07f
    Closes-Bug: #1883141

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.