cloudify-cosmo / cloudify-manager-blueprints

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot bootstrap simple-manager (version 3.2) on existing ubuntu 14.04 vm.

wpc009 opened this issue · comments

commented

The bootstrap can successfully download the docker image. and start a new container.
But after that. one of a curl --fail -XPOST localhost:8101/provider/context?update=False command failed. The error logs says 409 CONFLICT

partial logs.

[192.168.0.242] out:
[192.168.0.242] out: Preparing to unpack .../cloudify-centos-final-agent_3.2.1-ga-b212_amd64.deb ...
[192.168.0.242] out:
[192.168.0.242] out: Unpacking cloudify-centos-final-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out: Selecting previously unselected package cloudify-trusty-agent.
[192.168.0.242] out:
[192.168.0.242] out: Preparing to unpack .../cloudify-ubuntu-agent_3.2.1-ga-b212_amd64.deb ...
[192.168.0.242] out:
[192.168.0.242] out: Unpacking cloudify-trusty-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out: Selecting previously unselected package cloudify-windows-agent.
[192.168.0.242] out:
[192.168.0.242] out: Preparing to unpack .../cloudify-windows-agent_3.2.1-ga-b212_amd64.deb ...
[192.168.0.242] out:
[192.168.0.242] out: Unpacking cloudify-windows-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out: Setting up cloudify-centos-final-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Installing cloudify-centos-final-agent version 3.2.1...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: cloudify-centos-final-agent 3.2.1 installation completed successfully!
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Setting up cloudify-trusty-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Installing cloudify-trusty-agent version 3.2.1...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: cloudify-trusty-agent 3.2.1 installation completed successfully!
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Setting up cloudify-windows-agent (3.2.1) ...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Installing cloudify-windows-agent version 3.2.1...
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: cloudify-windows-agent 3.2.1 installation completed successfully!
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out:
[192.168.0.242] out: Data-only container
[192.168.0.242] out:
[192.168.0.242] out:

2015-10-09 17:53:19 LOG <manager> [manager_be53b.start] INFO: starting a new cloudify mgmt docker services container
[192.168.0.242] run: sudo docker run --name cfy -t --volumes-from data --privileged=False -p 80:80 -p 5555:5555 -p 5672:5672 -p 53229:53229 -p 8100:8100 -p 8101:8101 -p 9200:9200 -p 8086:8086 -e MANAGEMENT_IP=10.10.10.214 -e MANAGER_REST_SECURITY_CONFIG_PATH=/root/rest-security-config.json --restart=always -d cloudify /sbin/my_init
[192.168.0.242] out: cacd3e32b3d263a57f9f3f95a474ac8f439de5b4248096fbe7459a81699b0669
[192.168.0.242] out:

2015-10-09 17:53:20 LOG <manager> [manager_be53b.start] INFO: waiting for cloudify management services to start on port 80
2015-10-09 17:53:20 LOG <manager> [manager_be53b.start] INFO: waiting for url http://192.168.0.242:80/version to become available
2015-10-09 17:53:28 LOG <manager> [manager_be53b.start] INFO: Setting provider context on management server...
[192.168.0.242] put: <file obj> -> /home/u/provider-context.json
[192.168.0.242] run: sudo docker exec -t cfy curl --fail -XPOST localhost:8101/provider/context?update=False -H "Content-Type: application/json" -d @/tmp/home/provider-context.json
[192.168.0.242] out: curl: (22) The requested URL returned error: 409 CONFLICT
[192.168.0.242] out:
[192.168.0.242] out:


Fatal error: run() received nonzero return code 22 while executing!

Requested: sudo docker exec -t cfy curl --fail -XPOST localhost:8101/provider/context?update=False -H "Content-Type: application/json" -d @/tmp/home/provider-context.json
Executed: /bin/bash -l -c "sudo docker exec -t cfy curl --fail -XPOST localhost:8101/provider/context?update=False -H \"Content-Type: application/json\" -d @/tmp/home/provider-context.json"

Aborting.
2015-10-09 17:55:35 LOG <manager> [manager_be53b.start] ERROR: Exception raised on operation [fabric_plugin.tasks.run_module_task] invocation
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloudify/decorators.py", line 125, in wrapper
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 89, in run_module_task
    return _run_task(task, task_properties, fabric_env)
  File "/usr/local/lib/python2.7/site-packages/fabric_plugin/tasks.py", line 95, in _run_task
    return task(**task_properties)
  File "/usr/local/lib/python2.7/site-packages/cloudify_cli/bootstrap/tasks.py", line 436, in bootstrap_docker
    return post_bootstrap_actions()
  File "/usr/local/lib/python2.7/site-packages/cloudify_cli/bootstrap/tasks.py", line 304, in post_bootstrap_actions
    _upload_provider_context(agent_remote_key_path, provider_context)
  File "/usr/local/lib/python2.7/site-packages/cloudify_cli/bootstrap/tasks.py", line 729, in _upload_provider_context
    _run_command_in_cfy(upload_provider_context_cmd, terminal=True)
  File "/usr/local/lib/python2.7/site-packages/cloudify_cli/bootstrap/tasks.py", line 745, in _run_command_in_cfy
    _run_command(full_command)
  File "/usr/local/lib/python2.7/site-packages/cloudify_cli/bootstrap/tasks.py", line 733, in _run_command
    return fabric.api.run(command, shell_escape=shell_escape, pty=pty)
  File "/usr/local/lib/python2.7/site-packages/fabric/network.py", line 639, in host_prompting_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/fabric/operations.py", line 1042, in run
    shell_escape=shell_escape)
  File "/usr/local/lib/python2.7/site-packages/fabric/operations.py", line 932, in _run_command
    error(message=msg, stdout=out, stderr=err)
  File "/usr/local/lib/python2.7/site-packages/fabric/utils.py", line 327, in error
    return func(message)
  File "/usr/local/lib/python2.7/site-packages/fabric/utils.py", line 32, in abort
    raise env.abort_exception(msg)
FabricTaskError: run() received nonzero return code 22 while executing!

Requested: sudo docker exec -t cfy curl --fail -XPOST localhost:8101/provider/context?update=False -H "Content-Type: application/json" -d @/tmp/home/provider-context.json
Executed: /bin/bash -l -c "sudo docker exec -t cfy curl --fail -XPOST localhost:8101/provider/context?update=False -H \"Content-Type: application/json\" -d @/tmp/home/provider-context.json"
commented

Usually, this happens when the provider context has already been posted. Where exactly are you trying to bootstrap? Is it a clean machine?

commented

I'm not sure. I mean it is a clean machine at first.
How can I make it clean?

commented

I tried again with a clean VM. but the result is the same. Still 409 Conflict error

commented

Are you running on Openstack by any chance and using a volume as your storage? Maybe you already bootstrapped once and am now using that same volume that already contains elasticsearch indices?
Can you provide a link to the entire log?

I have same problem, 409 Conflict error on setting provider context.

I install cloudify 3.2.1 on Openstack Kilo with using volume. Following the installation manual from getcloudify.org: http://getcloudify.org/guide/3.2/getting-started-bootstrapping.html

I tried to increase the task-retries to 30, no good.
please see the entire log attached. (Some error is due to slow vm boot-up, ignore that.)

Particularly the provider context error: initially, it is 500 Internal server error, then became 504 Gateway Time-out, at last became 409 Conflict error. what is the problem here

log_cloudify_openstack_bootstrap.txt