Closed caoyameng closed 7 years ago
你要看help文档啊, --file=dest-file=source-file, source-file 是指你本地的文件路径,你本机没有 c:\1.txt 自然就没法打开文件了。
本机有文件,我直接在DT环境的控制器界面注册文件是可以的
文件路径必须是 python 可以读取的路径。window下在shell中可能要改成 c:\\1.txt
START with options: [u'as', u'config', u'create', u'test-config-4', u'--instance-id=4246877d-fc43-420d-86bf-16db3de14023', u'--key-name=KeyPair-f7b9', u'--metadata=key1=value1', u'--metadata=key2=value2', u'--metadata=key3=value3', u'--file=/etc/1.txt=c:\1.txt', u'--file=/etc/2.txt=c:\2.txt', 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 config create -> asclient.osc.v1.config.CreateAutoScalingConfig 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: Mon, 06 Mar 2017 05:11:36 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-07T05:11:42.472000Z", "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-06T05:11:42.472000Z"}} run(Namespace(admin_pass=None, data_volumes=[], file=[u'/etc/1.txt=c:\1.txt', u'/etc/2.txt=c:\2.txt'], flavor=None, image=None, instance_id=u'4246877d-fc43-420d-86bf-16db3de14023', key_name=u'KeyPair-f7b9', metadata={u'key3': u'value3', u'key2': u'value2', u'key1': u'value1'}, name=u'test-config-4', root_volume=None)) Instantiating compute client for API Version Major: 2, Minor: 0 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 Can't open file 'c:\1.txt': [Errno 2] No such file or directory: 'c:\1.txt' 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/config.py", line 78, in take_action msg % dict(source=src, exception=e) CommandError: Can't open file 'c:\1.txt': [Errno 2] No such file or directory: 'c:\1.txt' clean_up CreateAutoScalingConfig: Can't open file 'c:\1.txt': [Errno 2] No such file or directory: 'c:\1.txt' 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/config.py", line 78, in take_action msg % dict(source=src, exception=e) CommandError: Can't open file 'c:\1.txt': [Errno 2] No such file or directory: 'c:\1.txt'
END return value: 1
root@ubuntu:~# ls 1.txt aaa.txt root@ubuntu:~# openstack as config create test-config-6 --instance-id=5d5b6687-986a-4651-9014-69ef67def163 --key-name=KeyPair-f7b9 --metadata=key1=value1 --metadata=key2=value2 --metadata=key3=value3 --file=/etc/1.txt=/root/aaa.txt --insecure [AS.1027] The scaling config personality is invalid. (HTTP 400) root@ubuntu:~# openstack as config create test-config-6 --instance-id=5d5b6687-986a-4651-9014-69ef67def163 --key-name=KeyPair-f7b9 --metadata=key1=value1 --metadata=key2=value2 --metadata=key3=value3 --file=/etc/1.txt=/root/1.txt --insecure [AS.1027] The scaling config personality is invalid. (HTTP 400) root@ubuntu:~# openstack as config create test-config-6 --instance-id=5d5b6687-986a-4651-9014-69ef67def163 --key-name=KeyPair-f7b9 --metadata=key1=value1 --metadata=key2=value2 --metadata=key3=value3 --file=/etc/1.txt=/root/1.txt --debug --insecure START with options: [u'as', u'config', u'create', u'test-config-6', u'--instance-id=5d5b6687-986a-4651-9014-69ef67def163', u'--key-name=KeyPair-f7b9', u'--metadata=key1=value1', u'--metadata=key2=value2', u'--metadata=key3=value3', u'--file=/etc/1.txt=/root/1.txt', 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 config create -> asclient.osc.v1.config.CreateAutoScalingConfig 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: Mon, 06 Mar 2017 07:36:57 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-07T07:36:57.825000Z", "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-06T07:36:57.825000Z"}} run(Namespace(admin_pass=None, data_volumes=[], file=[u'/etc/1.txt=/root/1.txt'], flavor=None, image=None, instance_id=u'5d5b6687-986a-4651-9014-69ef67def163', key_name=u'KeyPair-f7b9', metadata={u'key3': u'value3', u'key2': u'value2', u'key1': u'value1'}, name=u'test-config-6', root_volume=None)) Instantiating compute client for API Version Major: 2, Minor: 0 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-07T07:36:57.933000Z", "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-06T07:36:57.933000Z"}} REQ: curl -g -i --insecure -X POST https://as.eu-de.otc.t-systems.com/autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_configuration -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}ada977410dcc0725aba9985106a77dcd1e2d8870" -d '{"instance_config": {"instance_id": "5d5b6687-986a-4651-9014-69ef67def163", "key_name": "KeyPair-f7b9", "metadata": {"key3": "value3", "key2": "value2", "key1": "value1"}, "personality": [{"content": "MTIzNAo=", "path": "/etc/1.txt"}]}, "scaling_configurationname": "test-config-6"}' 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 "POST /autoscaling-api/v1/fdab807014264726a9ad37485a8838e4/scaling_configuration HTTP/1.1" 400 None RESP: [400] Server: Web Server Date: Mon, 06 Mar 2017 07:37:02 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 Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block, 1; mode=block request_id: fc7a7c7d-2308-41f3-b7ee-9d2923dffed1 X-Download-Options: noopen Content-Type: application/json RESP BODY: {"error":{"code":"AS.1027","message":"The scaling config personality is invalid."}}
Request returned failure status: 400 [AS.1027] The scaling config personality is invalid. (HTTP 400) 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/config.py", line 92, in take_action config = mgr.create(args.name, kwargs) File "/usr/local/lib/python2.7/dist-packages/asclient/v1/config_mgr.py", line 152, in create return self._create("/scaling_configuration", json=json) 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) BadRequest: [AS.1027] The scaling config personality is invalid. (HTTP 400) clean_up CreateAutoScalingConfig: [AS.1027] The scaling config personality is invalid. (HTTP 400) 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/config.py", line 92, in take_action config = mgr.create(args.name, kwargs) File "/usr/local/lib/python2.7/dist-packages/asclient/v1/config_mgr.py", line 152, in create return self._create("/scaling_configuration", json=json) 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) BadRequest: [AS.1027] The scaling config personality is invalid. (HTTP 400)
END return value: 1
创建伸缩配置,带文件注入,path和content都要传
请查看你贴的 log,post的数据里是包含 path 和 content 的
{"instance_config": {"instance_id": "5d5b6687-986a-4651-9014-69ef67def163", "key_name": "KeyPair-f7b9", "metadata": {"key3": "value3", "key2": "value2", "key1": "value1"}, "personality": [{"content": "MTIzNAo=", "path": "/etc/1.txt"}]}, "scaling_configuration_name": "test-config-6"}
我把你标红的截图给杨洁看了,杨洁回复:Windows和linux镜像对应的文件注入path格式不一样
理解了,因为你选的是 window 镜像吧。
那你注入的路径写的有问题。要改成 --file=c:\\1.txt=/root/aaa.txt
按照文件命令样式,注册文件没测试成功。 openstack as config create test-config-1 --instance-id=92b3773b-d751-4437-b8ca-2ab1f10248e0 --key-name=KeyPair-as-01 --file=/etc/1.txt=c:\1.txt --file=/etc/2.txt=c:\2.txt 提示:Can’t open file ‘c:\1.txt’;[Erro 2] No such file directory:’c:\1.txt’.