Backup and Restore: restore-image failed to read platform.conf

Bug #1808417 reported by mhg
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Wei Zhou

Bug Description

Brief Description
-----------------
During system restore, CLI `sudo config_controller --restore-images <backupfile_images.tgz>' failed with error messages and traceback:
ERROR:root:Failed to read platform.conf
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/tsconfig/tsconfig.py", line 84, in _load
    value = str(config.get('platform_conf', 'subfunction'))
  File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
NoOptionError: No option 'subfunction' in section: 'platform_conf'

This issue blocked further system restore procedure.

Severity
--------
Major

Steps to Reproduce
------------------
1 do system backup according to customer documents while do not backup any cinder volumes
      sudo config_controller --backup <output_backup_files>
    save the generated backup-files outside the lab under test

2 do system restore
   1) wipe disks on all nodes except the storage nodes
   2) power off all nodes except the storage nodes
   3) reinstall controller-0 with the same version system software
   4) restore the system data:
           sudo config_controller --restore-system <backup-file_system.tgz>
   5) restore the system images:
          sudo config_controller --restore-images <backup-file_image.tgz>

Expected Behavior
------------------
The CLI "sudo config_controller --restore-images <bakcup-file_images.tgz> " successfully runs to completion and controller-0 is successfully restored.

Actual Behavior
----------------
The CLI failed with error messages and traceback:
ERROR:root:Failed to read platform.conf
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/tsconfig/tsconfig.py", line 84, in _load
    value = str(config.get('platform_conf', 'subfunction'))
  File "/usr/lib64/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
NoOptionError: No option 'subfunction' in section: 'platform_conf'

Restore failed: Restore already in progress.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Dedicated storage

Branch/Pull Time/Commit
-----------------------
master as of build-date-time
StarlingX_Upstream_build as of 2018-12-07_20-18-00

Timestamp/Logs
--------------
Thu Dec 13 18:07:23 UTC 2018

Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Wei Zhou (wzhou007)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/625127

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-config (master)

Reviewed: https://review.openstack.org/625127
Committed: https://git.openstack.org/cgit/openstack/stx-config/commit/?id=13a3fe62a1773919e0d42570de3c1b75616fee2c
Submitter: Zuul
Branch: master

commit 13a3fe62a1773919e0d42570de3c1b75616fee2c
Author: Wei Zhou <email address hidden>
Date: Thu Dec 13 17:08:49 2018 -0500

    Backup and Restore: restore-image failed to read platform.conf

    During restore when /etc/platform/platform.conf file is generated,
    a space is inserted in the beginning of certain lines. Parsing the
    config file failed due to the extra space.

    Change-Id: Ib074d5eecfef8b8608ad6287c1d360a9a40b4b22
    Closes-bug: 1808417
    Signed-off-by: Wei Zhou <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Release Gating; related to new functionality with B&R without re-installing the storage nodes

Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.2019.03 stx.config
Revision history for this message
mhg (marvinhg) wrote :

Re-tested with load as of 2018-12-26_20-18-00, the problem could not be reproduced.
Close this as fixed.

Ken Young (kenyis)
tags: added: stx.2019.05
removed: stx.2019.03
Ken Young (kenyis)
tags: added: stx.2.0
removed: stx.2019.05
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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