Image extra_config has invalid format error while resizing an instance
search cancel

Image extra_config has invalid format error while resizing an instance

book

Article ID: 379705

calendar_today

Updated On:

Products

VMware Integrated OpenStack

Issue/Introduction

  • While User attach interface to the instance and operation failed with below error
    error “Error: Unable to attach interface”.
    ERROR oslo_messaging.rpc.server nova.exception.InvalidInput: Invalid input received: Image extra_config has invalid format

Environment

7.3
7.2.x

Cause

image_vmware_extra-config value from the table instance_system_metadata was truncated to 255 characters.

Resolution

For VIO 7.2.1

This has been patched with the attached file vio-hot-patch-7.2.1.tar. This is applicable for the new instances only.  For existing instances with truncated image_vmware_extra-config, you have to update the value of field "value" manually.

  1. Extract the hot patch file once its get downloaded.
  2. Run install-novaosapi.sh to apply the hot patch.
  3. After applying the hot patch, you would see nova-api-osapi pod to be restarted.
For existing instances the database needs to be updated.

Note: You are updating the database, please take a backup before proceeding
 

#osctl exec -it mariadb-server-0 bash
#mysqldump --defaults-file=/etc/mysql/admin_user.cnf --host=localhost  nova > /tmp/nova.sql
#exit
#osctl cp openstack/mariadb-server-0:/tmp/nova.sql /tmp/nova.sql

Then you just pull the backup from the manager.  Something like winscp.

 
Edit the database:

#osctl exec -ti mariadb-server-0 -- mysql --defaults-file=/etc/mysql/admin_user.cnf

// find the truncated metadata record with the below sql query
#select * from instance_system_metadata where key=‘image_vmware_extra-config’ and instance_uuid=‘<instance UUID>’;

// update the truncated value with entire value
#update instance_system_meta_data set value=‘<entire value>’ where id = <Id from the instance_system_metadata table>

Additional Information

The hot patch will be overwritten after upgrading to VIO 7.3


User should run get_latest_files.sh and it will save nova/utils.py in the files directory on the extracted patch folder.
You have to manually apply below changes to the nova/utils.py file.

for key, value in image_meta.get('properties', {}).items():
        if key in SM_SKIP_KEYS:
            continue
        if key not in ['vmware_extra_config']:
            new_value = safe_truncate(six.text_type(value), 255)
        else:
            LOG.info('Do not truncate vmware_extra_config')
            new_value = six.text_type(value)
        system_meta[prefix_format % key] = new_value

Finally, you need to run install-novaosapi.sh file again.

Attachments

vio-hot-patch-7.2.1.tar get_app