We're updating the issue view to help you get more done. 

Snapshot restore breaks stage

Description

When performing a snapshot restore we now (for the last ~7 months) overwrite the security alphabet in the rest-security.conf with the old value.

Unfortunately, we restore the stage files and regenerate the stage auth token before we do this, which causes the stage auth token to be incorrectly generated.

The stage auth token needs to be regenerated after the security files are restored, or the security files need to be restored before we call the restore_stage_files here: https://github.com/cloudify-cosmo/cloudify-manager/blob/master/workflows/cloudify_system_workflows/snapshots/snapshot_restore.py#L384

Steps to Reproduce

Steps to reproduce:
------------------
1. Restore a snapshot onto a manager with a different rest-security.conf to the old one (not just another copy of the same image)
2. Verify that stage stops working because /opt/cloudify-stage/resources/admin_token has an invalid security token.

Expected result:
---------------

Actual result:
-------------

Why Propose Close?

None

Status

Assignee

Ido Berkovitch

Reporter

geokala

Labels

None

Severity

Medium

Target Version

4.5.5

Premium Only

no

Found In Version

4.4

QA Owner

None

Bug Type

legacy bug

Customer Encountered

Yes

Customer Name

None

Release Notes

yes

Priority

None

Epic Link

Sprint

None

Priority

Unprioritized