--- a/components/openstack/horizon/files/overrides.py Thu Sep 15 11:53:59 2016 -0700
+++ b/components/openstack/horizon/files/overrides.py Thu Sep 15 10:02:21 2016 -0700
@@ -213,6 +213,9 @@
project_tables_row_actions[pos:]
)
+# Set the available states for Create Snapshot to only be 'ACTIVE'
+project_tables.SNAPSHOT_READY_STATES = ('ACTIVE',)
+
# Disable 'disk_over_commit', 'block_migration' in
# Admin/System/Instances/Actions/Live Migrate Instance. Note that this is
# unchecked by default.
--- a/components/openstack/nova/files/solariszones/driver.py Thu Sep 15 11:53:59 2016 -0700
+++ b/components/openstack/nova/files/solariszones/driver.py Thu Sep 15 10:02:21 2016 -0700
@@ -1132,7 +1132,7 @@
image_meta = glanceapi.get(context, instance['image_ref'])
image_properties = image_meta.get('properties')
if image_properties.get('architecture') is None:
- reason = reason + (_("The 'architecture' property is not set "
+ reason = reason + (_(" The 'architecture' property is not set "
"on the Glance image."))
raise exception.ImageUnacceptable(image_id=instance['image_ref'],
@@ -3044,6 +3044,19 @@
:param image_id: Reference to a pre-created image that will
hold the snapshot.
"""
+ name = instance['name']
+ zone = self._get_zone_by_name(name)
+ if zone is None:
+ raise exception.InstanceNotFound(instance_id=name)
+
+ # look to see if the zone is a kernel zone and is powered off. If it
+ # is raise an exception before trying to archive it
+ extra_specs = self._get_extra_specs(instance)
+ brand = extra_specs.get('zonecfg:brand', ZONE_BRAND_SOLARIS)
+ if zone.state != ZONE_STATE_RUNNING and \
+ brand == ZONE_BRAND_SOLARIS_KZ:
+ raise exception.InstanceNotRunning(instance_id=name)
+
# Get original base image info
(base_service, base_id) = glance.get_remote_image_service(
context, instance['image_ref'])