yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #22286
[Bug 1373229] [NEW] start/stop instance in EC2 API shouldn't return active/stopped status immediately
Public bug reported:
Always see this error in the gate:
http://logs.openstack.org/73/122873/1/gate/gate-tempest-dsvm-neutron-
full/e5a2bf6/logs/screen-n-cpu.txt.gz?level=ERROR#_2014-09-21_05_18_23_709
014-09-21 05:18:23.709 ERROR oslo.messaging.rpc.dispatcher [req-52e7fee5
-65ee-4c4d-abcc-099b29352846 InstanceRunTest-2053569555
InstanceRunTest-179702724] Exception during message handling: Unexpected
task state: expecting [u'powering-off'] but the actual state is deleting
Checking the EC2 API test in tempest,
def test_run_stop_terminate_instance(self):
# EC2 run, stop and terminate instance
image_ami = self.ec2_client.get_image(self.images["ami"]
["image_id"])
reservation = image_ami.run(kernel_id=self.images["aki"]["image_id"],
ramdisk_id=self.images["ari"]["image_id"],
instance_type=self.instance_type)
rcuk = self.addResourceCleanUp(self.destroy_reservation, reservation)
for instance in reservation.instances:
LOG.info("state: %s", instance.state)
if instance.state != "running":
self.assertInstanceStateWait(instance, "running")
for instance in reservation.instances:
instance.stop()
LOG.info("state: %s", instance.state)
if instance.state != "stopped":
self.assertInstanceStateWait(instance, "stopped")
self._terminate_reservation(reservation, rcuk)
The test is wait for instance become to stopped. But check the ec2 api code
https://github.com/openstack/nova/blob/master/nova/api/ec2/cloud.py#L1075
it always return stopped status immediately. Actually start/stop action
is async call.
** Affects: neutron
Importance: Undecided
Status: Invalid
** Changed in: neutron
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1373229
Title:
start/stop instance in EC2 API shouldn't return active/stopped status
immediately
Status in OpenStack Neutron (virtual network service):
Invalid
Bug description:
Always see this error in the gate:
http://logs.openstack.org/73/122873/1/gate/gate-tempest-dsvm-neutron-
full/e5a2bf6/logs/screen-n-cpu.txt.gz?level=ERROR#_2014-09-21_05_18_23_709
014-09-21 05:18:23.709 ERROR oslo.messaging.rpc.dispatcher [req-
52e7fee5-65ee-4c4d-abcc-099b29352846 InstanceRunTest-2053569555
InstanceRunTest-179702724] Exception during message handling:
Unexpected task state: expecting [u'powering-off'] but the actual
state is deleting
Checking the EC2 API test in tempest,
def test_run_stop_terminate_instance(self):
# EC2 run, stop and terminate instance
image_ami = self.ec2_client.get_image(self.images["ami"]
["image_id"])
reservation = image_ami.run(kernel_id=self.images["aki"]["image_id"],
ramdisk_id=self.images["ari"]["image_id"],
instance_type=self.instance_type)
rcuk = self.addResourceCleanUp(self.destroy_reservation, reservation)
for instance in reservation.instances:
LOG.info("state: %s", instance.state)
if instance.state != "running":
self.assertInstanceStateWait(instance, "running")
for instance in reservation.instances:
instance.stop()
LOG.info("state: %s", instance.state)
if instance.state != "stopped":
self.assertInstanceStateWait(instance, "stopped")
self._terminate_reservation(reservation, rcuk)
The test is wait for instance become to stopped. But check the ec2 api code
https://github.com/openstack/nova/blob/master/nova/api/ec2/cloud.py#L1075
it always return stopped status immediately. Actually start/stop
action is async call.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1373229/+subscriptions
Follow ups
References