未加星标

TripleO: Debugging Overcloud Deployment Failure

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

You run ‘openstack overcloud deploy’ and after a couple of minutes you find out it failed and if that’s not enough, then you open the deployment log just to find a very (very!) long output that doesn’t give you an clue as to why the deployment failed. In the following sections we’ll see how can we get to the root of the problem.

Overcloud stack status

The way overcloud is being deployed is using heat templates. The result is a heat stack which includes all the different resources of the overcloud ( more stack, networks, subnets, etc.).

If you are not familiar with Heat, I recommend to read a little bit about it before proceeding, since it might be more confusing than helpful without any knowledge regardingHeat.

So our first step in finding out what happened to our overcloud deployment is to list the existing stacks

> openstackstacklist +--------------------------------------+------------+---------------+----------------------+--------------+ | ID| StackName | StackStatus| CreationTime| UpdatedTime | +--------------------------------------+------------+---------------+----------------------+--------------+ | 279addb0-1781-4d40-a62e-db8e063b9e81 | overcloud| CREATE_FAILED | 2017-02-12T07:23:27Z | None| +--------------------------------------+------------+---------------+----------------------+--------------+

You can also use the deprecated command heat stack-list.

We get a lot of useful information from the above command. First of all we know how our overcloud stack deployment is called ‘overcloud’. We’ll use it soon enough. We know also that the deployment was unsuccessful due to the stack status “CREATE_FAILED”.

What we still don’t know is why the deployment failed. We can choose one of two ways to continue.

The short way

If you are lucky enough to deploy the latest available release (OSP 10+ / Newton+), then you can use the magical openstack stack failures list command

> openstackstackfailureslistovercloud overcloud.AllNodesDeploySteps.ControllerDeployment_Step1.1: resource_type: OS::Heat::StructuredDeployment physical_resource_id: e0c37619-e3e8-49fb-9990-da0fdbdc862c status: CREATE_FAILED status_reason: | CREATEaborted deploy_stdout: | ... Notice: /Stage[main]/Pacemaker::Corosync/User[hacluster]/groups: groupschanged '' to 'haclient' Notice: /Stage[main]/Pacemaker::Corosync/Exec[reauthenticate-across-all-nodes]: Triggered 'refresh' from 2 events Notice: /Stage[main]/Pacemaker::Corosync/Exec[wait-for-settle]/returns: Error: clusteris not currentlyrunningonthis node Notice: /Stage[main]/Pacemaker::Stonith/Pacemaker::Property[DisableSTONITH]/Exec[Creatingcluster-widepropertystonith-enabled]: DependencyExec[wait-for-settle] hasfailures: true Notice: /Stage[main]/Haproxy/Haproxy::Instance[haproxy]/Haproxy::Config[haproxy]/Concat[/etc/haproxy/haproxy.cfg]/File[/etc/haproxy/haproxy.cfg]/content: contentchanged '{md5}1f337186b0e1ba5ee82760cb437fb810' to '{md5}674dff01894ec5b21f29ce257324b9b0' Notice: /File[/etc/haproxy/haproxy.cfg]/seluser: seluserchanged 'unconfined_u' to 'system_u' Notice: /Stage[main]/Tripleo::Profile::Base::Haproxy/Exec[haproxy-reload]: Triggered 'refresh' from 1 events Notice: /Firewall[998 logall]: DependencyExec[wait-for-settle] hasfailures: true Notice: /Firewall[999 dropall]: DependencyExec[wait-for-settle] hasfailures: true Notice: Finishedcatalogrunin 3729.91 seconds (truncated, viewallwith --long)

It will instantly give you all the information regarding the failure. The above output was very long so I pasted only portion of it.

You can see which resources in the stack failed and what exactly happened with the ‘delpy_stdout’ field.

Notethat ‘overcloud’ in the command, is the name of the stack and it’s not a fixed word. You should change it in case your stack called differently.

Older releases

Don’t have ‘openstack stack failures list’ command? don’t worry, we’ll simply use the old good way.

List nested stacks

From openstack stack list it looks like there is only onestack for overcloud deployment, but actuallythere could be more than 50(!) stacks.

The one we are interested in, is every stack that failed during the creation (deployment). To see all of them, we’ll use the flag ‘ nested’ and to filter only those with “FAILED” status we’ll use grep.

> openstackstacklist --nested | grep FAILED # OR the deprecated version: heat stack-list --show-nested | grep FAILED | c738ba27-b6d7-475e-86c6-937d5bd4ac6c | overcloud-AllNodesDeploySteps-pi6akgjya6pd-ControllerDeployment_Step1-ddultaifqbuo| CREATE_FAILED| 2017-02-12T07:31:09Z | None| fabf0c0e-77a1-4751-a61d-bfa9458fe89d | | fabf0c0e-77a1-4751-a61d-bfa9458fe89d | overcloud-AllNodesDeploySteps-pi6akgjya6pd| CREATE_FAILED| 2017-02-12T07:30:00Z | None| 279addb0-1781-4d40-a62e-db8e063b9e81 | | 279addb0-1781-4d40-a62e-db8e063b9e81 | overcloud| CREATE_FAILED| 2017-02-12T07:23:27Z | None| None|

We can see there three failed stacks. One of them (the last) is our original top-level stack, which we already saw when using openstack stack list

The other two are nested stacks. So we still don’t know what caused the deployment to fail, but we are getting closer

List stack resources

Once we know which nested stack failed, we can proceed with checking which resources failed.

> openstackstackresourcelistc738ba27-b6d7-475e-86c6-937d5bd4ac6c # OR the deprecated command: heat resource-list c738ba27-b6d7-475e-86c6-937d5bd4ac6c +---------------+--------------------------------------+--------------------------------+-----------------+----------------------+ | resource_name | physical_resource_id| resource_type| resource_status | updated_time| +---------------+--------------------------------------+--------------------------------+-----------------+----------------------+ | 1| e0c37619-e3e8-49fb-9990-da0fdbdc862c | OS::Heat::StructuredDeployment | CREATE_FAILED| 2017-02-12T07:31:09Z | | 0| 82627d0c-87c4-43b6-b3a9-51bcd020f46d | OS::Heat::StructuredDeployment | CREATE_FAILED| 2017-02-12T07:31:09Z | | 2| 9bd21425-f7c7-4261-9d73-4b4b99c3d5f1 | OS::Heat::StructuredDeployment | CREATE_FAILED| 2017-02-12T07:31:09Z | +---------------+--------------------------------------+--------------------------------+-----------------+----------------------+

We got three resources, all failed for some reason (don’t worry, we’ll find out why eventually). The valuable information for us here, is the physical_resource_id. This is the last piece of information we need for finding out why our deployment failed.

If you are wondering where ‘c738ba27-b6d7-475e-86c6-937d5bd4ac6c’ is coming from then it’s from the previous command’s output. This is the nested stack. Why specifically this one? because it’s most nested one of the 3 stacks. You can tell by the name.

The holy grail (a.k.a why my deployment failed)

We’ll now use the physical_resource_id from of the first resource (‘0’) from the previous section, to find out what happened to our deployment.

> openstacksoftwaredeploymentshow 82627d0c-87c4-43b6-b3a9-51bcd020f46d --long # OR heat deployment-s

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

分页:12
转载请注明
本文标题:TripleO: Debugging Overcloud Deployment Failure
本站链接:http://www.codesec.net/view/532817.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(81)