In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to use OpenStack CLI, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
This section first discusses the image delete operation, then introduces how to use OpenStack CLI, and finally discusses how to Troubleshoot.
Web UI Delete image
After logging in to admin, Project-> Compute-> Images
Select the image with the format ARI and AKI in the list, and click
Click
Confirm deletion
The operation is successful
CLI Delete image
Set environment variabl
Query existing image
Delete image
How to use OpenStack CLI
OpenStack services have their own CLI. The command is easy to remember, which is the name of the service, for example, Glance is glance,Nova or nova.
But Keystone is special, and now openstack is used instead of the old keystone command. For example, to query the list of users, if you use keystone user-list
It will indicate that keystone is already deprecated. Replace with the openstack command
Although the commands used by different services are different, these commands are used in a very similar way.
1. Before you execute the command, you need to set the environment variable.
These variables include user name, Project, password, etc. If not set, the relevant command line parameters must be set every time the command is executed
two。 The commands of each service have the operations of adding, deleting, changing and checking.
Its format is
CMD-create [parm1] [parm2]...
CMD-delete [parm]
CMD-update [parm1] [parm2]...
CMD-list
CMD-show [parm]
For example, if glance manages image, then: CMD is glance;obj and image is the corresponding command.
Glance image-create
Glance image-delete
Glance image-update
Glance image-list
Glance image-show
For example, if neutron manages networks and subnets, then: CMD is neutron;obj, which is the command corresponding to net and subnet.
Network related operation
Neutron net-create
Neutron net-delete
Neutron net-update
Neutron net-list
Neutron net-show
Subnet related operations
Neutron subnet-create
Neutron subnet-delete
Neutron subnet-update
Neutron subnet-list
Neutron subnet-show
Some commands can be omitted. For example, the operations under nova are all for instance.
Nova boot
Nova delete
Nova list
Nova show
3. Every object has an ID
Delete,show and other operations all take ID as a parameter, such as
4. You can use help to view the usage of commands
In addition to operations such as delete,show that require only one parameter ID, other operations may require more parameters. Use help to view the required parameters in the format
CMD help [SUB-CMD]
For example, check what SUB-CMD are available in glance.
View the usage of glance image-update
How to Troubleshooting
OpenStack troubleshoots problems mainly through logs, and Service has its own separate log. Glance has two main logs, glance_api.log and glance_registry.log, which are stored in the / var/log/apache2/ directory.
Devstack's screen window has opened these two logs for us to view directly.
The g-api window displays the glance-api log, records the REST API calls, the g-reg window displays the glance-registry log, records the process of the Glance service processing the request and the database operation
If you need the most detailed log information, you can turn on the debug option in / etc/glance/*.conf. Devstack has debug turned on by default.
In a non-devstack installation, the logs are in the / var/log/glance/ directory.
After reading the above, have you mastered how to use OpenStack CLI? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.