Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-133074 / 24.10.1 / always reinitialize pwenc in vrrp_backup (by yocalebo) #15206

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/middlewared/middlewared/plugins/failover_/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# from middlewared.plugins.failover_.zpool_cachefile import ZPOOL_CACHE_FILE
from middlewared.plugins.failover_.event_exceptions import AllZpoolsFailedToImport, IgnoreFailoverEvent, FencedError
from middlewared.plugins.failover_.scheduled_reboot_alert import WATCHDOG_ALERT_FILE
from middlewared.plugins.pwenc import PWENC_FILE_SECRET

logger = logging.getLogger('failover')
FAILOVER_LOCK_NAME = 'vrrp_event'
Expand Down Expand Up @@ -901,6 +902,18 @@ def vrrp_backup(self, job, fobj, ifname, event):
logger.warning('Stopping fenced')
self.run_call('failover.fenced.stop')

# In the rare case where the pwenc_secret file doesn't match, we'll
# copy over the secret seed file from the active and reinitialize
try:
self.run_call(
'failover.call_remote',
'failover.send_small_file',
[PWENC_FILE_SECRET],
{'raise_connect_error': False}
)
except Exception:
self.logger.error('Failed to reinitialize pwenc', exc_info=True)

# Now that fenced is stopped, attach NVMe/RoCE.
logger.info('Start bring up of NVMe/RoCE')
try:
Expand Down
Loading