openstack and cbtool integration issue.

104 views
Skip to first unread message

Anil Maurya

unread,
Jan 10, 2017, 2:42:40 AM1/10/17
to cbtool-users

Hi, This is my first question in cbtool-users. I am intermediate user of openstack based cloud.. I have installed openstack versoin 14. I have created two vm in openstack. I am trying to integrate cbtool with openstack.

On one openstack VM i have install cbtool. It had installed all the required packages on VM. 
I have configured the cloud configure.

STARTUP_CLOUD = MYOPENSTACK 

[USER-DEFINED : CLOUDOPTION_MYOPENSTACK] 

OSK_ACCESS = http://xx.xxx.xx.xx:5000/v2.0/ # Address of controlled node (where nova-api runs). I have #userd public ip address of openstack cloud 

OSK_CREDENTIALS = admin-admin-admin 

OSK_SECURITY_GROUPS = default # Make sure that this group exists first 

OSK_INITIAL_VMCS = RegionOne:sut # Change "RegionOne" accordingly 

OSK_LOGIN = centos # The username that logins on the VMs 

OSK_SSH_KEY_NAME = openstack #openstack key copied into /home/centos/cbtool/credentials/ 

OSK_NETNAME = public


I have copied openstack key in the : This openstack key I had created while creating VM in openstack. /home/centos/cbtool/credentials/openstack

Note: I am able to run the ./cb --hard_reset with dummy cloud. i.e. MYSIMCLOUD . I could run the dummy work load.

./cb --hard_reset (with integration of openstack)

getting error:

Cbtool version is "4851ecb" Parsing "cloud definitions" file..... "/home/centos/cbtool/lib/auxiliary//../..//configs/centos_cloud_definitions.txt" opened and parsed successfully. Checking "Object Store".....An Object Store of the kind "Redis" (shared) on node 192.168.0.5, TCP port 6379, database id "0" seems to be running. Checking "Log Store".....A Log Store of the kind "rsyslog" (private) on node 192.168.0.5, UDP port 5114 seems to be running. Checking "Metric Store".....A Metric Store of the kind "MongoDB" (shared) on node 192.168.0.5, TCP port 27017, database id "metrics" seems to be running. Checking "File Store".....A File Store of the kind "rsync" (private) on node 192.168.0.5, TCP port 873 seems to be running. Executing "hard" reset: (killing all running toolkit processes and flushing stores) before starting the experiment...... Killing all processes... done Flushing Object Store... done Flushing Log Store... done

Flushing Metric Store... done Checking for a running API service daemon.....API Service daemon was successfully started. The process id is ['6233'] (http://192.168.0.5:7070). Checking for a running GUI service daemon.....GUI Service daemon was successfully started. The process id is ['6255', '6256'], listening on port 8080. Full url is "http://192.168.0.5:8080". status: Creating "OpenVPN" VPN server unified CB configuration: /home/centos/cbtool/lib/operations//../../util/openvpn/make_keys.sh 192.168.0.0 255.255.0.0 MYOPENSTACK 192.168.0.5 1194, please wait ... 

status: VPN configuration success: (192.168.0.0 255.255.0.0) status: OpenStack connection parameters: username=admin, password=<omitted>, tenant=admin, cacert=None, insecure=False, region_name=RegionOne, access_url=http://xx.xxx.xx.xx:5000/v2.0/, endpoint_type=publicURL Request returned failure status: 401 Please attempt to execute the following : "python -c "from novaclient import client as novac;ct = novac.Client(2, 'admin', 'REPLACE_PASSWORD', 'admin', 'http://xx.xxx.xx.xx:5000/v2.0/', region_name='RegionOne', service_type='compute', endpoint_type='publicURL', cacert='None', insecure='False'); print ct.flavors.list()"" status: VMC "RegionOne" did not pass the connection test." : OpenStack connection failure: The request you have made requires authentication. (HTTP 401) (Request-ID: req-9c0100c2-bdd8-464d-a36c-9cb86d7ba077) 

The "osk" cloud named "MYOPENSTACK" could not be attached to this experiment: VMC "RegionOne" did not pass the connection test." : OpenStack connection failure: The request you have made requires authentication. (HTTP 401) (Request-ID: req-9c0100c2-bdd8-464d-a36c-9cb86d7ba077) Usage: vmcattach <cloud_name> <identifier> [temp_attr_list = empty=empty] [mode] () exit [centos@testvm1 cbtool]$ ls</identifier></cloud_name></omitted>


Thanks,

Anil Maurya

Marcio Silva

unread,
Jan 10, 2017, 7:31:07 PM1/10/17
to cbtool-users
Hello Anil,

What is the output resulting from the command: python -c "from novaclient import client as novac;ct = novac.Client(2, 'admin', 'REPLACE_PASSWORD', 'admin', 'http://xx.xxx.xx.xx:5000/v2.0/', region_name='RegionOne', service_type='compute', endpoint_type='publicURL', cacert='None', insecure='False'); print ct.flavors.list()"?

It looks like the error reported by CB is just due to wrong user/password/project. Anyway, the output of the aforementioned command will allow us to proceed on the debugging.

Regards,

Marcio

anil maurya

unread,
Jan 11, 2017, 12:17:20 AM1/11/17
to Marcio Silva, cbtool-users
Hi Silva,

Good Morning..

I have installed openstack using RDO. This is allinone (all in same server compute controller) openstack configuration.
As you have suggested to run python -c "from novaclient import client as novac;ct = novac.Client(2, 'admin', 'REPLACE_PASSWORD', 'admin', 'http://xx.xxx.xx.xx:5000/v2.0/', region_name='RegionOne', service_type='compute', endpoint_type='publicURL', cacert='None', insecure='False'); print ct.flavors.list()"?

I had run the command in openstack host and vm on which cbtool is installed.
1. Openstack Host : I am getting list of flavor 
[<Flavor: m1.tiny>, <Flavor: m1.small>, <Flavor: m1.medium>, <Flavor: m1.large>, <Flavor: m1.xlarge>, <Flavor: cbtool>]

2. Instance on which cbtool is installed

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/novaclient/v2/flavors.py", line 138, in list
    return self._list("/flavors%s%s" % (detail, query_string), "flavors")
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 252, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 216, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 77, in request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 373, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 141, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 467, in request
    auth_headers = self.get_auth_headers(auth)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 770, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/plugin.py", line 90, in get_headers
    token = self.get_token(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 90, in get_token
    return self.get_access(session).auth_token
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref
    return self._plugin.get_auth_ref(session, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v2.py", line 65, in get_auth_ref
    authenticated=False, log=False)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 718, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 607, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-51647e58-16d8-4b92-933b-398ecb1e6ad1)

 3. On instance (where cbtool is installed )i had exported the keystonerc_admin file.. but still seeing same error. But if I do "nova list" , I could see the instance details.
 +--------------------------------------+----------+---------+------------+-------------+--------------------------------------+
| ID                                   | Name     | Status  | Task State | Power State | Networks                             |
+--------------------------------------+----------+---------+------------+-------------+--------------------------------------+
| 6581c49f-924d-42e0-a605-00cedcb2c079 | cirrosvm | SHUTOFF | -          | Shutdown    | myprivate=192.168.0.9, 172.24.4.232  |
| e069c972-5598-4251-969d-6b5447988648 | testvm1  | ACTIVE  | -          | Running     | myprivate=192.168.0.5, 172.24.4.238  |
| e4e8d2f7-0ee1-4385-9487-c7fe0bfc2912 | testvm2  | ACTIVE  | -          | Running     | myprivate=192.168.0.10, 172.24.4.237 |
+--------------------------------------+----------+---------+------------+-------------+--------------------------------------+


Thanks,
Anil Maurya

--
Anil Maurya

Marcio Silva

unread,
Jan 17, 2017, 4:53:32 PM1/17/17
to cbtool-users, maugust...@gmail.com
Hello Anil,

So, I assume that a "nova flavor-list', when execute from the CBTOOL Orchestrator, it also fails, right?

Is the Orchestrator an instance inside the OpenStack cloud by any chance? If that is the case, there will be difficulties to have the instance, from a tenant network, to establish contact the administrative endpoints for OpenStack services.

Regards,

Marcio

anil maurya

unread,
Jan 19, 2017, 3:27:12 AM1/19/17
to Marcio Silva, cbtool-users
Hi Marcio,

If I run "nova flavor-list" from the cbtool orchestrator (installed on openstack instance) , It get pass and I get right output. 

I had created two environment:
1. Installed CBTool Orchestrator on Openstack Instance 
2. Installed CBTool Orchestrator on Standalone machine.

In both the case, I had seen same issue, which I had reported earlier. 

which version of keystone cbtool supports. 
Is current version of cbtool support keystone version 3.


Thanks,
Anil Maurya
  
--
Anil Maurya
Reply all
Reply to author
Forward
0 new messages