Closed liuweiii closed 9 years ago
Hi Please create a post on the Cloudify-users google group for this matter, here: https://groups.google.com/forum/#!forum/cloudify-users
Could you also provide the execution logs? Also, your blueprint seems like an invalid yaml from the way you posted it here - note that your "userdata" input begins a dictionary but then there are no values, and immediately you move on to the "node_types:" section
I'm sorry I can't visit google group for the GFW(Great Firewall of China). yesterday I forget to write the value of "userdata" input.in fact,my yaml is: ---------------------begin--------------------------- inputs: ..image: ....description: > ......Image to be used when launching agent VM's ..flavor: ....description: > ......Flavor of the agent VM's ..agent_user: ....description: > ......User for connecting to agent VM's ..userdata: ....description: > ......execute after VM is created node_types: ..nodecellar.nodes.MonitoredServer: ....derived_from: cloudify.openstack.nodes.Server ....properties: ......cloudify_agent: ........default: ..........user: { get_input: agent_user } ......server: ........default: ..........image: { get_input: image } ..........flavor: { get_input: flavor } ..........userdata: ............type: http ............url: { get_input: userdata } (The following is omitted.the same as nodecellar sample) --------------------end----------------------- i have upload the blueprint and created the deployment, when i execute the install workflow,new VM is created successfully on my openstack,but the "config-agent.sh" doesn't work on it.my "config-agent.sh" has 2 lines -----begin------
mkdir liuweiaaa ----end------- I didn't find any folder named "liuweiaaa" in the new vm.
When i execute the install workflow by cli command,i can see many "event" message but no "log" message printed on the console with out any error message.Could you tell me where are the execution logs located?on the manager or cli or agent?And which folder?
execution logs are located on the manager. to retrieve them during an executions or after it, use the "-l" flag e.g. cfy executions start -d my-deployment -w my-workflow -l or cfy events list -e my-execution-id -l
Regarding the mkdir command - note that the folder should get created under the root folder, not under the home folder. make sure you're looking in the right place.
I have used the "-l" flag,and here is the log:
(cloudify)root@ubuntu:~/cloudify-nodecellar-example# cfy executions start -d lw-nc-1202-scriptd-3-2 -w install -l
Executing workflow 'install' on deployment 'lw-nc-1202-scriptd-3-2' at management server 10.107.248.220 [timeout=900 seconds]
2015-03-16T17:24:07 CFY
my "config-agent.sh" now is -----begin------
ctx logger info "Hello to this world" mkdir liuweiaaa; sed -i s/cn.archive.ubuntu.com/10.107.248.125/g /etc/apt/sources.list; sed -i s/security.ubuntu.com/10.107.248.125/g /etc/apt/sources.list; cd /root; mkdir .pip; cd .pip touch pip.conf echo "[global]">>.pip/pip.conf; echo "index-url=http://10.107.248.220:8001/pypi/web/simple/">>.pip/pip.conf; apt-get update; ----end-------
The problem is resolved. my ubuntu 12.04 image has the problem.I use ubuntu 14.04 image instead
this is my blueprint yaml: -------------------begin------------------------- inputs: ..image: ....description: > ......Image to be used when launching agent VM's ..flavor: ....description: > ......Flavor of the agent VM's ..agent_user: ....description: > ......User for connecting to agent VM's ..userdata: node_types: ..nodecellar.nodes.MonitoredServer: ....derived_from: cloudify.openstack.nodes.Server ....properties: ......cloudify_agent: ........default: ..........user: { get_input: agent_user } ......server: ........default: ..........image: { get_input: image } ..........flavor: { get_input: flavor } ..........userdata: ............type: http ............url: { get_input: userdata } -----------------end--------------------- this is my input file: ----------------begin------------------- { ...."image": "71d939f6-2690-4c13-8324-942950392d2f", ...."flavor": "3", ...."agent_user": "root", ...."userdata": "http://10.107.248.232:8181/script/config-agent.sh" } ----------------end-------------------- after the VM created,"config-agent.sh" doesn't work on it.and there are no error message in the cli console.I use cloudify 3.1.