Rebuild instance should check any attached volume before rebuilding it

Bug #1278533 reported by Jenny Shieh
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
jiang, yunhong

Bug Description

When rebuilding an instance without detaching the attached volume from the instance first, nova ‘rebuild_instance’ doesn’t check for any attached volumes and go ahead to rebuild the instance. Therefore, the volume is still attached to the host of 3PAR server. Once the instance is built successfully, it fails to attach the same volume to the rebuilt instance.

Steps to reproduce the issue:

1. create an instance, create volume
2. attach the volume to the instance
3. mount the volume to the instance
4. perform rebuild instance without detaching volume
5. attach the same volume to the rebuilt instance

Revision history for this message
Matt Riedemann (mriedem) wrote :

Do you have a paste with the error stack trace from the nova compute logs?

tags: added: compute volumes
Changed in nova:
status: New → Confirmed
Revision history for this message
Michael H Wilson (geekinutah) wrote :

This was fixed for icehouse: https://github.com/openstack/nova/commit/8705f49a4ad9c6f3a93f33e333475285a8f70a30

This is probably worth backporting.

Changed in nova:
status: Confirmed → Fix Committed
Changed in nova:
assignee: nobody → jiang, yunhong (yunhong-jiang)
Revision history for this message
jiang, yunhong (yunhong-jiang) wrote :
Download full text (6.5 KiB)

I did a quick check and failed on my side with error of :

2014-02-13 15:58:31.423 ERROR oslo.messaging._executors.base [-] Exception during message handling: Block Device Mapping is Invalid: Some fields are invalid.
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base Traceback (most recent call last):
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/oslo.messaging/oslo/messaging/_executors/base.py", line 36, in _dispatch
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base incoming.reply(self.callback(incoming.ctxt, incoming.message))
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/oslo.messaging/oslo/messaging/rpc/dispatcher.py", line 134, in __call__
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base return self._dispatch(endpoint, method, ctxt, args)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/oslo.messaging/oslo/messaging/rpc/dispatcher.py", line 104, in _dispatch
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base result = getattr(endpoint, method)(ctxt, **new_args)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/compute/manager.py", line 357, in decorated_function
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base return function(self, context, *args, **kwargs)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/oslo.messaging/oslo/messaging/rpc/server.py", line 153, in inner
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base return func(*args, **kwargs)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base payload)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base six.reraise(self.type_, self.value, self.tb)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base return f(self, context, *args, **kw)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/compute/manager.py", line 241, in decorated_function
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base pass
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base six.reraise(self.type_, self.value, self.tb)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/compute/manager.py", line 227, in decorated_function
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base return function(self, context, *args, **kwargs)
2014-02-13 15:58:31.423 TRACE oslo.messaging._executors.base File "/opt/stack/nova/nova/compute/manager.py", line 292, in decorated_function
2014-02-13 15:58:31.423 TRACE...

Read more...

Revision history for this message
jiang, yunhong (yunhong-jiang) wrote :

The command sequences used to re-reproduce the issue are:

nova boot --image 4d78f7d5-da05-4c19-9799-227fc8f9170a --flavor 2 iav

nova volume-attach iav 865eb42b-611b-43cf-9d10-6bd6accf0ee6

nova rebuild iav 4d78f7d5-da05-4c19-9799-227fc8f9170a

The volume is created with:
cinder create --name myvol --description myvolume 8

Changed in nova:
status: Fix Committed → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/73730

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Nikola Đipanov (ndipanov) wrote :

Marking as duplicate - would be good to continue the discussion there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.