-
Notifications
You must be signed in to change notification settings - Fork 1
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
after write multipath.conf, reconfigure or reload is not working. #2
Comments
Since we're using "with open ..." in |
Sorry, I was wrong , the function write_to_multipathd_conf() is no problem, it can write to multipath.conf immediately, the problem is used ' multipathd reconfigure ' is not working , It seems that 'multipathd reconfigure' need time to take affect. I used function rescan() can use to reload, is that right? |
Hi @HHHSong . From what we remember, the refresh could be asynchronous and take time to take effect - it might depends on the operating system and version of multipath-tools. We don't remember for sure. What we do when we want to detect specific changes in the storage stack, is use infi.storagemodel to do a full rescan of the stack, and write a "predicate" that makes sure the changes are applied. The predicate is a class that you can write to detect the changes you expect (e.g. a new multipath device appears). The rescan function will retry the rescan until the predicate returns True, or until a certain timeout expires. I hope this helps. |
Hi:
I used function write_to_multipathd_conf() to update the multipath.conf. and then use 'multipathd -k'reconfigure'' or 'multipathd -k'reload'' update the multipathd, but the multipath.conf is not immediately working.
so I sleep 2s after write_to_multipatd_config() , the multipath.conf is working . is this a problem?
I think
def write_to_multipathd_conf(self, value, filepath=DEFAULT_CONF_FILE): """ save configuration to multipathd.conf file in order for the configuration to take affect, call reload() """ from ..config import Configuration assert isinstance(value, Configuration) with open(filepath, 'w') as fd: fd.write(value.to_multipathd_conf())
The text was updated successfully, but these errors were encountered: