Skip to content

Commit

Permalink
Fix wrong master key on rebootstrap (#9449)
Browse files Browse the repository at this point in the history
* Remove minion_master.pub on bootstrapping

to avoid key verification issue in case
if the minion was registered to the other master before

* Add changelog entry
  • Loading branch information
vzhestkov authored Nov 15, 2024
1 parent b0f20ff commit 2816dcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions susemanager-utils/susemanager-sls/salt/bootstrap/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ salt-minion-key-pem:
- salt-minion-package
{%- endif %}

# On bootstapping the minion which was registered to the other master before,
# the master public key must be removed from the minion to prevent key verification fails.
salt-minion-master-pub-wipe:
file.absent:
- name: {{ salt_config_dir }}/pki/minion/minion_master.pub

{%- if not transactional %}
{{ salt_minion_name }}:
service.running:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove master public key on bootstrapping to prevent possible issues.

0 comments on commit 2816dcc

Please sign in to comment.