This can avoid empty Fernet keys when the write to the
staged key fails. The _become_valid_new_key() is called
only after a successful call to _create_tmp_new_key().
Change-Id: Iaf33e2b291f13b9eb9464ef345a8664a634121ff
Closes-Bug: #1642457
Signed-off-by: John Lin <email address hidden>
Reviewed: https:/ /review. openstack. org/413495 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=5b7c9a66f0a ed860ea0776d4c5 b42710d88fcb5f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5b7c9a66f0aed86 0ea0776d4c5b427 10d88fcb5f
Author: johnlinp <email address hidden>
Date: Wed Dec 21 15:17:01 2016 +0800
Handle disk write failure when doing Fernet key rotation
_create_ new_key( ) is broke down into 2 parts:
1. _create_ tmp_new_ key() valid_new_ key()
2. _become_
This can avoid empty Fernet keys when the write to the valid_new_ key() is called tmp_new_ key().
staged key fails. The _become_
only after a successful call to _create_
Change-Id: Iaf33e2b291f13b 9eb9464ef345a86 64a634121ff
Closes-Bug: #1642457
Signed-off-by: John Lin <email address hidden>