我是openstack / cloudify的新手,尝试在openstack上尝试使用cloudify启动cirros实例。
我使用以下命令启动它
cfy bootstrap --task-retries 1 -p cloudify-manager-blueprints/openstack/openstack.yaml -i cloudify-manager-blueprints/openstack/inputs.json.template
这是input.json
"keystone_username": "",
"keystone_password": "",
"keystone_tenant_name": "",
"keystone_url": "",
"region": "",
"manager_public_key_name": "",
"agent_public_key_name": "",
"image_id": "19c8a468-93c7-4110-8022-40a4f35deb0c",
"flavor_id": "2",
"external_network_name": "extnet",
"use_existing_manager_keypair": false,
"use_existing_agent_keypair": false,
"manager_server_name": "cloudify-management-server",
"manager_server_user": "ubuntu",
"manager_server_user_home": "/home/ubuntu",
"manager_private_key_path": "~/.ssh/cloudify-manager-kp.pem",
"agent_private_key_path": "~/.ssh/cloudify-agent-kp.pem",
"agents_user": "cirros",
"nova_url": "",
"neutron_url": "",
"resources_prefix": ""
yaml是默认的
主要错误行是 致命错误:需要提示连接或sudo密码(主机:172.16.7.16),但是中止提示设置为True
在json文件中声明以下内容是否正确agent_user => cirros cirros image的用户名是cirros
这是完整的错误
Fatal error: Needed to prompt for a connection or sudo password (host: 172.16.7.16), but abort-on-prompts was set to True
Aborting.
2015-01-01 11:33:50 LOG <manager> [manager_6ce27.configure] ERROR: Exception raised on operation [fabric_plugin.tasks.run_task] invocation
Traceback (most recent call last):
File "/root/virt-cloudy-env/lib/python2.7/site-packages/cloudify/decorators.py", line 125, in wrapper
result = func(*args, **kwargs)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 55, in run_task
_run_task(task, task_properties, fabric_env)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 76, in _run_task
task(**task_properties)
File "<string>", line 39, in configure
File "<string>", line 46, in _copy_openstack_configuration_to_manager
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 639, in host_prompting_wrapper
return func(*args, **kwargs)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/operations.py", line 346, in put
ftp = SFTP(env.host_string)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/sftp.py", line 30, in __init__
self.ftp = connections[host_string].open_sftp()
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 151, in __getitem__
self.connect(key)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 143, in connect
self[key] = connect(user, host, port, cache=self)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 523, in connect
password = prompt_for_password(text)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 596, in prompt_for_password
handle_prompt_abort("a connection or sudo password")
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/utils.py", line 151, in handle_prompt_abort
abort(reason % "abort-on-prompts was set to True")
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/utils.py", line 32, in abort
raise env.abort_exception(msg)
FabricTaskError: Needed to prompt for a connection or sudo password (host: 172.16.7.16), but abort-on-prompts was set to True
2015-01-01 11:33:50 CFY <manager> [manager_6ce27.configure] Task failed 'fabric_plugin.tasks.run_task' -> Needed to prompt for a connection or sudo password (host: 172.16.7.16), but abort-on-prompts was set to True [attempt 2/2]
2015-01-01 11:33:50 CFY <manager> 'install' workflow execution failed: Workflow failed: Task failed 'fabric_plugin.tasks.run_task' -> Needed to prompt for a connection or sudo password (host: 172.16.7.16), but abort-on-prompts was set to True
bootstrap failed!
如果我将管理用户更改为当前用户(root) 我收到以下错误
2015-01-01 16:38:51 LOG <manager> [manager_db1f7.configure] INFO: environment prepared successfully
2015-01-01 16:39:05 LOG <manager> [manager_db1f7.configure] ERROR: Exception raised on operation [fabric_plugin.tasks.run_task] invocation
Traceback (most recent call last):
File "/root/virt-cloudy-env/lib/python2.7/site-packages/cloudify/decorators.py", line 125, in wrapper
result = func(*args, **kwargs)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 55, in run_task
_run_task(task, task_properties, fabric_env)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 76, in _run_task
task(**task_properties)
File "<string>", line 39, in configure
File "<string>", line 46, in _copy_openstack_configuration_to_manager
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/network.py", line 639, in host_prompting_wrapper
return func(*args, **kwargs)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/operations.py", line 346, in put
ftp = SFTP(env.host_string)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/fabric/sftp.py", line 30, in __init__
self.ftp = connections[host_string].open_sftp()
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/client.py", line 345, in open_sftp
return self._transport.open_sftp_client()
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/transport.py", line 711, in open_sftp_client
return SFTPClient.from_transport(self)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/sftp_client.py", line 102, in from_transport
return cls(chan)
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/sftp_client.py", line 84, in __init__
server_version = self._send_version()
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/sftp.py", line 108, in _send_version
t, data = self._read_packet()
File "/root/virt-cloudy-env/lib/python2.7/site-packages/paramiko/sftp.py", line 179, in _read_packet
raise SFTPError('Garbage packet received')
SFTPError: Garbage packet received
2015-01-01 16:39:05 CFY <manager> [manager_db1f7.configure] Task failed 'fabric_plugin.tasks.run_task' -> Garbage packet received [attempt 1/2]
答案 0 :(得分:1)
所以似乎客户端无法连接到管理机器。
当您尝试与错误的用户建立连接时,这些错误通常会弹出。
确保“manager_server_user”正确无误。
如果您仍然遇到问题,可以在cloudify-users组发帖:
https://groups.google.com/forum/#!forum/cloudify-users
感谢
答案 1 :(得分:0)
仅在分享我的经验后,遇到同样的错误,请确保您对pem文件拥有正确的所有者cfyuser:cfyuser
。
试试手动ssh:
$ sudo -u cfyuser ssh -i <path/to/keypair.pem> ubuntu@<ip>