Skip to content

keyerror in samba config restore #1585

@phillxnet

Description

@phillxnet

Under certain circumstance, when restoring a previously saved config backup, the samba service config fails to get restored: a key error is logged:

ERROR [storageadmin.util:47] exception: Samba could not be configured. Try again. Exception: 'global_config'
Traceback (most recent call last): File "/opt/rockstor/src/rockstor/smart_manager/views/samba_service.py", line 61, in post
    gc_lines = config['global_config'].split('\n')
KeyError: 'global_config'
DEBUG [storageadmin.util:48] Current Rockstor version: 3.8.16-0
ERROR [storageadmin.views.config_backup:51] Exception occured while creating resource: https://localhost/api/sm/services/smb/config. payload: {'config': {u'workgroup': u'MYGROUP2'}}. 
exception: 500 Server Error: INTERNAL SERVER ERROR. Moving on.

Note in the above log that the only config element was that of the workgroup. This is suspected as the trigger to reproduce the issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions