Ask Your Question

dubi's profile - activity

2016-07-13 06:54:54 -0500 received badge  Famous Question (source)
2016-03-23 17:58:12 -0500 received badge  Popular Question (source)
2015-03-09 08:30:00 -0500 received badge  Famous Question (source)
2015-02-12 00:30:01 -0500 received badge  Famous Question (source)
2015-02-11 15:24:15 -0500 received badge  Notable Question (source)
2015-02-11 15:24:15 -0500 received badge  Popular Question (source)
2015-02-06 03:13:57 -0500 received badge  Famous Question (source)
2014-11-09 10:46:32 -0500 asked a question using migarte_repo to establish version control

under Juno running (for a new OS project) :

migrate_repo# *python version_control <url> <repository> * , we get the following error:


File "/usr/lib64/python2.6/site-packages/MySQLdb/", line 187, in __init__ super(Connection, self).__init__(args, *kwargs2)

sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied for user 'dragon'@'' (using password: YES)") None None

The URL in our case (also appear as sql_connection in ourproject .conf file) is :


Note that we can login to mysql manually using user =dragon and passwod =dragon like this: mysql --user=dragon --password=dragon

So what is the reason for the above error and what is the meaning of 'None None' ?

The content of is :

#!/usr/bin/env python

from import main

if __name__ == '__main__':

2014-10-29 10:13:08 -0500 received badge  Famous Question (source)
2014-10-28 05:35:48 -0500 received badge  Notable Question (source)
2014-10-11 13:08:03 -0500 received badge  Popular Question (source)
2014-10-08 07:04:05 -0500 asked a question run_tests for unit tests

Using Icehouse we add a project . Unit tests of the server side code works basically

For testing the client code we imported code from python-cinderclient ( run_tests, tox.ini, setup.cfg, setup.cfg and tools )

running ./ -f builds the environment ok (says : 'dragonclient development environment setup is complete.')

but going into the tests run section fails with the following message :

Running `tools/ python testr --testr-args='--subunit '`

Non-zero exit code (2) from test listing.
error: testr failed (3)

Ran 0 tests in 1.065s


cp: cannot stat `.testrepository/-1': No such file or directory

Note : .testrepository directory exists and also : 'testr list-tests' runs fine and shows all the client tests !

2014-10-07 11:14:19 -0500 received badge  Famous Question (source)
2014-10-06 14:21:10 -0500 received badge  Notable Question (source)
2014-10-05 21:13:26 -0500 received badge  Popular Question (source)
2014-10-05 19:01:03 -0500 received badge  Popular Question
2014-10-05 14:59:57 -0500 asked a question RDO allinone

I used to run the all-in-one of RDO 2 month ago (still Icehouse) . It ran ok to completion by :

packstack --answer-file=/root/openstack-answers.cfg

The file openstack-answers.cfg has a line : CONFIG_PROVISION_DEMO_FLOATRANGE=

Currently when I run it and no matter what is the IP specified in the FLOATRANGE I get the following error :

ERROR : Error appeared during Puppet run: Error: /Stage[main]/Main/Neutron_l3_ovs_bridge[]: Could not evaluate: Execution of '/sbin/ip addr show 148.26.128/28' returned 255: Device "148.26.128/28" does not exist.

Any idea how to overcome it ? The FloatingRange specified is not used yet and will never be among the IPs that appear as the outcome of 'ip addr show '

2014-10-03 03:17:45 -0500 received badge  Famous Question (source)
2014-09-21 17:33:04 -0500 received badge  Notable Question (source)
2014-09-21 17:33:04 -0500 received badge  Famous Question (source)
2014-09-16 01:22:32 -0500 commented question Openstack unit tests and mock

oops comment by mistake

2014-09-14 01:50:13 -0500 asked a question Openstack unit tests and mock

I see examples of using mock but I am not sure I get how results of mock fabricated data can be fed into an exiting unit tested openstack code through its input channels that inquires nova data by novaclient or likewise by cinderclient

example of existing real code:

from neutronclient.v2_0 import client as neutronclient

class NeutronManager(object):

def __init__(self, username, password, project, auth_url, insecure):

    self.client = neutronclient.Client(

        username=username, password=password,

        tenant_name=project, auth_url=auth_url,


    keystone_mgr = KeystoneManager(username, password, project,

                                   auth_url, insecure)

    self.project_id = keystone_mgr.get_project_id()

def router_list(self):

    return filter(self._owned_resource,



neutron_manager = managers.NeutronManager self.neutron = self.neutron_manager(*args) self.subnets = self.neutron.subnet_list() self.networks = self.neutron.network_list()

and test code like :

@skipIf(clients.neutronclient is None, 'neutronclient unavailable')
def setUp(self):
    super(AllocTest, self).setUp()
    self.fc = fakes.FakeClient()
    self.m.StubOutWithMock(clients.neutronclient.Client, 'show_network')

  def mock_show_network(self):
    vpc_name = utils.PhysName('test_stack', 'the_vpc')
    ).AndReturn({"network": {
        "status": "BUILD",
        "subnets": [],
        "name": vpc_name,
        "admin_state_up": False,
        "shared": False,
        "tenant_id": "c1210485b2424d48804aad5d39c61b8f",
        "id": "aaaa-netid"

and then the test code usage usage :

   def test_association_allocationid(self):


    t = template_format.parse(eip_template_ipassoc2)
    stack = utils.parse_stack(t)

    rsrc = self.create_eip(t, stack, 'the_eip')
    association = self.create_association(t, stack, 'IPAssoc')

2014-08-28 17:00:08 -0500 received badge  Famous Question (source)
2014-08-24 22:00:14 -0500 received badge  Notable Question (source)
2014-08-24 15:03:28 -0500 received badge  Popular Question (source)
2014-08-24 00:59:23 -0500 commented question heat volume restore from volume backup (Icehouse)

The backup volume exists at the target Openstack . verfied by : cinder backup-list
as follows: +--------------------------------------+---------------------+-----------+--------+------+--------------+--------------------------------+ | ID | Volume ID | Status | Name | Size | Object Count | container| +--------------------------------------+---------------------+-----------+--------+------+--------------+--------------------------------+ | | 223192c3-b125-417e-b6d5-838b95fbfe28 | 0000-0000-0000-0000 | available | my_vol | 1 | 22 | admin/vol_only/20140823155023# |

2014-08-23 17:15:38 -0500 asked a question heat volume restore from volume backup (Icehouse)

A target openstack has a volume restored from a backup copy denoted by a backup_id

The volume (only) is created by Heat from the backup using the template below:

description: Generated template
heat_template_version: 2014-08-23
parameters: {}
      backup_id: 223192c3-b125-417e-b6d5-838b95fbfe28
      metadata: {readonly: 'False'}
      name: my_vol8
      size: 1
    type: OS::Cinder::Volume

The Heat command to create the volume is :

heat stack-create -f vol-file stack11 where vol_file contains the above template

Without the backup_id clause the volume is created ok ( i.e not using a backup)

With the backup_id the create fails and the heat engine log file shows :

2014-08-24 00:45:17.996 10123 ERROR heat.engine.resource [-] CREATE : CinderVolume "volume_3" 
[229c96d1-7884-4672-9ea8-9ef38f52ca2e] Stack "stack11" [56d73d22-e8cc-4f0a-bfca-9ed82ad4588d]
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource Traceback (most recent call last):
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource   File "/usr/lib/python2.6/site-packages/heat/engine
/", line 423, in _do_action
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource     while not check(handle_data):
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource   File "/usr/lib/python2.6/site-packages/heat/engine
/resources/", line 133, in check_create_complete
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource     raise exception.Error(vol.status)
2014-08-24 00:45:17.996 10123 TRACE heat.engine.resource **Error: error_restoring**
2014-08-19 08:47:52 -0500 received badge  Famous Question (source)
2014-08-17 20:36:55 -0500 received badge  Notable Question (source)
2014-08-12 17:48:47 -0500 received badge  Notable Question (source)
2014-08-07 13:22:14 -0500 received badge  Popular Question (source)
2014-08-07 06:52:53 -0500 edited question neutron error while launching with heat

I get the following error while using heat to provision a VM from a template:

JSON response :

{"stacks": [{"description": "Generated template", "links": [{"href": "", "rel": "self"}], "stack_status_reason": "Resource CREATE failed: HT-15306C5 NeutronClientException: 503-{u'NeutronError': {u'message': u'Unable to create the network. No tenant network is available for allocation.', u'type': u'NoNetworkAvailable', u'detail': u''}}", "stack_name": "stack", "creation_time": "2014-08-05T13:51:07Z", "updated_time": null, "stack_status": "CREATE_FAILED", "id": "995f363c-00d4-49c6-9907-aca1470d28ea"},

The neutron flat network exists at the target openstack when I use the : heat -f <template file=""> stack-create command . Even if I erase the flat network from the target openstack system I get the same error . If I drop the network sections from the template the heat template gets applied ok at the target Openstack and IP is assigned from the existing flat network there to the launched VM .

The template was generated on one openstack then used on another target openstack with the network IP allocation ranges modified

attached below the heat template used :

########## Heat Template ##########
description: Generated template
heat_template_version: 2013-05-23
    default: m1.tiny
    description: Flavor to use for server server_0
    type: string
    default: e35d4491-fd0d-4241-8524-8703c27608ff 
    description: Image to use to boot server server_0
    type: string

      admin_state_up: true
      name: public_net
      shared: false
      tenant_id: 5eae73fa860c4291bab537f5e45e849b
    type: OS::Neutron::Net

      - device_name: /dev/vdb
          get_resource: volume_0
      diskConfig: AUTO
        get_param: server_0_flavor
        get_param: server_0_image
      name: test1
      - network:
          get_resource: network_0
    type: OS::Nova::Server
      - "end":
      enable_dhcp: true
      host_routes: []
      ip_version: 4
      name: public_subnet
      tenant_id: 5eae73fa860c4291bab537f5e45e849b 
        get_resource: network_0
    type: OS::Neutron::Subnet
        attached_mode: rw
        readonly: 'False'
      name: my_vol
      size: 1
    type: OS::Cinder::Volume
2014-06-13 15:25:05 -0500 received badge  Notable Question (source)
2014-06-13 15:25:05 -0500 received badge  Popular Question (source)
2014-06-04 17:42:08 -0500 received badge  Famous Question (source)
2014-05-22 04:10:25 -0500 received badge  Famous Question (source)
2014-05-14 19:39:22 -0500 received badge  Notable Question (source)
2014-05-05 04:32:54 -0500 received badge  Famous Question (source)
2014-05-04 10:21:31 -0500 received badge  Famous Question (source)
2014-05-01 20:39:46 -0500 received badge  Notable Question (source)