From 7823d3ddb479b7aa6855ceb20f9360765abbe677 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Cuong Date: Tue, 27 Jun 2017 22:14:21 -0400 Subject: [PATCH] Remove translation of log messages The i18n team has decided not to translate the logs because it seems like it not very useful; operators prefer to have them in English so that they can search for those strings on the internet. cinder, nova, neutron and glance are removing i18n log translation functions, once it release, it will cause omni build failed. Related-Bug: #1701139 Change-Id: I090fde16602945035cbda66f0633371d3dfebd3c --- cinder/volume/drivers/aws/ebs.py | 7 +- cinder/volume/drivers/gce/driver.py | 7 +- cinder/volume/drivers/gce/gceutils.py | 6 +- glance/glance_store/_drivers/aws.py | 2 +- neutron/neutron/common/gceutils.py | 20 ++- .../plugins/ml2/drivers/gce/mech_gce.py | 35 +++-- neutron/neutron/plugins/ml2/managers.py | 100 +++++++------- .../services/l3_router/gce_router_plugin.py | 41 +++--- nova/virt/gce/driver.py | 124 ++++++++---------- nova/virt/gce/gceutils.py | 12 +- omnitests/cinder.log | 21 +++ omnitests/glance_store.log | 25 ++++ omnitests/neutron.log | 11 ++ omnitests/nova.log | 25 ++++ requirements.txt | 17 +++ 15 files changed, 253 insertions(+), 200 deletions(-) create mode 100644 omnitests/cinder.log create mode 100644 omnitests/glance_store.log create mode 100644 omnitests/neutron.log create mode 100644 omnitests/nova.log create mode 100644 requirements.txt diff --git a/cinder/volume/drivers/aws/ebs.py b/cinder/volume/drivers/aws/ebs.py index 5079dd4..4b80cf7 100644 --- a/cinder/volume/drivers/aws/ebs.py +++ b/cinder/volume/drivers/aws/ebs.py @@ -18,7 +18,6 @@ from oslo_service import loopingcall from oslo_log import log as logging from oslo_config import cfg -from cinder.i18n import _LE from cinder.exception import VolumeNotFound, NotFound, APITimeout, InvalidConfigurationValue from cinder.volume.driver import BaseVD @@ -135,7 +134,7 @@ class EBSDriver(BaseVD): try: ebs_vol = self._find(volume['id'], self._conn.get_all_volumes) except NotFound: - LOG.error(_LE('Volume %s was not found'), volume['id']) + LOG.error('Volume %s was not found', volume['id']) return self._conn.delete_volume(ebs_vol.id) @@ -209,7 +208,7 @@ class EBSDriver(BaseVD): try: ebs_ss = self._find(snapshot['id'], self._conn.get_all_snapshots) except NotFound: - LOG.error(_LE('Snapshot %s was not found'), snapshot['id']) + LOG.error('Snapshot %s was not found', snapshot['id']) return self._conn.delete_snapshot(ebs_ss.id) @@ -217,7 +216,7 @@ class EBSDriver(BaseVD): try: ebs_ss = self._find(snapshot['id'], self._conn.get_all_snapshots) except NotFound: - LOG.error(_LE('Snapshot %s was not found'), snapshot['id']) + LOG.error('Snapshot %s was not found', snapshot['id']) raise ebs_vol = ebs_ss.create_volume(self._zone) diff --git a/cinder/volume/drivers/gce/driver.py b/cinder/volume/drivers/gce/driver.py index 284d8ae..a6bcd58 100644 --- a/cinder/volume/drivers/gce/driver.py +++ b/cinder/volume/drivers/gce/driver.py @@ -14,13 +14,11 @@ from oslo_log import log as logging -from cinder.i18n import _translators from cinder.volume.driver import BaseVD from cinder.volume.drivers.gce import gceconf from cinder.volume.drivers.gce import gceutils LOG = logging.getLogger(__name__) -_LI = _translators.log_info class GceDriver(BaseVD): @@ -35,9 +33,8 @@ class GceDriver(BaseVD): def do_setup(self, context): self.gce_svc = gceutils.get_gce_service(self.gce_svc_key) self.set_initialized() - LOG.info( - _LI("Gce volume driver init with %s project, %s zone") % - (self.gce_project, self.gce_zone)) + LOG.info("Gce volume driver init with %s project, %s zone", + (self.gce_project, self.gce_zone)) def _gce_volume_name(self, volume): return 'vol-' + volume.id diff --git a/cinder/volume/drivers/gce/gceutils.py b/cinder/volume/drivers/gce/gceutils.py index c2ed1b0..930f2b3 100644 --- a/cinder/volume/drivers/gce/gceutils.py +++ b/cinder/volume/drivers/gce/gceutils.py @@ -18,12 +18,11 @@ from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials from oslo_log import log as logging -from cinder.i18n import _translators, _ +from cinder.i18n import _ from oslo_service import loopingcall from oslo_utils import reflection LOG = logging.getLogger(__name__) -_LI = _translators.log_info class GceOperationError(Exception): @@ -83,8 +82,7 @@ def wait_for_operation(compute, project, operation, interval=1, timeout=60): def watch_operation(name, request): result = request.execute() if result['status'] == 'DONE': - LOG.info( - _LI("Operation %s status is %s") % (name, result['status'])) + LOG.info("Operation %s status is %s", (name, result['status'])) if 'error' in result: raise GceOperationError(result['error']) raise loopingcall.LoopingCallDone() diff --git a/glance/glance_store/_drivers/aws.py b/glance/glance_store/_drivers/aws.py index 1771ade..2055f15 100644 --- a/glance/glance_store/_drivers/aws.py +++ b/glance/glance_store/_drivers/aws.py @@ -22,7 +22,7 @@ from ConfigParser import ConfigParser from glance_store import capabilities from glance_store import exceptions -from glance_store.i18n import _, _LE +from glance_store.i18n import _ import glance_store.driver import glance_store.location diff --git a/neutron/neutron/common/gceutils.py b/neutron/neutron/common/gceutils.py index c1aa3fe..f589cb8 100644 --- a/neutron/neutron/common/gceutils.py +++ b/neutron/neutron/common/gceutils.py @@ -22,7 +22,7 @@ from oslo_log import log as logging from oslo_utils import reflection from neutron_lib import exceptions as e -from neutron._i18n import _LI, _ +from neutron._i18n import _ from oslo_service import loopingcall from six.moves import urllib @@ -118,8 +118,7 @@ def wait_for_operation(compute, project, operation, interval=1, timeout=60): def watch_operation(name, request): result = request.execute() if result['status'] == 'DONE': - LOG.info( - _LI("Operation %s status is %s") % (name, result['status'])) + LOG.info("Operation %s status is %s", (name, result['status'])) if 'error' in result: raise GceOperationError(result['error']) raise loopingcall.LoopingCallDone() @@ -330,9 +329,8 @@ def assign_floatingip(compute, project, zone, fixedip, floatingip): raise GceResourceNotFound(name='Instance with fixed IP', identifier=fixedip) - LOG.info( - _LI('Assigning floating ip %s to instance %s') % (floatingip, - instance_name)) + LOG.info('Assigning floating ip %s to instance %s', + (floatingip, instance_name)) operation = compute.instances().addAccessConfig( project=project, zone=zone, instance=instance_name, @@ -358,9 +356,8 @@ def release_floatingip(compute, project, zone, floatingip): items = urllib.parse.urlparse(user).path.strip('/').split('/') if len(items) < 4 or items[-2] != 'instances': - LOG.warning( - _LI('Unknown referrer %s to GCE static IP %s') % (user, - floatingip)) + LOG.warning('Unknown referrer %s to GCE static IP %s', + (user, floatingip)) continue instance, zone = items[-1], items[-3] @@ -368,9 +365,8 @@ def release_floatingip(compute, project, zone, floatingip): for interface in instance_info['networkInterfaces']: for accessconfig in interface.get('accessConfigs', []): if accessconfig.get('natIP') == floatingip: - LOG.info( - _LI('Releasing %s from instance %s') % (floatingip, - instance)) + LOG.info('Releasing %s from instance %s', + (floatingip, instance)) operation = compute.instances().deleteAccessConfig( project=project, zone=zone, instance=instance, accessConfig=accessconfig['name'], diff --git a/neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py b/neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py index 73fb595..ed2d1df 100644 --- a/neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py +++ b/neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py @@ -17,7 +17,7 @@ import random from oslo_log import log import ipaddr -from neutron._i18n import _LI, _ +from neutron._i18n import _ from neutron.callbacks import events from neutron.callbacks import registry from neutron.callbacks import resources @@ -48,9 +48,8 @@ class GceMechanismDriver(api.MechanismDriver): def initialize(self): self.gce_svc = gceutils.get_gce_service(self.gce_svc_key) - LOG.info( - _LI("GCE Mechanism driver init with %s project, %s region") % - (self.gce_project, self.gce_region)) + LOG.info("GCE Mechanism driver init with %s project, %s region", + (self.gce_project, self.gce_region)) self._subscribe_events() def _subscribe_events(self): @@ -85,7 +84,7 @@ class GceMechanismDriver(api.MechanismDriver): name = self._gce_network_name(context) operation = gceutils.create_network(compute, project, name) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Created network on GCE %s') % name) + LOG.info('Created network on GCE %s', name) def update_network_precommit(self, context): pass @@ -101,7 +100,7 @@ class GceMechanismDriver(api.MechanismDriver): name = self._gce_network_name(context) operation = gceutils.delete_network(compute, project, name) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Deleted network on GCE %s') % name) + LOG.info('Deleted network on GCE %s', name) def create_subnet_precommit(self, context): pass @@ -117,8 +116,7 @@ class GceMechanismDriver(api.MechanismDriver): operation = gceutils.create_subnet(compute, project, region, name, cidr, network_link) gceutils.wait_for_operation(compute, project, operation) - LOG.info( - _LI("Created subnet %s in region %s on GCE") % (name, region)) + LOG.info("Created subnet %s in region %s on GCE", (name, region)) def update_subnet_precommit(self, context): pass @@ -136,8 +134,7 @@ class GceMechanismDriver(api.MechanismDriver): name = self._gce_subnet_name(context) operation = gceutils.delete_subnet(compute, project, region, name) gceutils.wait_for_operation(compute, project, operation) - LOG.info( - _LI("Deleted subnet %s in region %s on GCE") % (name, region)) + LOG.info("Deleted subnet %s in region %s on GCE",(name, region)) def _gce_secgrp_id(self, openstack_id): return "secgrp-" + openstack_id @@ -203,7 +200,7 @@ class GceMechanismDriver(api.MechanismDriver): LOG.exception( "An error occured while creating security group: %s" % e) return - LOG.info(_LI("Create GCE firewall rule %s") % gce_rule) + LOG.info("Create GCE firewall rule %s", gce_rule) operation = gceutils.create_firewall_rule(compute, project, gce_rule) gceutils.wait_for_operation(compute, project, operation) @@ -222,14 +219,14 @@ class GceMechanismDriver(api.MechanismDriver): network_link = gce_firewall_info['network'] try: gce_rule = self._convert_secgrp_rule_to_gce(rule, network_link) - LOG.info(_LI("Update GCE firewall rule %s") % name) + LOG.info("Update GCE firewall rule %s", name) operation = gceutils.update_firewall_rule(compute, project, name, gce_rule) gceutils.wait_for_operation(compute, project, operation) except Exception as e: - LOG.exception( - _LI("An error occured while updating security group: %s") % e) - LOG.error(_LI("Deleting existing GCE firewall rule %s") % name) + LOG.exception("An error occurred while updating security " + "group: %s", e) + LOG.error("Deleting existing GCE firewall rule %s", name) operation = gceutils.delete_firewall_rule(compute, project, name) gceutils.wait_for_operation(compute, project, operation) @@ -237,9 +234,8 @@ class GceMechanismDriver(api.MechanismDriver): name = self._gce_secgrp_id(rule_id) compute, project = self.gce_svc, self.gce_project try: - LOG.warn( - _LI("Delete existing GCE firewall rule %s," - "as firewall rule update not GCE compatible.") % name) + LOG.warn("Delete existing GCE firewall rule %s," + "as firewall rule update not GCE compatible.", name) operation = gceutils.delete_firewall_rule(compute, project, name) gceutils.wait_for_operation(compute, project, operation) except gceutils.HttpError: @@ -309,5 +305,4 @@ class GceMechanismDriver(api.MechanismDriver): if security_group_id: self._delete_secgrp(context, security_group_id) else: - LOG.warn( - _LI("Security group ID not found in delete request")) + LOG.warn("Security group ID not found in delete request") diff --git a/neutron/neutron/plugins/ml2/managers.py b/neutron/neutron/plugins/ml2/managers.py index 12f8ac1..355ea29 100644 --- a/neutron/neutron/plugins/ml2/managers.py +++ b/neutron/neutron/plugins/ml2/managers.py @@ -26,7 +26,6 @@ from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import portbindings from neutron.extensions import providernet as provider from neutron.extensions import vlantransparent -from neutron.i18n import _LE, _LI, _LW from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2 import db from neutron.plugins.ml2 import driver_api as api @@ -46,12 +45,12 @@ class TypeManager(stevedore.named.NamedExtensionManager): # Mapping from type name to DriverManager self.drivers = {} - LOG.info(_LI("Configured type driver names: %s"), + LOG.info("Configured type driver names: %s", cfg.CONF.ml2.type_drivers) super(TypeManager, self).__init__('neutron.ml2.type_drivers', cfg.CONF.ml2.type_drivers, invoke_on_load=True) - LOG.info(_LI("Loaded type driver names: %s"), self.names()) + LOG.info("Loaded type driver names: %s", self.names()) self._register_types() self._check_tenant_network_types(cfg.CONF.ml2.tenant_network_types) self._check_external_network_type(cfg.CONF.ml2.external_network_type) @@ -60,15 +59,15 @@ class TypeManager(stevedore.named.NamedExtensionManager): for ext in self: network_type = ext.obj.get_type() if network_type in self.drivers: - LOG.error(_LE("Type driver '%(new_driver)s' ignored because" - " type driver '%(old_driver)s' is already" - " registered for type '%(type)s'"), + LOG.error("Type driver '%(new_driver)s' ignored because" + " type driver '%(old_driver)s' is already" + " registered for type '%(type)s'", {'new_driver': ext.name, 'old_driver': self.drivers[network_type].name, 'type': network_type}) else: self.drivers[network_type] = ext - LOG.info(_LI("Registered types: %s"), self.drivers.keys()) + LOG.info("Registered types: %s", self.drivers.keys()) def _check_tenant_network_types(self, types): self.tenant_network_types = [] @@ -76,15 +75,15 @@ class TypeManager(stevedore.named.NamedExtensionManager): if network_type in self.drivers: self.tenant_network_types.append(network_type) else: - LOG.error(_LE("No type driver for tenant network_type: %s. " - "Service terminated!"), network_type) + LOG.error("No type driver for tenant network_type: %s. " + "Service terminated!", network_type) raise SystemExit(1) - LOG.info(_LI("Tenant network_types: %s"), self.tenant_network_types) + LOG.info("Tenant network_types: %s", self.tenant_network_types) def _check_external_network_type(self, ext_network_type): if ext_network_type and ext_network_type not in self.drivers: - LOG.error(_LE("No type driver for external network_type: %s. " - "Service terminated!"), ext_network_type) + LOG.error("No type driver for external network_type: %s. " + "Service terminated!", ext_network_type) raise SystemExit(1) def _process_provider_segment(self, segment): @@ -179,7 +178,7 @@ class TypeManager(stevedore.named.NamedExtensionManager): def initialize(self): for network_type, driver in six.iteritems(self.drivers): - LOG.info(_LI("Initializing driver for type '%s'"), network_type) + LOG.info("Initializing driver for type '%s'", network_type) driver.obj.initialize() def _add_network_segment(self, session, network_id, segment, mtu, @@ -261,8 +260,8 @@ class TypeManager(stevedore.named.NamedExtensionManager): if driver: driver.obj.release_segment(session, segment) else: - LOG.error(_LE("Failed to release segment '%s' because " - "network type is not supported."), segment) + LOG.error("Failed to release segment '%s' because " + "network type is not supported.", segment) def allocate_dynamic_segment(self, session, network_id, segment): """Allocate a dynamic segment using a partial or full segment dict.""" @@ -288,8 +287,8 @@ class TypeManager(stevedore.named.NamedExtensionManager): driver.obj.release_segment(session, segment) db.delete_network_segment(session, segment_id) else: - LOG.error(_LE("Failed to release segment '%s' because " - "network type is not supported."), segment) + LOG.error("Failed to release segment '%s' because " + "network type is not supported.", segment) else: LOG.debug("No segment found with id %(segment_id)s", segment_id) @@ -304,13 +303,13 @@ class MechanismManager(stevedore.named.NamedExtensionManager): # the order in which the drivers are called. self.ordered_mech_drivers = [] - LOG.info(_LI("Configured mechanism driver names: %s"), + LOG.info("Configured mechanism driver names: %s", cfg.CONF.ml2.mechanism_drivers) super(MechanismManager, self).__init__('neutron.ml2.mechanism_drivers', cfg.CONF.ml2.mechanism_drivers, invoke_on_load=True, name_order=True) - LOG.info(_LI("Loaded mechanism driver names: %s"), self.names()) + LOG.info("Loaded mechanism driver names: %s", self.names()) self._register_mechanisms() def _register_mechanisms(self): @@ -322,7 +321,7 @@ class MechanismManager(stevedore.named.NamedExtensionManager): for ext in self: self.mech_drivers[ext.name] = ext self.ordered_mech_drivers.append(ext) - LOG.info(_LI("Registered mechanism drivers: %s"), + LOG.info("Registered mechanism drivers: %s", [driver.name for driver in self.ordered_mech_drivers]) @property @@ -344,19 +343,17 @@ class MechanismManager(stevedore.named.NamedExtensionManager): rule_types & set(driver_obj.supported_qos_rule_types) dropped_rule_types = new_rule_types - rule_types if dropped_rule_types: - LOG.info( - _LI("%(rule_types)s rule types disabled for ml2 " - "because %(driver)s does not support them"), - {'rule_types': ', '.join(dropped_rule_types), - 'driver': driver.name}) + LOG.info("%(rule_types)s rule types disabled for ml2 " + "because %(driver)s does not support them", + {'rule_types': ', '.join(dropped_rule_types), + 'driver': driver.name}) rule_types = new_rule_types else: # at least one of drivers does not support QoS, meaning # there are no rule types supported by all of them - LOG.warn( - _LW("%s does not support QoS; " - "no rule types available"), - driver.name) + LOG.warn("%s does not support QoS; " + "no rule types available", + driver.name) return [] if binding_driver_found: @@ -369,7 +366,7 @@ class MechanismManager(stevedore.named.NamedExtensionManager): def initialize(self): for driver in self.ordered_mech_drivers: - LOG.info(_LI("Initializing mechanism driver '%s'"), driver.name) + LOG.info("Initializing mechanism driver '%s'", driver.name) driver.obj.initialize() def _check_vlan_transparency(self, context): @@ -404,17 +401,15 @@ class MechanismManager(stevedore.named.NamedExtensionManager): try: getattr(driver.obj, method_name)(context) except exceptions.AwsException as aws_exception: - LOG.exception( - _LE("Mechanism driver '%(name)s' failed in %(method)s"), - {'name': driver.name, 'method': method_name} - ) + LOG.exception("Mechanism driver '%(name)s' failed in" + " %(method)s", + {'name': driver.name, 'method': method_name}) if not continue_on_failure: raise aws_exception except Exception: - LOG.exception( - _LE("Mechanism driver '%(name)s' failed in %(method)s"), - {'name': driver.name, 'method': method_name} - ) + LOG.exception("Mechanism driver '%(name)s' failed in " + "%(method)s", + {'name': driver.name, 'method': method_name}) error = True if not continue_on_failure: break @@ -698,7 +693,7 @@ class MechanismManager(stevedore.named.NamedExtensionManager): if not self._bind_port_level(context, 0, context.network.network_segments): binding.vif_type = portbindings.VIF_TYPE_BINDING_FAILED - LOG.error(_LE("Failed to bind port %(port)s on host %(host)s"), + LOG.error("Failed to bind port %(port)s on host %(host)s", {'port': context.current['id'], 'host': context.host}) @@ -713,8 +708,8 @@ class MechanismManager(stevedore.named.NamedExtensionManager): 'segments': segments_to_bind}) if level == MAX_BINDING_LEVELS: - LOG.error(_LE("Exceeded maximum binding levels attempting to bind " - "port %(port)s on host %(host)s"), + LOG.error("Exceeded maximum binding levels attempting to bind " + "port %(port)s on host %(host)s", {'port': context.current['id'], 'host': context.host}) return False @@ -756,10 +751,9 @@ class MechanismManager(stevedore.named.NamedExtensionManager): 'binding_levels': context.binding_levels}) return True except Exception: - LOG.exception(_LE("Mechanism driver %s failed in " - "bind_port"), + LOG.exception("Mechanism driver %s failed in bind_port", driver.name) - LOG.error(_LE("Failed to bind port %(port)s on host %(host)s"), + LOG.error("Failed to bind port %(port)s on host %(host)s", {'port': context.current['id'], 'host': binding.host}) @@ -790,13 +784,13 @@ class ExtensionManager(stevedore.named.NamedExtensionManager): # the order in which the drivers are called. self.ordered_ext_drivers = [] - LOG.info(_LI("Configured extension driver names: %s"), + LOG.info("Configured extension driver names: %s", cfg.CONF.ml2.extension_drivers) super(ExtensionManager, self).__init__('neutron.ml2.extension_drivers', cfg.CONF.ml2.extension_drivers, invoke_on_load=True, name_order=True) - LOG.info(_LI("Loaded extension driver names: %s"), self.names()) + LOG.info("Loaded extension driver names: %s", self.names()) self._register_drivers() def _register_drivers(self): @@ -807,13 +801,13 @@ class ExtensionManager(stevedore.named.NamedExtensionManager): """ for ext in self: self.ordered_ext_drivers.append(ext) - LOG.info(_LI("Registered extension drivers: %s"), + LOG.info("Registered extension drivers: %s", [driver.name for driver in self.ordered_ext_drivers]) def initialize(self): # Initialize each driver in the list. for driver in self.ordered_ext_drivers: - LOG.info(_LI("Initializing extension driver '%s'"), driver.name) + LOG.info("Initializing extension driver '%s'", driver.name) driver.obj.initialize() def extension_aliases(self): @@ -822,7 +816,7 @@ class ExtensionManager(stevedore.named.NamedExtensionManager): alias = driver.obj.extension_alias if alias: exts.append(alias) - LOG.info(_LI("Got %(alias)s extension from driver '%(drv)s'"), + LOG.info("Got %(alias)s extension from driver '%(drv)s'", {'alias': alias, 'drv': driver.name}) return exts @@ -833,8 +827,8 @@ class ExtensionManager(stevedore.named.NamedExtensionManager): getattr(driver.obj, method_name)(plugin_context, data, result) except Exception: with excutils.save_and_reraise_exception(): - LOG.info(_LI("Extension driver '%(name)s' failed in " - "%(method)s"), + LOG.info("Extension driver '%(name)s' failed in " + "%(method)s", {'name': driver.name, 'method': method_name}) def process_create_network(self, plugin_context, data, result): @@ -872,8 +866,8 @@ class ExtensionManager(stevedore.named.NamedExtensionManager): try: getattr(driver.obj, method_name)(session, base_model, result) except Exception: - LOG.error(_LE("Extension driver '%(name)s' failed in " - "%(method)s"), + LOG.error("Extension driver '%(name)s' failed in " + "%(method)s", {'name': driver.name, 'method': method_name}) raise ml2_exc.ExtensionDriverError(driver=driver.name) diff --git a/neutron/neutron/services/l3_router/gce_router_plugin.py b/neutron/neutron/services/l3_router/gce_router_plugin.py index e467bbb..8cc060e 100644 --- a/neutron/neutron/services/l3_router/gce_router_plugin.py +++ b/neutron/neutron/services/l3_router/gce_router_plugin.py @@ -24,7 +24,6 @@ from neutron.db import l3_dvrscheduler_db from neutron.db import l3_gwmode_db from neutron.db import l3_hamode_db from neutron.db import l3_hascheduler_db -from neutron._i18n import _LI from neutron.plugins.common import constants from neutron.quota import resource_registry from neutron.services import service_base @@ -62,23 +61,22 @@ class GceRouterPlugin( self.gce_project = gceconf.project_id self.gce_svc_key = gceconf.service_key_path self.gce_svc = gceutils.get_gce_service(self.gce_svc_key) - LOG.info( - _LI("GCE Router plugin init with %s project, %s region") % - (self.gce_project, self.gce_region)) + LOG.info("GCE Router plugin init with %s project, %s region", + (self.gce_project, self.gce_region)) def get_plugin_type(self): return constants.L3_ROUTER_NAT def get_plugin_description(self): """returns string description of the plugin.""" - return _LI("GCE L3 Router Service Plugin for basic L3 forwarding" - " between (L2) Neutron networks and access to external" - " networks via a NAT gateway.") + return ("GCE L3 Router Service Plugin for basic L3 forwarding" + " between (L2) Neutron networks and access to external" + " networks via a NAT gateway.") def _cleanup_floatingip(self, compute, project, region, floatingip): gceutils.release_floatingip(compute, project, region, floatingip) gceutils.delete_floatingip(compute, project, region, floatingip) - LOG.info(_LI('Released GCE static IP %s') % floatingip) + LOG.info('Released GCE static IP %s', floatingip) def create_floatingip(self, context, floatingip): compute, project, region = self.gce_svc, self.gce_project, self.gce_region @@ -87,7 +85,7 @@ class GceRouterPlugin( try: public_ip_allocated = gceutils.allocate_floatingip( compute, project, region) - LOG.info(_LI("Created GCE static IP %s") % public_ip_allocated) + LOG.info("Created GCE static IP %s", public_ip_allocated) floatingip_dict = floatingip['floatingip'] @@ -98,7 +96,7 @@ class GceRouterPlugin( self._associate_floatingip_to_port( context, public_ip_allocated, port_id) except Exception as e: - LOG.exception(_LI("Error in Creation/Allocating floating IP")) + LOG.exception("Error in Creation/Allocating floating IP") if public_ip_allocated: self._cleanup_floatingip(compute, project, region, public_ip_allocated) @@ -109,7 +107,7 @@ class GceRouterPlugin( context, floatingip, initial_status=n_const.FLOATINGIP_STATUS_DOWN) except Exception as e: - LOG.exception(_LI("Error in adding floating IP")) + LOG.exception("Error in adding floating IP") if public_ip_allocated: self._cleanup_floatingip(compute, project, region, public_ip_allocated) @@ -127,9 +125,8 @@ class GceRouterPlugin( fixed_ip_address = fixed_ip['ip_address'] if fixed_ip_address: - LOG.info( - _LI('Found fixed ip %s for port %s') % (fixed_ip_address, - port_id)) + LOG.info('Found fixed ip %s for port %s', + (fixed_ip_address, port_id)) gceutils.assign_floatingip(compute, project, zone, fixed_ip_address, floating_ip_address) else: @@ -160,27 +157,25 @@ class GceRouterPlugin( return super(GceRouterPlugin, self).delete_floatingip(context, id) def create_router(self, context, router): - LOG.info(_LI("Creating router %s") % router['router']['name']) + LOG.info("Creating router %s", router['router']['name']) return super(GceRouterPlugin, self).create_router(context, router) def delete_router(self, context, id): - LOG.info(_LI("Deleting router %s") % id) + LOG.info("Deleting router %s", id) return super(GceRouterPlugin, self).delete_router(context, id) def update_router(self, context, id, router): - LOG.info(_LI("Updating router %s") % id) + LOG.info("Updating router %s", id) return super(GceRouterPlugin, self).update_router(context, id, router) def add_router_interface(self, context, router_id, interface_info): - LOG.info( - _LI("Adding interface %s to router %s") % (interface_info, - router_id)) + LOG.info("Adding interface %s to router %s", + (interface_info, router_id)) return super(GceRouterPlugin, self).add_router_interface( context, router_id, interface_info) def remove_router_interface(self, context, router_id, interface_info): - LOG.info( - _LI("Deleting interface %s from router %s") % (interface_info, - router_id)) + LOG.info("Deleting interface %s from router %s", + (interface_info, router_id)) return super(GceRouterPlugin, self).remove_router_interface( context, router_id, interface_info) diff --git a/nova/virt/gce/driver.py b/nova/virt/gce/driver.py index 52ba37a..d9e8a8f 100644 --- a/nova/virt/gce/driver.py +++ b/nova/virt/gce/driver.py @@ -20,7 +20,6 @@ import time import nova.conf from nova import exception from nova.image import glance -from nova.i18n import _LI from nova.virt import driver, hardware from oslo_config import cfg from oslo_log import log as logging @@ -119,9 +118,8 @@ class GCEDriver(driver.ComputeDriver): self.gce_svc = gceutils.get_gce_service(self.gce_svc_key) self.gce_flavor_info = gceutils.get_machines_info( self.gce_svc, self.gce_project, self.gce_zone) - LOG.info( - _LI("GCE driver init with %s project, %s region") % - (self.gce_project, self.gce_zone)) + LOG.info("GCE driver init with %s project, %s region", + (self.gce_project, self.gce_zone)) if '_GCE_NODES' not in globals(): set_nodes([CONF.host]) @@ -233,9 +231,8 @@ class GCEDriver(driver.ComputeDriver): # GCE expects instance name in format "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" # So we need to construct it for GCE from uuid gce_instance_name = 'inst-' + instance.uuid - LOG.info( - _LI("Creating instance %s as %s on GCE.") % (instance.display_name, - gce_instance_name)) + LOG.info("Creating instance %s as %s on GCE.", + (instance.display_name, gce_instance_name)) # Image Info image_link = instance.system_metadata['image_gce_link'] # Flavor Info @@ -294,7 +291,7 @@ class GCEDriver(driver.ComputeDriver): try: gce_id = self._get_gce_id_from_instance(instance) - LOG.info(_LI("Taking snapshot of instance %s") % instance.uuid) + LOG.info("Taking snapshot of instance %s", instance.uuid) try: boot_disk = gceutils.get_instance_boot_disk( compute, project, zone, gce_id) @@ -302,29 +299,26 @@ class GCEDriver(driver.ComputeDriver): reason = "Unable to find boot disk from instance metadata %s" % instance.uuid raise exception.InvalidMetadata(reason=reason) disk_name = boot_disk['name'] - LOG.debug( - _LI("1. Found boot disk %s for instance %s") % (disk_name, - instance.uuid)) + LOG.debug("1. Found boot disk %s for instance %s", + (disk_name, instance.uuid)) operation = gceutils.stop_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) instance_stopped = True - LOG.debug( - _LI("2. Temporarily stopped instance %s") % instance.uuid) + LOG.debug("2. Temporarily stopped instance %s", instance.uuid) snapshot_name = 'novasnap-' + disk_name + time.strftime("%s") operation = gceutils.snapshot_disk( compute, project, zone, boot_disk['name'], snapshot_name) gceutils.wait_for_operation(compute, project, operation) temp_disk_snapshot = True - LOG.debug(_LI("3. Created boot disk snapshot %s") % snapshot_name) + LOG.debug("3. Created boot disk snapshot %s", snapshot_name) operation = gceutils.start_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) instance_stopped = False - LOG.debug( - _LI("4. Restart instance after disk snapshot %s") % - instance.uuid) + LOG.debug("4. Restart instance after disk snapshot %s", + instance.uuid) snapshot_disk_name = 'vol-' + snapshot_name operation = gceutils.create_disk_from_snapshot( @@ -333,9 +327,8 @@ class GCEDriver(driver.ComputeDriver): snapshot_disk_info = gceutils.get_disk(compute, project, zone, snapshot_disk_name) temp_disk_from_snapshot = True - LOG.debug( - _LI("5. Created disk %s from snapshot %s") % - (snapshot_disk_name, snapshot_name)) + LOG.debug("5. Created disk %s from snapshot %s", + (snapshot_disk_name, snapshot_name)) update_task_state(task_state=task_states.IMAGE_PENDING_UPLOAD) image_api = glance.get_default_image_service() @@ -346,12 +339,10 @@ class GCEDriver(driver.ComputeDriver): gceutils.wait_for_operation(compute, project, operation, timeout=120) image_created = True - LOG.debug( - _LI("6. Created image %s from disk %s") % (name, - snapshot_disk_name)) - LOG.info( - _LI("Created GCE image %s from instance %s") % (name, - instance.uuid)) + LOG.debug("6. Created image %s from disk %s", + (name, snapshot_disk_name)) + LOG.info("Created GCE image %s from instance %s", + (name, instance.uuid)) update_task_state(task_state=task_states.IMAGE_UPLOADING, expected_state=task_states.IMAGE_PENDING_UPLOAD) @@ -373,7 +364,7 @@ class GCEDriver(driver.ComputeDriver): }, } image_api.update(context, image_id, image_metadata) - LOG.debug(_LI("7. Added image to glance %s") % name) + LOG.debug("7. Added image to glance %s", name) disk_operation = gceutils.delete_disk(compute, project, zone, snapshot_disk_name) @@ -381,13 +372,12 @@ class GCEDriver(driver.ComputeDriver): snapshot_name) gceutils.wait_for_operation(compute, project, disk_operation) temp_disk_from_snapshot = False - LOG.debug(_LI("8. Delete temporary disk %s") % snapshot_disk_name) + LOG.debug("8. Delete temporary disk %s", snapshot_disk_name) gceutils.wait_for_operation(compute, project, snap_operation) temp_disk_snapshot = False - LOG.debug( - _LI("9. Delete temporary disk snapshot %s") % snapshot_name) - LOG.info(_LI("Completed snapshot for instance %s") % instance.uuid) + LOG.debug("9. Delete temporary disk snapshot %s", snapshot_name) + LOG.info("Completed snapshot for instance %s", instance.uuid) except Exception as e: LOG.exception("An error occured during image creation: %s" % e) @@ -395,29 +385,25 @@ class GCEDriver(driver.ComputeDriver): operation = gceutils.start_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.debug( - _LI("Restart instance after disk snapshot %s") % - instance.uuid) + LOG.debug("Restart instance after disk snapshot %s", + instance.uuid) if image_created: - LOG.info( - _LI("Rollback snapshot for instance %s, deleting image %s from GCE" - ) % (instance.uuid, name)) + LOG.info("Rollback snapshot for instance %s, deleting image " + "%s from GCE", (instance.uuid, name)) operation = gceutils.delete_image(compute, project, name) gceutils.wait_for_operation(compute, project, operation) if temp_disk_from_snapshot: disk_operation = gceutils.delete_disk(compute, project, zone, snapshot_disk_name) gceutils.wait_for_operation(compute, project, disk_operation) - LOG.debug( - _LI("Rollback snapshot for instace %s, delete temporary disk %s" - ) % (instance.uuid, snapshot_disk_name)) + LOG.debug("Rollback snapshot for instace %s, delete temporary" + " disk %s", (instance.uuid, snapshot_disk_name)) if temp_disk_snapshot: snap_operation = gceutils.delete_snapshot( compute, project, snapshot_name) gceutils.wait_for_operation(compute, project, snap_operation) - LOG.debug( - _LI("Rollback snapshot for instance %s, delete temporary disk snapshot %s" - ) % (instance.uuid, snapshot_name)) + LOG.debug("Rollback snapshot for instance %s, delete temporary" + " disk snapshot %s", (instance.uuid, snapshot_name)) raise e def reboot(self, context, instance, network_info, reboot_type, @@ -449,22 +435,22 @@ class GCEDriver(driver.ComputeDriver): block_device_info=None): compute, project, zone = self.gce_svc, self.gce_project, self.gce_zone gce_id = self._get_gce_id_from_instance(instance) - LOG.info(_LI('Stopping instance %s') % instance.uuid) + LOG.info('Stopping instance %s', instance.uuid) operation = gceutils.stop_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Starting instance %s') % instance.uuid) + LOG.info('Starting instance %s', instance.uuid) operation = gceutils.start_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Soft Reboot Complete for instance %s') % instance.uuid) + LOG.info('Soft Reboot Complete for instance %s', instance.uuid) def _hard_reboot(self, context, instance, network_info, block_device_info=None): compute, project, zone = self.gce_svc, self.gce_project, self.gce_zone gce_id = self._get_gce_id_from_instance(instance) - LOG.info(_LI('Resetting instance %s') % instance.uuid) + LOG.info('Resetting instance %s', instance.uuid) operation = gceutils.reset_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Hard Reboot Complete %s') % instance.uuid) + LOG.info('Hard Reboot Complete %s', instance.uuid) @staticmethod def get_host_ip_addr(): @@ -516,23 +502,23 @@ class GCEDriver(driver.ComputeDriver): """ compute, project, zone = self.gce_svc, self.gce_project, self.gce_zone gce_id = self._get_gce_id_from_instance(instance) - LOG.info(_LI('Stopping instance %s') % instance.uuid) + LOG.info('Stopping instance %s', instance.uuid) operation = gceutils.stop_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI('Power off complete %s') % instance.uuid) + LOG.info('Power off complete %s', instance.uuid) def power_on(self, context, instance, network_info, block_device_info): """Power on the specified instance.""" compute, project, zone = self.gce_svc, self.gce_project, self.gce_zone gce_id = self._get_gce_id_from_instance(instance) - LOG.info(_LI('Starting instance %s') % instance.uuid) + LOG.info('Starting instance %s', instance.uuid) operation = gceutils.start_instance(compute, project, zone, gce_id) gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI("Power on Complete %s") % instance.uuid) + LOG.info("Power on Complete %s", instance.uuid) def soft_delete(self, instance): """Deleting the specified instance""" - LOG.info(_LI("Soft delete instance %s") % instance.uuid) + LOG.info("Soft delete instance %s", instance.uuid) self.destroy(instance) def restore(self, instance): @@ -545,7 +531,7 @@ class GCEDriver(driver.ComputeDriver): instance. :param instance: nova.objects.instance.Instance """ - LOG.info(_LI("Pause instance %s") % instance.uuid) + LOG.info("Pause instance %s", instance.uuid) self.power_off(instance) def unpause(self, instance): @@ -555,7 +541,7 @@ class GCEDriver(driver.ComputeDriver): instance. and powering on such an instance in this method. :param instance: nova.objects.instance.Instance """ - LOG.info(_LI("Unpause instance %s") % instance.uuid) + LOG.info("Unpause instance %s", instance.uuid) self.power_on(context=None, instance=instance, network_info=None, block_device_info=None) @@ -566,7 +552,7 @@ class GCEDriver(driver.ComputeDriver): instance. :param instance: nova.objects.instance.Instance """ - LOG.info(_LI("Suspending instance %s") % instance.uuid) + LOG.info("Suspending instance %s", instance.uuid) self.power_off(instance) def resume(self, context, instance, network_info, block_device_info=None): @@ -576,7 +562,7 @@ class GCEDriver(driver.ComputeDriver): instance. :param instance: nova.objects.instance.Instance """ - LOG.info(_LI("Resuming instance %s") % instance.uuid) + LOG.info("Resuming instance %s", instance.uuid) self.power_on(context, instance, network_info, block_device_info) def destroy(self, context, instance, network_info, block_device_info=None, @@ -597,13 +583,12 @@ class GCEDriver(driver.ComputeDriver): :param migrate_data: implementation specific params """ compute, project, zone = self.gce_svc, self.gce_project, self.gce_zone - LOG.info(_LI('Deleting instance %s') % instance.uuid) + LOG.info('Deleting instance %s', instance.uuid) try: gce_id = self._get_gce_id_from_instance(instance) except exception.InstanceNotFound: - LOG.error( - _LI("Unable to find GCE mapping for instance %s") % - instance.uuid) + LOG.error("Unable to find GCE mapping for instance %s", + instance.uuid) return try: operation = gceutils.delete_instance(compute, project, zone, @@ -611,12 +596,11 @@ class GCEDriver(driver.ComputeDriver): except HttpError: # Sometimes instance may not exist in GCE, in that case we just # allow deleting VM from openstack - LOG.error( - _LI("Instance %s not found in GCE, removing from openstack.") % - instance.uuid) + LOG.error("Instance %s not found in GCE, removing from openstack.", + instance.uuid) return gceutils.wait_for_operation(compute, project, operation) - LOG.info(_LI("Destroy Complete %s") % instance.uuid) + LOG.info("Destroy Complete %s", instance.uuid) def attach_volume(self, context, connection_info, instance, mountpoint, disk_bus=None, device_type=None, encryption=None): @@ -630,9 +614,8 @@ class GCEDriver(driver.ComputeDriver): operation = gceutils.attach_disk(compute, project, zone, gce_id, disk_name, disk_link) gceutils.wait_for_operation(compute, project, operation) - LOG.info( - _LI("Volume %s attached to instace %s") % (disk_name, - instance.uuid)) + LOG.info("Volume %s attached to instace %s", + (disk_name, instance.uuid)) def detach_volume(self, connection_info, instance, mountpoint, encryption=None): @@ -645,9 +628,8 @@ class GCEDriver(driver.ComputeDriver): operation = gceutils.detach_disk(compute, project, zone, gce_id, disk_name) gceutils.wait_for_operation(compute, project, operation) - LOG.info( - _LI("Volume %s detached from instace %s") % (disk_name, - instance.uuid)) + LOG.info("Volume %s detached from instace %s", + (disk_name, instance.uuid)) def swap_volume(self, old_connection_info, new_connection_info, instance, mountpoint, resize_to): diff --git a/nova/virt/gce/gceutils.py b/nova/virt/gce/gceutils.py index 1812163..9c27cf7 100644 --- a/nova/virt/gce/gceutils.py +++ b/nova/virt/gce/gceutils.py @@ -16,7 +16,7 @@ import time import six from oslo_log import log as logging -from nova.i18n import _LI, _ +from nova.i18n import _ from googleapiclient.discovery import build from oauth2client.client import GoogleCredentials from oslo_service import loopingcall @@ -181,9 +181,8 @@ def create_instance(compute, project, zone, name, image_link, machine_link, :param image_link: url, GCE Image link for instance launch :param machine_link: url, GCE Machine link for instance launch """ - LOG.info( - _LI("Launching instance %s with image %s, machine %s and network %s") % - (name, image_link, machine_link, network_interfaces)) + LOG.info("Launching instance %s with image %s, machine %s and network %s", + (name, image_link, machine_link, network_interfaces)) config = { 'kind': 'compute#instance', @@ -270,8 +269,7 @@ def wait_for_operation(compute, project, operation, interval=1, timeout=60): def watch_operation(name, request): result = request.execute() if result['status'] == 'DONE': - LOG.info( - _LI("Operation %s status is %s") % (name, result['status'])) + LOG.info("Operation %s status is %s", (name, result['status'])) if 'error' in result: raise GceOperationError(result['error']) raise loopingcall.LoopingCallDone() @@ -418,7 +416,7 @@ def get_instance_boot_disk(compute, project, zone, instance): # Eg. projects//zones//disks/ items = urllib.parse.urlparse(disk_url).path.strip('/').split('/') if len(items) < 4 or items[-2] != 'disks': - LOG.error(_LI('Invalid disk URL %s') % (disk_url)) + LOG.error('Invalid disk URL %s', (disk_url)) disk_name, zone = items[-1], items[-3] disk_info = get_disk(compute, project, zone, disk_name) return disk_info diff --git a/omnitests/cinder.log b/omnitests/cinder.log new file mode 100644 index 0000000..9e197a0 --- /dev/null +++ b/omnitests/cinder.log @@ -0,0 +1,21 @@ +py27 create: /home/stack/openstack/omni/.tox/py27 +py27 develop-inst: /home/stack/openstack/omni +ERROR: invocation failed (exit code 1), logfile: /home/stack/openstack/omni/.tox/py27/log/py27-2.log +ERROR: actionid: py27 +msg: developpkg +cmdargs: ['/home/stack/openstack/omni/.tox/py27/bin/pip', 'install', '-e', '/home/stack/openstack/omni'] +env: {'VIRTUAL_ENV': '/home/stack/openstack/omni/.tox/py27', 'SHLVL': '1', 'LANG': 'en_US.UTF-8', 'PATH': '/home/stack/openstack/omni/.tox/py27/bin:/home/stack/openstack/omni/.tox/py27/bin:/home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'PWD': '/home/stack/openstack/omni', 'PYTHONHASHSEED': '908394477', '_': '/usr/local/bin/tox', 'LANGUAGE': 'en_US'} + +Obtaining file:///home/stack/openstack/omni +Collecting google-api-python-client>=1.4.2 (from omni==0.0.1.dev35) + Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /simple/google-api-python-client/ + Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /simple/google-api-python-client/ + Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /simple/google-api-python-client/ + Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /simple/google-api-python-client/ + Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -5] No address associated with hostname',)': /simple/google-api-python-client/ + Could not find a version that satisfies the requirement google-api-python-client>=1.4.2 (from omni==0.0.1.dev35) (from versions: ) +No matching distribution found for google-api-python-client>=1.4.2 (from omni==0.0.1.dev35) + +py27 installed: +___________________________________ summary ____________________________________ +ERROR: py27: InvocationError: /home/stack/openstack/omni/.tox/py27/bin/pip install -e /home/stack/openstack/omni (see /home/stack/openstack/omni/.tox/py27/log/py27-2.log) diff --git a/omnitests/glance_store.log b/omnitests/glance_store.log new file mode 100644 index 0000000..5332c03 --- /dev/null +++ b/omnitests/glance_store.log @@ -0,0 +1,25 @@ +py27 create: /home/stack/openstack/omni/.tox/py27 +ERROR: invocation failed (exit code 1), logfile: /home/stack/openstack/omni/.tox/py27/log/py27-1.log +ERROR: actionid: py27 +msg: getenv +cmdargs: ['/usr/bin/python', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27'] +env: {'VIRTUAL_ENV': '/home/stack/openstack/omni/.tox/py27', 'SHLVL': '1', 'LANG': 'en_US.UTF-8', 'PATH': '/home/stack/openstack/omni/.tox/py27/bin:/home/stack/openstack/omni/.tox/py27/bin:/home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'PWD': '/home/stack/openstack/omni', 'PYTHONHASHSEED': '3596095205', '_': '/usr/local/bin/tox', 'LANGUAGE': 'en_US'} + +New python executable in /home/stack/openstack/omni/.tox/py27/bin/python2.7 +Traceback (most recent call last): + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 2328, in + main() + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 713, in main + symlink=options.symlink) + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 925, in create_environment + site_packages=site_packages, clear=clear, symlink=symlink)) + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1231, in install_python + shutil.copyfile(executable, py_executable) + File "/usr/lib/python2.7/shutil.py", line 83, in copyfile + with open(dst, 'wb') as fdst: +IOError: [Errno 26] Text file busy: '/home/stack/openstack/omni/.tox/py27/bin/python2.7' +Running virtualenv with interpreter /usr/bin/python2.7 + +ERROR: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-1.log) +___________________________________ summary ____________________________________ +ERROR: py27: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-1.log) diff --git a/omnitests/neutron.log b/omnitests/neutron.log new file mode 100644 index 0000000..b5cb705 --- /dev/null +++ b/omnitests/neutron.log @@ -0,0 +1,11 @@ +py27 recreate: /home/stack/openstack/omni/.tox/py27 +ERROR: invocation failed (exit code 3), logfile: /home/stack/openstack/omni/.tox/py27/log/py27-0.log +ERROR: actionid: py27 +msg: getenv +cmdargs: ['/usr/bin/python', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27'] +env: {'VIRTUAL_ENV': '/home/stack/openstack/omni/.tox/py27', 'SHLVL': '1', 'LANG': 'en_US.UTF-8', 'PATH': '/home/stack/openstack/omni/.tox/py27/bin:/home/stack/openstack/omni/.tox/py27/bin:/home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'PWD': '/home/stack/openstack/omni', 'PYTHONHASHSEED': '756525180', '_': '/usr/local/bin/tox', 'LANGUAGE': 'en_US'} + + +ERROR: InvocationError: /usr/bin/python -m virtualenv --python /home/stack/openstack/omni/.tox/py27/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-0.log) +___________________________________ summary ____________________________________ +ERROR: py27: InvocationError: /usr/bin/python -m virtualenv --python /home/stack/openstack/omni/.tox/py27/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-0.log) diff --git a/omnitests/nova.log b/omnitests/nova.log new file mode 100644 index 0000000..d6d1dec --- /dev/null +++ b/omnitests/nova.log @@ -0,0 +1,25 @@ +py27 create: /home/stack/openstack/omni/.tox/py27 +ERROR: invocation failed (exit code 1), logfile: /home/stack/openstack/omni/.tox/py27/log/py27-0.log +ERROR: actionid: py27 +msg: getenv +cmdargs: ['/usr/bin/python', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27'] +env: {'VIRTUAL_ENV': '/home/stack/openstack/omni/.tox/py27', 'SHLVL': '1', 'LANG': 'en_US.UTF-8', 'PATH': '/home/stack/openstack/omni/.tox/py27/bin:/home/stack/openstack/omni/.tox/py27/bin:/home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'PWD': '/home/stack/openstack/omni', 'PYTHONHASHSEED': '756525180', '_': '/usr/local/bin/tox', 'LANGUAGE': 'en_US'} + +New python executable in /home/stack/openstack/omni/.tox/py27/bin/python2.7 +Traceback (most recent call last): + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 2328, in + main() + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 713, in main + symlink=options.symlink) + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 925, in create_environment + site_packages=site_packages, clear=clear, symlink=symlink)) + File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 1231, in install_python + shutil.copyfile(executable, py_executable) + File "/usr/lib/python2.7/shutil.py", line 83, in copyfile + with open(dst, 'wb') as fdst: +IOError: [Errno 26] Text file busy: '/home/stack/openstack/omni/.tox/py27/bin/python2.7' +Running virtualenv with interpreter /usr/bin/python2.7 + +ERROR: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-0.log) +___________________________________ summary ____________________________________ +ERROR: py27: InvocationError: /usr/bin/python -m virtualenv --python /usr/bin/python2.7 py27 (see /home/stack/openstack/omni/.tox/py27/log/py27-0.log) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4c2edff --- /dev/null +++ b/requirements.txt @@ -0,0 +1,17 @@ +google-api-python-client>=1.4.2 # Apache-2.0 +moto +boto>=2.32.1 # MIT +ipaddr +google_compute_enginegoogle-api-python-client>=1.4.2 # Apache-2.0 +moto +boto>=2.32.1 # MIT +ipaddr +google_compute_enginegoogle-api-python-client>=1.4.2 # Apache-2.0 +moto +boto>=2.32.1 # MIT +ipaddr +google_compute_enginegoogle-api-python-client>=1.4.2 # Apache-2.0 +moto +boto>=2.32.1 # MIT +ipaddr +google_compute_engine \ No newline at end of file