Generic driver uses separate module service_instance for handling of Nova VMs.
If service m-shr starts and there are existing scheduled shares for creation,
then concurrent issue appears between method 'do_setup', that is called once
on start of service and 'ensure_server', that uses stuff from do_setup.
Main error is in following:
- "Returning exception 'GenericShareDriver' object has no attribute
'service_instance_manager' to caller"
Changes:
- moved definition of attr 'service_instance_manager' to __init__ method.
- removed attrs '_helpers' and 'share_networks_servers' from
ServiceInstanceManager as they are redundant.
- updated unittests according to changes.
- used direct import of 'constants' submodule for neutron api,
to be able to access it on driver init step.
- replaced generic driver with common driver interface for inheritance
by fake driver for unittests.
Reviewed: https:/ /review. openstack. org/117761 /git.openstack. org/cgit/ stackforge/ manila/ commit/ ?id=73b874bd746 9ccd0483cbbc364 e943a7c0e2f9ff
Committed: https:/
Submitter: Jenkins
Branch: master
commit 73b874bd7469ccd 0483cbbc364e943 a7c0e2f9ff
Author: Valeriy Ponomaryov <email address hidden>
Date: Fri Aug 29 05:53:59 2014 -0400
Fix scheduled share creation with generic driver
Generic driver uses separate module service_instance for handling of Nova VMs.
If service m-shr starts and there are existing scheduled shares for creation,
then concurrent issue appears between method 'do_setup', that is called once
on start of service and 'ensure_server', that uses stuff from do_setup.
Main error is in following: iver' object has no attribute service_ instance_ manager' to caller"
- "Returning exception 'GenericShareDr
'
Changes: instance_ manager' to __init__ method. networks_ servers' from stanceManager as they are redundant.
- moved definition of attr 'service_
- removed attrs '_helpers' and 'share_
ServiceIn
- updated unittests according to changes.
- used direct import of 'constants' submodule for neutron api,
to be able to access it on driver init step.
- replaced generic driver with common driver interface for inheritance
by fake driver for unittests.
Change-Id: I0fe7f097dc03ea de5e0d4dfdbda0e b49588f4dde
Closes-Bug: #1362985
Related-Bug: #1330391