In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about what to do if the kilo version of the CVM cannot be terminated and cannot be created. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something from this article.
I. background
The openstack page cannot be created or terminated from the CVM
Second, the solution.
Click on the error instance to find its id 03f0403f-74cd-4d88-b1fb-1d3f4ceaa9e4
Guess that it is cinder's problem, so go to the cinder log directory, look for the ID in all logs, and find the error message.
# cd / var/log/cinder# grep 03f0403f-74cd-4d88-b1fb-1d3f4ceaa9e4 * # view api.log Caught error: [Errno [Errno 13] Permission denied:'/ var/lock/cinder'Traceback (most recent call last): File "/ usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _ dispatch_and_reply executor_callback)) File "/ usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186 In _ dispatch executor_callback) File "/ usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _ do_dispatch result = func (ctxt, * * new_args) File "/ usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper return f (* args, * * kwargs) File "/ usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 157s In ldo_inner1 return ldo_inner2 (inst, context, volume_id, attachment_id, * * kwargs) File "/ usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 439, in inner do_log=False, semaphores=semaphores, delay=delay): File "/ usr/lib64/python2.7/contextlib.py", line 17, in _ enter__ return self.gen.next () File "/ usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 395 In lock ext_lock.acquire (delay=delay) File "/ usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 194, in acquire fileutils.ensure_tree (basedir) File "/ usr/lib/python2.7/site-packages/oslo_concurrency/openstack/common/fileutils.py", line 35, in ensure_tree os.makedirs (path) File "/ usr/lib64/python2.7/os.py", line 157, in makedirs mkdir (name Mode) OSError: [Errno 13] Permission denied:'/ var/lock/cinder'] Permission denied 3. Resolution process
According to the error message, you can see that the / var/lock/cinder directory has insufficient permissions. Enter this directory and find that there is no cinder directory.
[root@bdc212 ~] # cd / var/lock/ [root@bdc212 lock] # ls-lrttotal 0drwx-2 root root 40 Jul 13 08:16 lvmdrwx- 2 root root 60 Jul 13 08:16 iscsidrwxr-xr-x 2 root root 40 Jul 13 08:16 pppdrwxrwxr-x 2 root lock 40 Jul 13 08:16 lockdev-rw-r--r-- 1 root root 0 Jul 13 08:16 ceph-disk-rw-r--r-- 1 root root 0 Jul 13 08: 16 kdumpdrwxr-xr-x 2 root root 80 Jul 13 10:09 subsys
So create the directory manually
# mkdir cinder
If the instance is terminated again, the log still reports an error.
Caught error: [Errno [Errno 13] Permission denied: u'/var/lock/cinder/cinder-a0403e20-5cf6-4abdmura469Mele166e2fd37d3Muteachapart volume`
Modify the permissions of a directory
# chown cinder:cinder cinder/
When the instance is terminated again, it is found that the instance was terminated successfully and no error was reported.
In addition, it is found that the previously created failed cloud disk can also be deleted.
When openstack creates and terminates a CVM, it will generate a file in the / var/lock/cinder directory. Without this directory and permissions, it will not be able to create and terminate the CVM normally, including the creation and deletion of the cloud disk.
A strange phenomenon
The / var/lock/cinder directory will disappear after the machine is rebooted
Therefore, in order to avoid the impact of the lack of this directory after reboot, write the command to create the changed directory into the file that is automatically executed on boot.
# vi / etc/rc.local...if [!-d / var/lock/cinder]; then mkdir / var/lock/cinder; chown-R cinder:cinder / var/lock/cinder;fi
Modify add executable permissions
# cd / etc/rc.d/ # chmod 755 rc.local after reading the above content, do you have any further understanding of what to do if the kilo CVM cannot be terminated and cannot be created? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.