0

我是 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 是默认的

主要错误行是 Fatal error: Needed to prompt for a connection or sudo password (host: 172.16.7.16),但 abort-on-prompts 设置为 True

是否有权在 json 文件中声明以下内容 agent_user => cirros cirros 图像的用户名是 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]
4

2 回答 2

1

所以客户端似乎无法连接到管理机器。

当您尝试连接错误的用户时,通常会弹出这些错误。

确保“manager_server_user”是正确的。

如果您仍然遇到问题,您可以在 cloudify-users 组发帖:

https://groups.google.com/forum/#!forum/cloudify-users

谢谢

于 2015-01-04T12:56:30.823 回答
0

只是想在我遇到相同错误后分享,确保您拥有正确cfyuser:cfyuser的 pem 文件所有者。尝试手动 ssh:

$ sudo -u cfyuser ssh -i <path/to/keypair.pem> ubuntu@<ip>
于 2018-08-12T22:47:56.660 回答