Commit c503dc84 by Máhonfai Bálint

Update SMB password before mounting store to VM

Update the password using the create_user function. Don't modify other attributes of the user.
parent 6f4187b1
Pipeline #1439 passed with stage
in 0 seconds
......@@ -1760,8 +1760,11 @@ class MountStoreOperation(EnsureAgentMixin, InstanceOperation):
inst = self.instance
queue = self.instance.get_remote_queue_name("agent")
host = urlsplit(settings.STORE_URL).hostname
username = Store(user).username
store = Store(user)
username = store.username
password = user.profile.smb_password
# make sure correct smb password is set
store.create_user(password, None, None)
agent_tasks.mount_store.apply_async(
queue=queue, args=(inst.vm_name, host, username, password))
......
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 sign in to comment