2016-11-10 08:27:17 |
xuchao |
description |
Run VMTP:
# docker run --rm -it -v $PWD:/tmp/vmtp -v $HOME/.ssh:/tmp/ssh berrypatch/vmtp vmtp -d -c /tmp/vmtp/vmtp.cfg -r /tmp/vmtp/admin-openrc.sh -p secret --protocol T --json /tmp/vmtp/test.json
Output:
2016-11-10 08:16:29,294 INFO Using http://172.16.70.188:5000/v2.0
2016-11-10 08:16:29,294 INFO VM public key: /tmp/ssh/id_rsa.pub
2016-11-10 08:16:29,294 INFO VM private key: /tmp/ssh/id_rsa
2016-11-10 08:16:29,738 ERROR Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/vmtp/vmtp.py", line 426, in run
self.setup()
File "/usr/local/lib/python2.7/dist-packages/vmtp/vmtp.py", line 206, in setup
self.comp.init_key_pair(self.config.public_key_name, self.instance_access)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 136, in init_key_pair
return self.add_public_key(kp_name, ssh_access.public_key_file)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 118, in add_public_key
self.remove_public_key(name)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 97, in remove_public_key
keypair_list = self.novaclient.keypairs.list()
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py", line 378, in substitution
return methods[-1].func(obj, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/keypairs.py", line 163, in list
return self._list('/%s' % self.keypair_prefix, 'keypairs')
File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 242, in _list
resp, body = self.api.client.get(url)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 481, in get
return self._cs_request(url, 'GET', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 437, in _cs_request
self.authenticate()
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 594, in authenticate
auth_url = self._v2_auth(auth_url)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 685, in _v2_auth
return self._authenticate(url, body)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 698, in _authenticate
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 432, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 426, in request
raise exceptions.from_response(resp, body, url, method)
Unauthorized: The request you have made requires authentication. (HTTP 401)
Other info
OpenStack Version:Mitaka
admin-openrc.sh file
# cat admin-openrc.sh
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://172.16.xx.xx:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne |
Run VMTP:
# docker run --rm -it -v $PWD:/tmp/vmtp -v $HOME/.ssh:/tmp/ssh berrypatch/vmtp vmtp -d -c /tmp/vmtp/vmtp.cfg -r /tmp/vmtp/admin-openrc.sh -p secret --protocol T --json /tmp/vmtp/test.json
Output:
2016-11-10 08:16:29,294 INFO Using http://172.16.xx.xx:5000/v2.0
2016-11-10 08:16:29,294 INFO VM public key: /tmp/ssh/id_rsa.pub
2016-11-10 08:16:29,294 INFO VM private key: /tmp/ssh/id_rsa
2016-11-10 08:16:29,738 ERROR Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/vmtp/vmtp.py", line 426, in run
self.setup()
File "/usr/local/lib/python2.7/dist-packages/vmtp/vmtp.py", line 206, in setup
self.comp.init_key_pair(self.config.public_key_name, self.instance_access)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 136, in init_key_pair
return self.add_public_key(kp_name, ssh_access.public_key_file)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 118, in add_public_key
self.remove_public_key(name)
File "/usr/local/lib/python2.7/dist-packages/vmtp/compute.py", line 97, in remove_public_key
keypair_list = self.novaclient.keypairs.list()
File "/usr/local/lib/python2.7/dist-packages/novaclient/api_versions.py", line 378, in substitution
return methods[-1].func(obj, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/v2/keypairs.py", line 163, in list
return self._list('/%s' % self.keypair_prefix, 'keypairs')
File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 242, in _list
resp, body = self.api.client.get(url)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 481, in get
return self._cs_request(url, 'GET', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 437, in _cs_request
self.authenticate()
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 594, in authenticate
auth_url = self._v2_auth(auth_url)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 685, in _v2_auth
return self._authenticate(url, body)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 698, in _authenticate
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 432, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 426, in request
raise exceptions.from_response(resp, body, url, method)
Unauthorized: The request you have made requires authentication. (HTTP 401)
Other info
OpenStack Version:Mitaka
admin-openrc.sh file
# cat admin-openrc.sh
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://172.16.xx.xx:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne |
|