yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #32854
[Bug 1454515] [NEW] Property "instance.disable_terminate" is always "False" and never actually used.
Public bug reported:
The property "instance.disable_terminate" is initialized using:
disable_terminate = Column(Boolean(), default=False)
in \nova\db\sqlalchemy\models.py
This property is then used in
1) compute\api:
def _delete(self, context, instance, delete_type, cb, **instance_attrs):
if instance.disable_terminate:
LOG.info(_LI('instance termination disabled'),
instance=instance)
return
2) nova\api\ec2.py:
def _format_attr_disable_api_termination(instance, result):
result['disableApiTermination'] = instance.disable_terminate
Since there are no API provided to modify this property, it is always
"False".
There are two ways to fix this:
1) Add methods to modify this property in servers/create api and servers/update api
to make it actually functional.
2) Remove this property and the whole logic in _delete().
modify nova\api\ec2.py, set result['disableApiTermination'] = False
** Affects: nova
Importance: Undecided
Status: New
** Description changed:
The property "instance.disable_terminate" is initialized using:
disable_terminate = Column(Boolean(), default=False)
in \nova\db\sqlalchemy\models.py
This property is then used in
1) compute\api:
def _delete(self, context, instance, delete_type, cb, **instance_attrs):
if instance.disable_terminate:
LOG.info(_LI('instance termination disabled'),
instance=instance)
return
2) nova\api\ec2.py:
def _format_attr_disable_api_termination(instance, result):
result['disableApiTermination'] = instance.disable_terminate
Since there are no API provided to modify this property, it is always
"False".
There are two ways to fix this:
1) Add methods to modify this property in servers/create api and servers/update api
to make it actually functional.
- 2) Remove this property and modify nova\api\ec2.py, set
- result['disableApiTermination'] = False
+ 2) Remove this property and the whole logic in _delete().
+ modify nova\api\ec2.py, set result['disableApiTermination'] = False
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1454515
Title:
Property "instance.disable_terminate" is always "False" and never
actually used.
Status in OpenStack Compute (Nova):
New
Bug description:
The property "instance.disable_terminate" is initialized using:
disable_terminate = Column(Boolean(), default=False)
in \nova\db\sqlalchemy\models.py
This property is then used in
1) compute\api:
def _delete(self, context, instance, delete_type, cb, **instance_attrs):
if instance.disable_terminate:
LOG.info(_LI('instance termination disabled'),
instance=instance)
return
2) nova\api\ec2.py:
def _format_attr_disable_api_termination(instance, result):
result['disableApiTermination'] = instance.disable_terminate
Since there are no API provided to modify this property, it is always
"False".
There are two ways to fix this:
1) Add methods to modify this property in servers/create api and servers/update api
to make it actually functional.
2) Remove this property and the whole logic in _delete().
modify nova\api\ec2.py, set result['disableApiTermination'] = False
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1454515/+subscriptions
Follow ups
References