Commit 7e60a15b authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

heptapod: closing webdrivers in hash storage setting change

The existing sessions are almost systematically broken, we need
to resign in, the simplest is to start over.
parent 77af3274c2b7
......@@ -310,15 +310,18 @@ class Heptapod:
user = User.search(self, name)
user.ensure_ssh_pub_key(info['ssh']['pub'])
def close(self):
if self.dead is not False:
return
def close_webdrivers(self):
for user in self.users.values():
driver = user.get('webdriver')
driver = user.pop('webdriver', None)
if driver is not None:
logger.info("Closing webdriver for user %r", user['name'])
driver.close()
def close(self):
if self.dead is not False:
return
self.close_webdrivers()
def run_shell(self, command, **kw):
raise NotImplementedError('run_shell')
......@@ -399,6 +402,9 @@ class Heptapod:
self.gitlab_ctl('stop', ['redis'])
# we restart everything in case a service would depend on Redis
# and would fail to reconnect automatically
# closing all webdrivers, because restart of Redis will kill sessions
self.close_webdrivers()
self.gitlab_ctl('restart')
self.wait_startup()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment