{"id":909,"date":"2017-09-30T01:06:13","date_gmt":"2017-09-30T01:06:13","guid":{"rendered":"https:\/\/mohamedelsakhawy.wordpress.com\/?p=909"},"modified":"2017-09-30T01:06:13","modified_gmt":"2017-09-30T01:06:13","slug":"cinder-manage-did-you-know-about-it","status":"publish","type":"post","link":"https:\/\/mohamede.com\/?p=909","title":{"rendered":"cinder-manage: Did you know about it ?"},"content":{"rendered":"<p>A tool that&#8217;s less known-about for cinder is cinder-manage. You might have run into it during upgrades. The most common use case is<\/p>\n<pre>cinder-manage db sync<\/pre>\n<p>This is normally executed during upgrades to bring the database to the latest version, or to create the schema for a new installation. But there&#8217;s actually additional usages for it. Few of them are<\/p>\n<pre>cinder-manage service list<\/pre>\n<p>the output will look like that<\/p>\n<pre>Binary Host Zone Status State Updated At RPC Version Object Version Cluster \ncinder-scheduler controller-server nova enabled :-) 2017-10-15 19:45:37 4.5 4.5 \ncinder-volume controller-server@ceph nova enabled :-) 2017-10-15 19:45:31 4.6 4.6<\/pre>\n<p>The output can be used to diagnose issues when cinder-scheduler reports that the volume backend is down although cinder-volume is up. The output of the above command is the only reliable source to show how cinder-scheduler, cinder-volume and cinder-backup status is.<\/p>\n<p>If you have multiple backends for cinder, or use multiple cinder-scheduler\/cinder-volume on multiple controller nodes. The output will look like this<\/p>\n<pre>Binary Host Zone Status State Updated At RPC Version Object Version Cluster \ncinder-scheduler controller-server1 nova enabled :-) 2017-10-15 19:45:37 4.5 4.5 \ncinder-volume controller-server1@ceph nova enabled :-) 2017-10-15 19:45:31 4.6 4.6\ncinder-volume controller-server1@ceph2 nova enabled :-) 2017-10-15 19:45:31 4.6 4.6\ncinder-scheduler controller-server2 nova enabled :-) 2017-10-15 19:45:37 4.5 4.65\ncinder-volume controller-server2@ceph nova enabled XX 2017-10-15 19:45:37 4.6 4.6<\/pre>\n<p>As you can see above, there are multiple backends for cinder-volume on controller-server1. One of them is ceph and the other is ceph2 and both are enabled and up. It&#8217;s easy to spot that cinder-volume on the controller-server2 is showing as down, so you should expect the ceph backend to not be available. If you check the cinder-volume service using systemctl status, the service itself might be running. If that is the case you need to look deeper to why the ceph backend for cinder-volume is down<\/p>\n<p>If you decide to remove a certain cinder-volume\/cinder-scheduler\/cinder-backup service from your deployment, you can do that by stopping the service on the controller host, and then removing it using<\/p>\n<pre>cinder-manage service remove cinder-scheduler controller-server2\ncinder-manage service remove cinder-volume controller-server2<\/pre>\n<p>If this small use case got you excited, check out the following uses as well<\/p>\n<pre>cinder-manage logs errors\ncinder-manage logs syslog\ncinder-manage volume delete --&gt; Important in the case of stuck volumes\ncinder-manage host list\ncinder-manage config list --&gt; you can use it to verify what the running configuration for cinder is<\/pre>\n<p>The manual for cinder-manage is at<\/p>\n<p><a href=\"https:\/\/docs.openstack.org\/cinder\/latest\/man\/cinder-manage.html\">https:\/\/docs.openstack.org\/cinder\/latest\/man\/cinder-manage.html<\/a><\/p>\n<p>Have fun !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A tool that&#8217;s less known-about for cinder is cinder-manage. You might have run into it during upgrades. The most common use case is cinder-manage db sync This is normally executed during upgrades to bring the database to the latest version, or to create the schema for a new installation. But there&#8217;s actually additional usages for<a class=\"read-more \" href=\"https:\/\/mohamede.com\/?p=909\" title=\"Read More\"> <span class=\"button default\">Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"class_list":["post-909","post","type-post","status-publish","format-standard","hentry","category-cinder","category-openstack"],"_links":{"self":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts\/909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=909"}],"version-history":[{"count":0,"href":"https:\/\/mohamede.com\/index.php?rest_route=\/wp\/v2\/posts\/909\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohamede.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}