Huawei / OpenStackClient_Auto-Scaling

Apache License 2.0
4 stars 3 forks source link

policy execute(执行弹性伸缩策略),在伸缩组异常或者不使能时,执行伸缩策略应该提示无法执行 #12

Closed caoyameng closed 7 years ago

caoyameng commented 7 years ago

伸缩组状态为异常,此时在DT控制器界面,“执行弹性伸缩策略”选项为灰色,不能操作。但执行命令行,返回结果依旧是Done,感觉不太合理。实际上我的伸缩组没有使能,伸缩策略是不能执行的。

IamFive commented 7 years ago

加上debug参数,把日志打出来,这个应该不会是客户端的问题。应该是服务端没做验证还是咋样。

caoyameng commented 7 years ago

root@ubuntu:/home/test# openstack as policy execute 9e0446ba-9e37-4cfb-bba6-3faf4b190ec6 --debug --insecure START with options: [u'as', u'policy', u'execute', u'9e0446ba-9e37-4cfb-bba6-3faf4b190ec6', u'--debug', u'--insecure'] options: Namespace(access_token='', access_token_endpoint='', access_token_type='', auth_type='', auth_url='https://iam.eu-de.otc.t-systems.com/v3', cacert=None, cert='', client_id='', client_secret='', cloud='', code='', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', insecure=True, interface='', key='', log_file=None, openid_scope='', os_antiddos_api_version=None, os_antiddos_endpoint_override='https://antiddos.eu-de.otc.t-systems.com', os_as_api_version=None, os_as_endpoint_override='https://as.eu-de.otc.t-systems.com', os_beta_command=False, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', os_workspace_api_version=None, os_workspace_endpoint_override='https://workspace.eu-de.otc.t-systems.com', passcode='', password='', project_domain_id='', project_domain_name='', project_id='', project_name='eu-de', protocol='', redirect_uri='', region_name='eu-de', timing=False, token='', trust_id='', url='', user_domain_id='075361408a044fbba0e55a0cb70993c5', user_domain_name='', user_id='', username='ims_autotest', verbose_level=3, verify=None) Auth plugin password selected auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', 'antiddos_endpoint_override': 'https://antiddos.eu-de.otc.t-systems.com', u'object_store_api_version': u'1', 'username': 'ims_autotest', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': 'eu-de', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'project_domain_id': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, 'password': '', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', 'workspace_endpoint_override': 'https://workspace.eu-de.otc.t-systems.com', u'volume_api_version': u'2', 'as_endpoint_override': 'https://as.eu-de.otc.t-systems.com', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}} defaults: {u'auth_type': 'password', u'status': u'active', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', u'container_infra_api_version': u'1', u'metering_api_version': u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'interface': None, u'disable_vendor_agent': {}} cloud cfg: {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', 'antiddos_endpoint_override': 'https://antiddos.eu-de.otc.t-systems.com', u'object_store_api_version': u'1', 'username': 'ims_autotest', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': 'eu-de', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'project_domain_id': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, 'password': '', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', 'workspace_endpoint_override': 'https://workspace.eu-de.otc.t-systems.com', u'volume_api_version': u'2', 'as_endpoint_override': 'https://as.eu-de.otc.t-systems.com', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}} compute API version 2, cmd group openstack.compute.v2 network API version 2, cmd group openstack.network.v2 image API version 2, cmd group openstack.image.v2 volume API version 2, cmd group openstack.volume.v2 identity API version 3, cmd group openstack.identity.v3 object_store API version 1, cmd group openstack.object_store.v1 antiddos API version 1, cmd group openstack.antiddos.v1 auto_scaling API version 1, cmd group openstack.auto_scaling.v1 workspace API version 1, cmd group openstack.workspace.v1 Auth plugin password selected auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', 'antiddos_endpoint_override': 'https://antiddos.eu-de.otc.t-systems.com', u'object_store_api_version': u'1', 'username': 'ims_autotest', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': 'eu-de', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'project_domain_id': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, 'password': '', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', 'workspace_endpoint_override': 'https://workspace.eu-de.otc.t-systems.com', u'volume_api_version': u'2', 'as_endpoint_override': 'https://as.eu-de.otc.t-systems.com', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}} Auth plugin password selected auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', 'antiddos_endpoint_override': 'https://antiddos.eu-de.otc.t-systems.com', u'object_store_api_version': u'1', 'username': 'ims_autotest', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': 'eu-de', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'project_domain_id': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, 'password': '', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', 'workspace_endpoint_override': 'https://workspace.eu-de.otc.t-systems.com', u'volume_api_version': u'2', 'as_endpoint_override': 'https://as.eu-de.otc.t-systems.com', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}} command: as policy execute -> asclient.osc.v1.policy.ExecuteAutoScalingPolicy Auth plugin password selected auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', 'antiddos_endpoint_override': 'https://antiddos.eu-de.otc.t-systems.com', u'object_store_api_version': u'1', 'username': 'ims_autotest', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': 'eu-de', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'project_domain_id': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, 'password': '', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', 'workspace_endpoint_override': 'https://workspace.eu-de.otc.t-systems.com', u'volume_api_version': u'2', 'as_endpoint_override': 'https://as.eu-de.otc.t-systems.com', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}} Using auth plugin: password Using parameters {'username': 'ims_autotest', 'project_name': 'eu-de', 'user_domain_id': '075361408a044fbba0e55a0cb70993c5', 'auth_url': 'https://iam.eu-de.otc.t-systems.com/v3', 'password': '', 'project_domain_id': 'default'} Get authref REQ: curl -g -i --insecure -X GET https://iam.eu-de.otc.t-systems.com/v3 -H "Accept: application/json" -H "User-Agent: osc-lib/1.3.0 keystoneauth1/2.18.0 python-requests/2.13.0 CPython/2.7.6" Starting new HTTPS connection (1): iam.eu-de.otc.t-systems.com /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings SNIMissingWarning /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) https://iam.eu-de.otc.t-systems.com:443 "GET /v3 HTTP/1.1" 200 None RESP: [200] Server: Web Server Date: Fri, 03 Mar 2017 11:45:10 GMT Transfer-Encoding: chunked Connection: keep-alive, keep-alive Cache-Control: private, no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Encoding: gzip X-Frame-Options: SAMEORIGIN, DENY X-Content-Type-Options: nosniff, nosniff X-Download-Options: noopen, noopen X-XSS-Protection: 1; mode=block, 1; mode=block; Content-Type: application/json Strict-Transport-Security: max-age=31536000; includeSubdomains; RESP BODY: {"version": {"status": "stable", "updated": "2013-03-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v3+xml"}], "id": "v3.0", "links": [{"href": "https://iam.eu-de.otc.t-systems.com/v3/", "rel": "self"}]}}

Making authentication request to https://iam.eu-de.otc.t-systems.com/v3/auth/tokens /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) https://iam.eu-de.otc.t-systems.com:443 "POST /v3/auth/tokens HTTP/1.1" 201 None {"token": {"methods": ["password"], "roles": [{"name": "te_agency", "id": "8f579808e84440618a29e12ec7dc85bb"}, {"name": "te_admin", "id": "d376f78e23b840d1bbdbd5a2cb529c97"}, {"id": "0", "name": "op_gated_rds_pg"}, {"id": "0", "name": "op_gated_mrs"}, {"id": "0", "name": "op_gated_mrsmode"}], "expires_at": "2017-03-04T11:45:10.471000Z", "project": {"domain": {"name": "ims_autotest", "id": "075361408a044fbba0e55a0cb70993c5"}, "name": "eu-de", "id": "fdab807014264726a9ad37485a8838e4"}, "catalog": [{"endpoints": [{"url": "https://dns.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "21019440405e4fd29c9fee733a554f9d"}], "type": "dns", "id": "e03dee5f6f254e34a400c08dc8c78349"}, {"endpoints": [{"url": "https://ims.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "2d43aa19818a498390b74de62f8a9514"}], "type": "image", "id": "7bf85b08cec94566b079364314933359"}, {"endpoints": [{"url": "https://vpc.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "402a68c63b20424b9a95fb3b98960b5f"}], "type": "network", "id": "0a4255c2b23e4c47989bde89c4fdfa97"}, {"endpoints": [{"url": "https://rts.eu-de.otc.t-systems.com/v1/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "45f82c47c41747ffadaa00ae2eaea1ae"}], "type": "orchestration", "id": "24c27719d8c8475899a601edd7ec7b13"}, {"endpoints": [{"url": "https://evs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "792152d6c9944c65ac8c284999e72d77"}], "type": "volumev2", "id": "242fc4f619584a4784c70b77d4f13623"}, {"endpoints": [{"url": "https://ecs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "967e00662dec4d5da8f9ef77b19e6eed"}], "type": "compute", "id": "875ee02920614b36b8a6806a54dc453f"}, {"endpoints": [{"url": "https://evs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "c0c0f6a12c7e4b3991e59fa495fb4933"}], "type": "volume", "id": "80c5d2c4b3c045a8bd04473186a52ec4"}, {"endpoints": [{"url": "https://iam.eu-de.otc.t-systems.com/v3", "interface": "public", "region": "", "region_id": "", "id": "7453a614eb694003a51ecb21d35fcd08"}], "type": "identity", "id": "112944300d74423885b00cbee4a01925", "name": "keystone"}], "user": {"domain": {"name": "ims_autotest", "id": "075361408a044fbba0e55a0cb70993c5"}, "id": "3cfe8835e168400b9572e34e5943b25d", "name": "ims_autotest"}, "issued_at": "2017-03-03T11:45:10.471000Z"}} run(Namespace(policy=u'9e0446ba-9e37-4cfb-bba6-3faf4b190ec6')) Instantiating as client: <class 'asclient.v1.client.Client'> Instantiating as client with kwargs: {'interface': None, 'region_name': 'eu-de'} Instantiating as client with endpoint: https://as.eu-de.otc.t-systems.com Making authentication request to https://iam.eu-de.otc.t-systems.com/v3/auth/tokens /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) https://iam.eu-de.otc.t-systems.com:443 "POST /v3/auth/tokens HTTP/1.1" 201 None {"token": {"methods": ["password"], "roles": [{"name": "te_agency", "id": "8f579808e84440618a29e12ec7dc85bb"}, {"name": "te_admin", "id": "d376f78e23b840d1bbdbd5a2cb529c97"}, {"id": "0", "name": "op_gated_rds_pg"}, {"id": "0", "name": "op_gated_mrs"}, {"id": "0", "name": "op_gated_mrsmode"}], "expires_at": "2017-03-04T11:45:10.522000Z", "project": {"domain": {"name": "ims_autotest", "id": "075361408a044fbba0e55a0cb70993c5"}, "name": "eu-de", "id": "fdab807014264726a9ad37485a8838e4"}, "catalog": [{"endpoints": [{"url": "https://dns.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "21019440405e4fd29c9fee733a554f9d"}], "type": "dns", "id": "e03dee5f6f254e34a400c08dc8c78349"}, {"endpoints": [{"url": "https://ims.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "2d43aa19818a498390b74de62f8a9514"}], "type": "image", "id": "7bf85b08cec94566b079364314933359"}, {"endpoints": [{"url": "https://vpc.eu-de.otc.t-systems.com", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "402a68c63b20424b9a95fb3b98960b5f"}], "type": "network", "id": "0a4255c2b23e4c47989bde89c4fdfa97"}, {"endpoints": [{"url": "https://rts.eu-de.otc.t-systems.com/v1/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "45f82c47c41747ffadaa00ae2eaea1ae"}], "type": "orchestration", "id": "24c27719d8c8475899a601edd7ec7b13"}, {"endpoints": [{"url": "https://evs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "792152d6c9944c65ac8c284999e72d77"}], "type": "volumev2", "id": "242fc4f619584a4784c70b77d4f13623"}, {"endpoints": [{"url": "https://ecs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "967e00662dec4d5da8f9ef77b19e6eed"}], "type": "compute", "id": "875ee02920614b36b8a6806a54dc453f"}, {"endpoints": [{"url": "https://evs.eu-de.otc.t-systems.com/v2/fdab807014264726a9ad37485a8838e4", "interface": "public", "region": "eu-de", "region_id": "eu-de", "id": "c0c0f6a12c7e4b3991e59fa495fb4933"}], "type": "volume", "id": "80c5d2c4b3c045a8bd04473186a52ec4"}, {"endpoints": [{"url": "https://iam.eu-de.otc.t-systems.com/v3", "interface": "public", "region": "", "region_id": "", "id": "7453a614eb694003a51ecb21d35fcd08"}], "type": "identity", "id": "112944300d74423885b00cbee4a01925", "name": "keystone"}], "user": {"domain": {"name": "ims_autotest", "id": "075361408a044fbba0e55a0cb70993c5"}, "id": "3cfe8835e168400b9572e34e5943b25d", "name": "ims_autotest"}, "issued_at": "2017-03-03T11:45:10.522000Z"}} REQ: curl -g -i --insecure -X GET https://as.eu-de.otc.t-systems.com/autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_policy/9e0446ba-9e37-4cfb-bba6-3faf4b190ec6 -H "User-Agent: osc-lib/1.3.0 Auto Scaling Client/v1 keystoneauth1/2.18.0 python-requests/2.13.0 CPython/2.7.6" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}64cad1b52bf5a4b48b1ee2dbe524fc7f4e7cf609" Starting new HTTPS connection (1): as.eu-de.otc.t-systems.com /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) https://as.eu-de.otc.t-systems.com:443 "GET /autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_policy/9e0446ba-9e37-4cfb-bba6-3faf4b190ec6 HTTP/1.1" 200 None RESP: [200] Server: Web Server Date: Fri, 03 Mar 2017 11:45:10 GMT Transfer-Encoding: chunked Connection: keep-alive, keep-alive Cache-Control: private, no-cache, no-store, must-revalidate, no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT, Thu, 01 Jan 1970 00:00:00 GMT X-Content-Type-Options: nosniff, nosniff, nosniff Pragma: no-cache X-Frame-Options: SAMEORIGIN, SAMEORIGIN, DENY Accept-Ranges: bytes Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept X-XSS-Protection: 1; mode=block, 1; mode=block, 1; mode=block; request_id: 4d2ea57b-d8e3-4bbd-bbef-9f98e738aca5 X-Download-Options: noopen, noopen Content-Type: application/json Strict-Transport-Security: max-age=31536000; includeSubdomains; RESP BODY: {"scaling_policy":{"scaling_policy_id":"9e0446ba-9e37-4cfb-bba6-3faf4b190ec6","scaling_group_id":"42908153-b6d5-40d9-9110-2deb922c926b","scaling_policy_name":"as-policy-xus2","scaling_policy_type":"SCHEDULED","scheduled_policy":{"launch_time":"2017-03-09T11:50Z"},"cool_down_time":900,"scaling_policy_action":{"operation":"ADD","instance_number":1},"policy_status":"INSERVICE","create_time":"2017-03-03T11:43:25Z"}}

REQ: curl -g -i --insecure -X POST https://as.eu-de.otc.t-systems.com/autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_policy/9e0446ba-9e37-4cfb-bba6-3faf4b190ec6/action -H "User-Agent: osc-lib/1.3.0 Auto Scaling Client/v1 keystoneauth1/2.18.0 python-requests/2.13.0 CPython/2.7.6" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}64cad1b52bf5a4b48b1ee2dbe524fc7f4e7cf609" -d '{"action": "execute"}' /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) https://as.eu-de.otc.t-systems.com:443 "POST /autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_policy/9e0446ba-9e37-4cfb-bba6-3faf4b190ec6/action HTTP/1.1" 500 None RESP: [500] Server: Web Server Date: Fri, 03 Mar 2017 11:45:10 GMT Transfer-Encoding: chunked Connection: keep-alive, keep-alive X-Content-Type-Options: nosniff, nosniff Pragma: no-cache X-Frame-Options: SAMEORIGIN, SAMEORIGIN Accept-Ranges: bytes Cache-Control: no-cache, no-store, must-revalidate, no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block, 1; mode=block request_id: 76f15e21-a875-4db1-9236-d8046806d31a X-Download-Options: noopen Content-Type: application/json RESP BODY: {"error":{"code":"AS.0001","message":"System error."}}

Request returned failure status: 500 [AS.0001] System error. (HTTP 500) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand result = cmd.run(parsed_args) File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 90, in run return self.take_action(parsed_args) or 0 File "/usr/local/lib/python2.7/dist-packages/asclient/osc/v1/policy.py", line 193, in take_action policy_mgr.execute(policy.id) File "/usr/local/lib/python2.7/dist-packages/asclient/v1/policy_mgr.py", line 235, in execute return self._create(url, json=dict(action="execute"), raw=True) File "/usr/local/lib/python2.7/dist-packages/asclient/common/manager.py", line 101, in _create resp, body = self.http_client.post(url, json=json, headers=headers) File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 223, in post return self.request(url, 'POST', kwargs) File "/usr/local/lib/python2.7/dist-packages/asclient/common/httpclient.py", line 56, in request raise exceptions.from_http_error(http) InternalServerError: [AS.0001] System error. (HTTP 500) clean_up ExecuteAutoScalingPolicy: [AS.0001] System error. (HTTP 500) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run ret_val = super(OpenStackShell, self).run(argv) File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run result = self.run_subcommand(remainder) File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand ret_value = super(OpenStackShell, self).run_subcommand(argv) File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand result = cmd.run(parsed_args) File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 90, in run return self.take_action(parsed_args) or 0 File "/usr/local/lib/python2.7/dist-packages/asclient/osc/v1/policy.py", line 193, in take_action policy_mgr.execute(policy.id) File "/usr/local/lib/python2.7/dist-packages/asclient/v1/policy_mgr.py", line 235, in execute return self._create(url, json=dict(action="execute"), raw=True) File "/usr/local/lib/python2.7/dist-packages/asclient/common/manager.py", line 101, in _create resp, body = self.http_client.post(url, json=json, headers=headers) File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 223, in post return self.request(url, 'POST', kwargs) File "/usr/local/lib/python2.7/dist-packages/asclient/common/httpclient.py", line 56, in request raise exceptions.from_http_error(http) InternalServerError: [AS.0001] System error. (HTTP 500)

IamFive commented 7 years ago

这个是对的啊。 你执行的时候,会显示 [AS.0001] System error. (HTTP 500) 这个就是服务器端返回的信息。

RESP BODY: {"error":{"code":"AS.0001","message":"System error."}}
IamFive commented 7 years ago

如果觉得显示的信息有问题,要让服务端去改。 @ZhangRui219