Should not delete active snapshot when instance is terminated

The instance might be deleted when doing snapshot, need to check
whether the snapshot is active state before delete it.

Change-Id: Ic12b8dfd05ad7f36831dd073cef746f094d8f2d0
Closes-Bug: #1329882
Catch permission denied exception when update host

When an existing non-openstack instance in the compute node contains
disk file which can not be accessed by nova non-root user, resources can
not be updated successfully when periodic task is running. Also the
nova-compute service could not be restared again. We should catch such
exception.

Change-Id: I75195417e123f135252470cf1322843830556b0a
Closes-Bug: 1322467
Fix detaching pci device failed

after booting an instance with flavor has pci device,
and then resize the instance, it will raise an "AttributeError".
this because in the method _detach_pci_devices(),
guest_config.devices will have more device not only pci, like disk.

Closes-bug: #1318891

Change-Id: Id52883a4f1fa7d05d61b31674acd1ca57918c3e1
Merge "Catch permission denied exception when update host"
Merge "Should not delete active snapshot when instance is terminated"
Merge "Fix detaching pci device failed"