Increase size of service-parameter field value

This submit increases the size of the “value” field for the
service-parameter table from 255 to 4096 characters. This is
to accommodate registries that can be saved as a list in
this field.

This change was tested in lab with a size of 4096 and 4097
for no_proxy's value.

Closes-Bug: 1856236
Change-Id: I5067f7ee1e5f8b532045d0736402080bad39be72
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
This commit is contained in:
Kristine Bujold 2019-12-16 13:58:48 -05:00
parent afbb3c911c
commit 1a220c2e7d
3 changed files with 38 additions and 2 deletions

View File

@ -1,2 +1,2 @@
SRC_DIR="sysinv"
TIS_PATCH_VER=341
TIS_PATCH_VER=342

View File

@ -645,7 +645,7 @@ SERVICE_PARAMETER_SCHEMA = {
},
}
SERVICE_PARAMETER_MAX_LENGTH = 255
SERVICE_PARAMETER_MAX_LENGTH = 4096
MANAGED_RESOURCES_MAP = None

View File

@ -0,0 +1,36 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import Column, MetaData, Table
from sqlalchemy import String, Integer
ENGINE = 'InnoDB'
CHARSET = 'utf8'
def upgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
# Increase the size of the value column
service_parameter = Table('service_parameter',
meta,
Column('id', Integer,
primary_key=True, nullable=False),
mysql_engine=ENGINE, mysql_charset=CHARSET,
autoload=True)
service_col = service_parameter.c.value
service_col.alter(Column('value', String(4096)))
def downgrade(migrate_engine):
meta = MetaData()
meta.bind = migrate_engine
# Downgrade is unsupported.
raise NotImplementedError('SysInv database downgrade is unsupported.')