This section first discusses the image delete operation, then describes how the OpenStack CLI is used, and finally how to troubleshoot.
Web UI Delete image
After admin login, Project--Compute-Images
In the list, select the image formatted as ARI and AKI, and click
Click Confirm to delete
Operation succeeded
CLI Delete Image
Setting environment variables
Querying an existing image
Delete image
How to use the OpenStack CLI
The OpenStack service has its own CLI. Commands are good to remember, is the name of the service, such as Glance is Glance,nova is Nova.
But Keystone is more special, now is using OpenStack instead of the old version of the Keystone command. such as querying the user list, if using Keystone User-list
Will prompt Keystone has been deprecated. Use the OpenStack command instead
The commands used by different services are different, but these commands are very similar and can be extrapolate.
1. Before executing the command, you need to set the environment variable.
These variables include the user name, Project, password, and so on, and if not set, each execution command must set the relevant command-line arguments
2. The orders of each service are increased, deleted, changed, checked operation
Its format is
CMD <obj>-create [Parm1] [Parm2] ... CMD <obj>-delete [Parm]cmd <obj>-update [Parm1] [Parm2] ... CMD <obj>-listcmd <obj>-show [Parm]
For example, Glance manages the image, then: CMD is Glance;obj is the image corresponding to the command there is
Glance image-createglance image-deleteglance image-updateglance image-listglance image-show
Again, such as neutron management is the network and subnet, then: CMD is Neutron;obj is net and subnet corresponding commands have
Network-related operations
Neutron Net-createneutron net-deleteneutron Net-updateneutron Net-listneutron net–show
Subnet-related operations
Neutron Subnet-createneutron subnet-deleteneutron Subnet-updateneutron Subnet-listneutron subnet–show
Some of the commands <obj> can be omitted, such as Nova's actions are for instance
Nova Bootnova Deletenova Listnova show
3. Each object has an ID
Delete,show and so on are ID parameters, such as
4. Use Help to see how commands are used
In addition to delete,show and other operations only need an ID one parameter, other operations may require more parameters, with help to see the required parameters, the format is
CMD Help [Sub-cmd]
For example, see what glance have Sub-cmd
See the usage of glance image-update
How to Troubleshooting
The main way OpenStack can troubleshoot problems is through the logs, and the Service has its own separate logs. Glance mainly has two 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
G-api window displays GLANCE-API logs, records REST API calls G-reg window displays glance-registry logs, records the process of Glance service processing requests, and database operations
If you need to get the most detailed log information, you can open the debug option in/etc/glance/*.conf. Devstack Debug is already turned on by default.
In a non-devstack installation, the log is in the/var/log/glance/directory.
Next we begin to learn Nova.
How to use the OpenStack CLI-5 minutes a day to play with OpenStack (22)