root@sam:~# openstack --debug appcontainer exec --interactive container /bin/sh
START with options: --debug appcontainer exec --interactive container /bin/sh
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_type='', auth_url='http://controller:5000/v3', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='public', key='', log_file=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_container_api_version='1', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', profile='', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'auth_url': 'http://controller:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'container_api_version': '1', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'region_name': '', 'auth_type': 'password', 'networks': []}
defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}
cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'auth_url': 'http://controller:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'container_api_version': '1', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'region_name': '', 'auth_type': 'password', 'networks': []}
compute API version 2.1, cmd group openstack.compute.v2
identity API version 3, cmd group openstack.identity.v3
image API version 2, cmd group openstack.image.v2
network API version 2, cmd group openstack.network.v2
object_store API version 1, cmd group openstack.object_store.v1
volume API version 2, cmd group openstack.volume.v2
container API version 1, cmd group openstack.container.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
orchestration API version 1, cmd group openstack.orchestration.v1
dns API version 2, cmd group openstack.dns.v2
key_manager API version 1, cmd group openstack.key_manager.v1
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'auth_url': 'http://controller:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'container_api_version': '1', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'region_name': '', 'auth_type': 'password', 'networks': []}
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'auth_url': 'http://controller:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'container_api_version': '1', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'region_name': '', 'auth_type': 'password', 'networks': []}
command: appcontainer exec -> zunclient.osc.v1.containers.ExecContainer (auth=True)
Auth plugin password selected
auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_name': 'Default', 'project_domain_name': 'Default', 'project_name': 'admin'}, 'additional_user_agent': [('osc-lib', '1.12.1')], 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'default_domain': 'default', 'timing': False, 'auth_url': 'http://controller:5000/v3', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'container_api_version': '1', 'orchestration_api_version': '1', 'dns_api_version': '2', 'key_manager_api_version': '1', 'region_name': '', 'auth_type': 'password', 'networks': []}
Using auth plugin: password
Using parameters {'auth_url': 'http://controller:5000/v3', 'project_name': 'admin', 'project_domain_name': 'Default', 'username': 'admin', 'user_domain_name': 'Default', 'password': '***'}
Get auth_ref
REQ: curl -g -i -X GET http://controller:5000/v3 -H "Accept: application/json" -H "User-Agent: openstacksdk/0.26.0 keystoneauth1/3.13.1 python-requests/2.18.4 CPython/3.6.8"
Starting new HTTP connection (1): controller
http://controller:5000 "GET /v3 HTTP/1.1" 200 250
RESP: [200] Connection: Keep-Alive Content-Length: 250 Content-Type: application/json Date: Wed, 13 Nov 2019 16:24:42 GMT Keep-Alive: timeout=5, max=100 Server: Apache/2.4.29 (Ubuntu) Vary: X-Auth-Token x-openstack-request-id: req-d90b7e5d-60a2-46af-b6de-eb67a5db9212
RESP BODY: {"version": {"id": "v3.12", "status": "stable", "updated": "2019-01-22T00:00:00Z", "links": [{"rel": "self", "href": "http://controller:5000/v3/"}], "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}]}}
GET call to http://controller:5000/v3 used request id req-d90b7e5d-60a2-46af-b6de-eb67a5db9212
Making authentication request to http://controller:5000/v3/auth/tokens
http://controller:5000 "POST /v3/auth/tokens HTTP/1.1" 201 5278
{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "e475e38222494dcd874ff6171daf7100", "name": "admin", "password_expires_at": null}, "audit_ids": ["Z2LakATZRq2LNN3H6K479Q"], "expires_at": "2019-11-13T17:24:43.000000Z", "issued_at": "2019-11-13T16:24:43.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "f954d33c94834e8aaac3a70c4190d84d", "name": "admin"}, "is_domain": false, "roles": [{"id": "3d3f29c60ac04adf909d8e9edb69700d", "name": "admin"}, {"id": "095c18c91d1d4f3f89557c00b4242314", "name": "reader"}, {"id": "c7322aad813148d796214d8ef6ba9eea", "name": "member"}], "catalog": [{"endpoints": [{"id": "05ed35507cdb4c548ba3ce0c6a989699", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}, {"id": "1fb12ea07e1a4c53a948942c4fc09bf6", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}, {"id": "d771bcc0a5bc49ba94b15bc2c8865f0b", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}], "id": "0a045bfca7bb4f3d8d5b6956accb75b6", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "a1c7843ce8284d178b75cbbd4c6d5213", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}, {"id": "e15da5e06d3848089442a743b0439883", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}, {"id": "e274305182504531a919e204c0223e11", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}], "id": "0a266f9e8627423cba5f2c70f5e2030e", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "491b5fa19d804f2091cfe7a770226425", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}, {"id": "4fbb2c36c1d14ba0abb64c778de66129", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}, {"id": "da4468d123b045afbf15c62295da7b62", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}], "id": "19e49423c45343cab9d41b91d55735a1", "type": "container", "name": "zun"}, {"endpoints": [{"id": "5248c0043a1541c5b1e4ef7e2f3a1336", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}, {"id": "b43dfa7e5c124d639b6494a9ab235d2c", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}, {"id": "f3cda76c6a5c4a7a9ff1d268d9592ee3", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}], "id": "19ec4a68f4aa44518e593bc0955a3b56", "type": "image", "name": "glance"}, {"endpoints": [{"id": "4d24ab7940ef4169a6e8b2acf42b08c9", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}, {"id": "c4fea717ac8b4cedb4cd39b20b1272aa", "interface": "public", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}, {"id": "fa4793c0644b4cb5b4570ff922d58618", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}], "id": "6afbbda5bf204d42bb8c9a1eba9fe632", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "223393a996fe4f8ea12cd42a409f5373", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}, {"id": "41a2a4eafc2e46b785c01318784ca18a", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}, {"id": "c3d08da69a0a402cac69ff33b5445a15", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}], "id": "92d0c684cc864354965a563dac6dd66d", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "2395b18e3f9244b3969b9d5740420a4c", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "406d062bc73d4a059ea8bed5ebf822e1", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "e90d849a61d647de9646644f080eb52f", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}], "id": "cec73336228141b5bcfab718f70999b9", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "075e0edeae4642e19d80bb6e9009d4de", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "44cd5d9005bb403ab52a565c19c7db95", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "4ee85c3607ec41c9938fe1166dcd21bd", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}], "id": "e2387036d7c84761b9a6cee3e0fb2ca3", "type": "volumev2", "name": "cinderv2"}]}}
run(Namespace(command=['/bin/sh'], container='container', interactive=True))
take_action(Namespace(command=['/bin/sh'], container='container', interactive=True))
Instantiating zun client: <class 'zunclient.v1.client.Client'>
Making authentication request to http://controller:5000/v3/auth/tokens
http://controller:5000 "POST /v3/auth/tokens HTTP/1.1" 201 5278
{"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "e475e38222494dcd874ff6171daf7100", "name": "admin", "password_expires_at": null}, "audit_ids": ["Qki_vG-sTIqS0gHcavHGGw"], "expires_at": "2019-11-13T17:24:43.000000Z", "issued_at": "2019-11-13T16:24:43.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "f954d33c94834e8aaac3a70c4190d84d", "name": "admin"}, "is_domain": false, "roles": [{"id": "095c18c91d1d4f3f89557c00b4242314", "name": "reader"}, {"id": "3d3f29c60ac04adf909d8e9edb69700d", "name": "admin"}, {"id": "c7322aad813148d796214d8ef6ba9eea", "name": "member"}], "catalog": [{"endpoints": [{"id": "05ed35507cdb4c548ba3ce0c6a989699", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}, {"id": "1fb12ea07e1a4c53a948942c4fc09bf6", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}, {"id": "d771bcc0a5bc49ba94b15bc2c8865f0b", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9696", "region": "RegionOne"}], "id": "0a045bfca7bb4f3d8d5b6956accb75b6", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "a1c7843ce8284d178b75cbbd4c6d5213", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}, {"id": "e15da5e06d3848089442a743b0439883", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}, {"id": "e274305182504531a919e204c0223e11", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8774/v2.1", "region": "RegionOne"}], "id": "0a266f9e8627423cba5f2c70f5e2030e", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "491b5fa19d804f2091cfe7a770226425", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}, {"id": "4fbb2c36c1d14ba0abb64c778de66129", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}, {"id": "da4468d123b045afbf15c62295da7b62", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9517/v1", "region": "RegionOne"}], "id": "19e49423c45343cab9d41b91d55735a1", "type": "container", "name": "zun"}, {"endpoints": [{"id": "5248c0043a1541c5b1e4ef7e2f3a1336", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}, {"id": "b43dfa7e5c124d639b6494a9ab235d2c", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}, {"id": "f3cda76c6a5c4a7a9ff1d268d9592ee3", "interface": "public", "region_id": "RegionOne", "url": "http://controller:9292", "region": "RegionOne"}], "id": "19ec4a68f4aa44518e593bc0955a3b56", "type": "image", "name": "glance"}, {"endpoints": [{"id": "4d24ab7940ef4169a6e8b2acf42b08c9", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}, {"id": "c4fea717ac8b4cedb4cd39b20b1272aa", "interface": "public", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}, {"id": "fa4793c0644b4cb5b4570ff922d58618", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:5000/v3/", "region": "RegionOne"}], "id": "6afbbda5bf204d42bb8c9a1eba9fe632", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "223393a996fe4f8ea12cd42a409f5373", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}, {"id": "41a2a4eafc2e46b785c01318784ca18a", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}, {"id": "c3d08da69a0a402cac69ff33b5445a15", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8778", "region": "RegionOne"}], "id": "92d0c684cc864354965a563dac6dd66d", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "2395b18e3f9244b3969b9d5740420a4c", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "406d062bc73d4a059ea8bed5ebf822e1", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "e90d849a61d647de9646644f080eb52f", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8776/v3/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}], "id": "cec73336228141b5bcfab718f70999b9", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "075e0edeae4642e19d80bb6e9009d4de", "interface": "public", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "44cd5d9005bb403ab52a565c19c7db95", "interface": "internal", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}, {"id": "4ee85c3607ec41c9938fe1166dcd21bd", "interface": "admin", "region_id": "RegionOne", "url": "http://controller:8776/v2/f954d33c94834e8aaac3a70c4190d84d", "region": "RegionOne"}], "id": "e2387036d7c84761b9a6cee3e0fb2ca3", "type": "volumev2", "name": "cinderv2"}]}}
REQ: curl -g -i -X GET http://controller:9517 -H "Accept: application/json" -H "Content-Type: application/json" -H "OpenStack-API-Version: container 1.1" -H "User-Agent: None" -H "X-Auth-Token: {SHA256}b41e173dda5e8f1ddc9eb73884b578a5b819b73282109f8bbd6511876130b8f6"
Starting new HTTP connection (1): controller
http://controller:9517 "GET / HTTP/1.1" 200 442
RESP: [200] Connection: keep-alive Content-Length: 442 Content-Type: application/json Date: Wed, 13 Nov 2019 16:24:43 GMT X-Openstack-Request-Id: req-a5a363a9-2251-49f4-8773-da1b2c9a6f09
RESP BODY: {"default_version": {"status": "CURRENT", "min_version": "1.1", "max_version": "1.32", "id": "v1", "links": [{"href": "http://controller:9517/v1/", "rel": "self"}]}, "versions": [{"status": "CURRENT", "min_version": "1.1", "max_version": "1.32", "id": "v1", "links": [{"href": "http://controller:9517/v1/", "rel": "self"}]}], "name": "OpenStack Zun API", "description": "Zun is an OpenStack project which aims to provide containers service."}
GET call to container for http://controller:9517/ used request id req-a5a363a9-2251-49f4-8773-da1b2c9a6f09
REQ: curl -g -i -X POST http://controller:9517/v1/containers/container/execute?command=%22%2Fbin%2Fsh%22&interactive=True&run=False -H "Accept: application/json" -H "Content-Length: 0" -H "Content-Type: application/json" -H "OpenStack-API-Version: container 1.30" -H "User-Agent: None" -H "X-Auth-Token: {SHA256}b41e173dda5e8f1ddc9eb73884b578a5b819b73282109f8bbd6511876130b8f6"
http://controller:9517 "POST /v1/containers/container/execute?command=%22%2Fbin%2Fsh%22&interactive=True&run=False HTTP/1.1" 200 310
RESP: [200] Connection: keep-alive Content-Length: 310 Content-Type: application/json Date: Wed, 13 Nov 2019 16:24:43 GMT Openstack-Api-Maximum-Version: container 1.32 Openstack-Api-Minimum-Version: container 1.1 Openstack-Api-Version: container 1.30 Vary: OpenStack-API-Version X-Openstack-Request-Id: req-36e0112f-871a-4f26-89c8-33a19423b98b
RESP BODY: {"output": null, "exec_id": "3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb", "proxy_url": "ws://controller:6784/?token=9e7e762d-a4ba-4f5f-968f-1d022dc94ea5&uuid=faa50a26-f848-43b7-a87f-350e15fb230e&exec_id=3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb", "exit_code": null}
POST call to container for http://controller:9517/v1/containers/container/execute?command=%22%2Fbin%2Fsh%22&interactive=True&run=False used request id req-36e0112f-871a-4f26-89c8-33a19423b98b
connecting to: ws://controller:6784/?token=9e7e762d-a4ba-4f5f-968f-1d022dc94ea5&uuid=faa50a26-f848-43b7-a87f-350e15fb230e&exec_id=3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb
connected to container, press Enter to continue
type ~. to disconnect
REQ: curl -g -i -X POST http://controller:9517/v1/containers/container/execute_resize?exec_id=3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb&w=234&h=60 -H "Accept: application/json" -H "Content-Length: 0" -H "Content-Type: application/json" -H "OpenStack-API-Version: container 1.30" -H "User-Agent: None" -H "X-Auth-Token: {SHA256}b41e173dda5e8f1ddc9eb73884b578a5b819b73282109f8bbd6511876130b8f6"
http://controller:9517 "POST /v1/containers/container/execute_resize?exec_id=3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb&w=234&h=60 HTTP/1.1" 200 4
RESP: [200] Connection: keep-alive Content-Length: 4 Content-Type: application/json Date: Wed, 13 Nov 2019 16:24:44 GMT Openstack-Api-Maximum-Version: container 1.32 Openstack-Api-Minimum-Version: container 1.1 Openstack-Api-Version: container 1.30 Vary: OpenStack-API-Version X-Openstack-Request-Id: req-e6afa6f6-2c47-45ee-9e9f-96a88f58bcd2
RESP BODY: null
POST call to container for http://controller:9517/v1/containers/container/execute_resize?exec_id=3becd76cd4857e317a3462b6c7192b17a32ee77ac67c087692eb5957bf53c4eb&w=234&h=60 used request id req-e6afa6f6-2c47-45ee-9e9f-96a88f58bcd2
putting tty into raw mode
starting main loop in client
restoring tty configuration
write() argument must be str, not bytes
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cliff/app.py", line 401, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python3/dist-packages/osc_lib/command/command.py", line 41, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python3/dist-packages/cliff/command.py", line 184, in run
return_code = self.take_action(parsed_args) or 0
File "/usr/lib/python3/dist-packages/zunclient/osc/v1/containers.py", line 604, in take_action
websocketclient.do_exec(client, url, container, exec_id, "~", 0.5)
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 389, in do_exec
wscls.start_loop()
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 90, in start_loop
self.run_forever()
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 108, in run_forever
self.handle_socket(event)
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 182, in handle_socket
sys.stdout.write(data)
TypeError: write() argument must be str, not bytes
clean_up ExecContainer: write() argument must be str, not bytes
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/osc_lib/shell.py", line 136, in run
ret_val = super(OpenStackShell, self).run(argv)
File "/usr/lib/python3/dist-packages/cliff/app.py", line 281, in run
result = self.run_subcommand(remainder)
File "/usr/lib/python3/dist-packages/osc_lib/shell.py", line 176, in run_subcommand
ret_value = super(OpenStackShell, self).run_subcommand(argv)
File "/usr/lib/python3/dist-packages/cliff/app.py", line 401, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/lib/python3/dist-packages/osc_lib/command/command.py", line 41, in run
return super(Command, self).run(parsed_args)
File "/usr/lib/python3/dist-packages/cliff/command.py", line 184, in run
return_code = self.take_action(parsed_args) or 0
File "/usr/lib/python3/dist-packages/zunclient/osc/v1/containers.py", line 604, in take_action
websocketclient.do_exec(client, url, container, exec_id, "~", 0.5)
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 389, in do_exec
wscls.start_loop()
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 90, in start_loop
self.run_forever()
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 108, in run_forever
self.handle_socket(event)
File "/usr/lib/python3/dist-packages/zunclient/common/websocketclient/websocketclient.py", line 182, in handle_socket
sys.stdout.write(data)
TypeError: write() argument must be str, not bytes
ok so I solved my problem by manually editing the file "/usr/lib/ python3/ dist-packages/ zunclient/ common/ websocketclient /websocketclien t.py" by adding this https:/ /github. com/openstack/ python- zunclient/ commit/ 54b24b3a731209f 7144f6963c7fa30 ed9c0a926a and modifying it https:/ /github. com/openstack/ python- zunclient/ commit/ bc1cfd9737380a4 827fec97152139e 6c2e918f38
Thanks to hongbin for the fix !