The previous Cloudman analyzed the Nova launch, shut off and start operations in detail through the log.
I wonder if you have mastered the skills of log analysis now?
Let's check it out today.
This section discusses the relatively simple operation of Nova: Reboot and Lock/unlock.
I will first explain the theoretical knowledge of these operations, and then leave the log analysis for everyone to complete.
Everyone in the analysis process, if you have any questions, you can give me a message.
Soft/hard Reboot
The difference between soft reboot and hard reboot is that 1.soft reboot just restarts the operating system, and instance is still in operation throughout the process. Equivalent to executing the reboot command in Linux 2.hard reboot is restarting instance, which is equivalent to shutting down and then powering on
Soft/hard Reboot's log analysis is left to everyone as an exercise.
Tips: 1.soft/hard reboot is not found in Nova-api's log, because/opt/stack/nova/nova/compute/api.py's reboot method does not have a log output. You can search by keyword "Nova.api.openstack.wsgi" or "reboot". 2. There is a clear distinction between "soft reboot" and "hard reboot" in the Nova-compute log.
Lock/unlock
To avoid misoperation, such as accidental restart or removal of instance, instance can be locked. Actions that change state such as instance performed by locking (Lock) are not allowed. Restore normal after performing an unlock (Unlock) operation.
Lock/unlock operations are performed in the Nova-api. After the operation succeeds, NOVA-API updates the state of the instance lock. When performing other operations, the NOVA-API determines whether or not it is allowed according to the lock state.
Lock/unlock does not require nova-compute participation. Lock/unlock log is relatively simple, left for everyone to practice.
Tips: Users of the 1.admin role are not affected by lock, and can be performed normally regardless of whether the lock is locked or not. 2. Depending on the configuration of the default policy, any user can unlock. This means that if instance is found to be locked, it can be unlocked by unlock and then executed.
Nova reboot and lock operations-5 minutes a day to play with OpenStack (32)