Comment 1 for bug 1773953

Revision history for this message
cao biao (flytiger) wrote :

I found the solution but still do not know the reason of this problem.

solution is call config.load_config before init SDKAPI, like this:

from zvmsdk import config
config.load_config()
from zvmsdk import api
sdkapi = api.SDKAPI()
sdkapi.volume_attach(connection_info)

by doing this, the problem will not happen again.
I think this problem will disappear after I add REST API for volume.
Because load_config is called in wsgi now.