[Reprint] 30 Openstack classic interview questions and answers

30 Openstack classic interview questions and answers

https://linux.cn/article-10328-1.html

 

Author:  Pradeep Kumar  Translator:  LCTT  Liming Yue 

| 2018-12-09 21:20 Favorite:  3 Share:  1    

Now, most companies are trying to migrate their IT infrastructure and telecommunication facilities to the private cloud, as OpenStack. If you intend to interview OpenStack administrator of this post, then these interview questions listed below may help you pass the interview.

Q: 1 talk about OpenStack and its main components?

A: OpenStack is a series of open-source software that make up a cloud supply software, which is OpenStack, which means that open source software or items in the stack.

The following are the major key components of OpenStack:

  • Nova - used to calculate the level of management in the virtual machine, and perform other computing tasks in computing or hypervisor level.
  • Neutron - for the virtual machine, the network node provides calculation and control functionality.
  • Keystone - all OpenStack cloud users and cloud services provide authentication services. In other words, we can say that Keystone is to provide a method for cloud users and cloud service access.
  • Horizon - for providing a graphical user interface. Use graphical management interface can easily complete a variety of daily operational tasks.
  • Cinder - to provide a block storage function. Generally, in the integrated Cinder OpenStack and Chef ScaleIO block storage service to collectively provide the computing and control node.
  • Swift - for providing an object storage capabilities. Generally speaking, Glance managed image is stored in the object storage space. Like ScaleIO external storage can also provide object storage, it can be easily integrated Glance services.
  • Glance - for providing a mirroring service. Use Glance management platform to upload and download cloud images.
  • Heat - orchestration for providing services or functions. Use Heat management platform can easily move a virtual machine as a stack, and the virtual machine can be expanded or contracted as needed.
  • Ceilometer - to provide measurement and monitoring functions.

Q: 2 What services are usually run on a control node?

A: The following services are usually run on a control node:

  • Certification Services (KeyStone)
  • Mirroring Service (Glance)
  • Nova services such as Nova API, Nova Scheduler and Nova DB
  • Block storage and storage service objects
  • Ceilometer Service
  • MariaDB / MySQL and RabbitMQ service
  • Network (Neutron) and Network Agent management services
  • Choreography Services (Heat)

Q: 3 What services are usually running on the compute nodes?

A: The following services are usually running on a computing node:

  • Nova computing
  • Network services, such as OVS

Q: What is the default address 4 computing nodes of the virtual machine is?

A: In computing nodes of a virtual machine storage  /var/lib/nova/instances.

Q: What is the default address 5 Glance image is?

A: Because Glance services running on the control node, so the Glance image are stored in the control node of  /var/lib/glance/images the next folder.

To learn more, visit: How to use the command line to create and delete the OpenStack virtual machine

Q: 6 talk about how to use the command line to start a virtual machine?

A: We can use the following command to start a new OpenStack virtual machine:

  1. # openstack server create --flavor {flavor-name} --image {Image-Name-Or-Image-ID}  --nic net-id={Network-ID} --security-group {Security_Group_ID} key-name {Keypair-Name} <VM_Name>

Q: 7 how to display the user's OpenStack Network namespaces list?

A: You can use the  ip net ns command to list the user's network namespace.

  1. ~# ip netns list
  2. qdhcp-a51635b1-d023-419a-93b5-39de47755d2d
  3. haproxy
  4. vrouter

Q: 8 How to execute commands within the network namespace in OpenStack?

A: Suppose we want to  qdhcp-a51635b1-d023-419a-93b5-39de47755d2d perform network namespace  ifconfig command, we can execute the following command.

Command ip netns exec {network-space} <command>Format: :

  1. ~# ip netns exec qdhcp-a51635b1-d023-419a-93b5-39de47755d2d "ifconfig"

Q: 9 How to use the command line to upload and download the image in the Glance service?

A: Glance image upload service cloud OpenStack can use the following command:

  1. ~# openstack image create --disk-format qcow2 --container-format bare   --public --file {Name-Cloud-Image}.qcow2     <Cloud-Image-Name>

Download cloud images, use the following command:

  1. ~# glance image-download --file <Cloud-Image-Name> --progress  <Image-ID>

Q: 10 OpenStack how to convert a virtual machine from the wrong state to an active state?

A: In some cases the virtual machine may enter an error state, you can use the following command to convert the error state to an active state:

  1. ~# nova reset-state --active {Instance_id}

Q: 11 How to use the command line to get the floating IP list that can be used?

A: use the command to display the list of available floating IP:

  1. ~]# openstack ip floating list | grep None | head -10

Q: 12 or how to configure virtual machines on the host computing available in a particular area?

A: Suppose we want to configure the virtual machine on the available area in NonProduction compute-02, you can use the following command:

  1. ~]# openstack server create --flavor m1.tiny --image cirros --nic net-id=e0be93b8-728b-4d4d-a272-7d672b2560a6 --security-group NonProd_SG  --key-name linuxtec --availability-zone NonProduction:compute-02  nonprod_testvm

Q: 13 How to get list of virtual machines configured on a particular computing node?

A: Suppose we want to get the list of virtual machines configured in compute-0-19, you can use the following command:

Command openstack server list –all-projects –long -c Name -c Host | grep -i {Compute-Node-Name}Format: :

  1. ~# openstack server list --all-projects --long -c Name -c Host | grep -i  compute-0-19

Q: 14 How to use the command line to view the console log OpenStack instance?

A: Use the following command to view the console log instance.

First acquires the ID of the instance, and then use the following commands:

  1. ~# openstack console log show {Instance-id}

Q: URL address how to get OpenStack 15 instances of the console?

A: You can use the following command to retrieve the command line OpenStack instances console URL address:

  1. ~# openstack console url show {Instance-id}

Q: 16 How to create a bootable line of cinder / block storage volume using a command?

A: Suppose 8GB create a bootable storage volumes, refer to the following steps:

  • Use the following command to get a list of mirrors

    1. ~# openstack image list | grep -i cirros
    2. | 89254d46-a54b-4bc8-8e4d-658287c7ee92 | cirros  | active |
  • Use cirros mirror to create a bootable 8GB of storage volumes

    1. ~# cinder create --image-id 89254d46-a54b-4bc8-8e4d-658287c7ee92 --display-name cirros-bootable-vol  8

Q: 17 How to list all items that are created in your OpenStack or user?

A: You can use the following command to retrieve all the items and users:

  1. ~# openstack project list --long

Q: 18 How to Display OpenStack service endpoint list?

A: OpenStack service endpoints are divided into three categories:

  • Public endpoint
  • Internal endpoint
  • Endpoint Management

Use the following command to view a variety of OpenStack OpenStack service endpoint:

  1. ~# openstack catalog list

You can display a particular service endpoint (for example keystone) lists the following command:

  1. ~# openstack catalog show keystone

To learn more, visit: Create a process instance of OpenStack .

Q: 19 in the control node what steps you should follow to restart the service nova?

A: It should follow the following steps to restart the nova service control node OpenStack:

  • service nova-api restart
  • service nova-cert restart
  • service nova-conductor restart
  • service nova-consoleauth restart
  • service nova-scheduler restart

Q: 20 If the node is configured to calculate a number DPDK port traffic, how do you check the status of DPDK port it?

A: Because we use openvSwitch (OVS) to configure DPDK port so you can use the following command to check the status of the port:

  1. root@compute-0-15:~# ovs-appctl bond/show | grep dpdk
  2. active slave mac: 90:38:09:ac:7a:99(dpdk0)
  3. slave dpdk0: enabled
  4. slave dpdk1: enabled
  5. root@compute-0-15:~#
  6. root@compute-0-15:~# dpdk-devbind.py --status

Q: 21 How OpenStack add a new rule to the security group SG (safety group) in the presence of using the command line?

A: You can  neutron add a new rule to an existing security group OpenStack command:

  1. ~# neutron security-group-rule-create --protocol <tcp or udp>  --port-range-min <port-number> --port-range-max <port-number> --direction <ingress or egress>  --remote-ip-prefix <IP-address-or-range> Security-Group-Name

Q: 22 How to view and control node compute nodes OVS bridge configuration?

A: compute nodes and the control node OVS bridge configuration can be viewed using the following command:

  1. ~]# ovs-vsctl show

Q: What is the role of integrated bridge (br-int) on the node 23 calculations?

A: integration bridge (br-int) mark and unmark performs VLAN traffic from and instances running on the computing nodes.

Data packets sent from the use of n / w instance by a Linux virtual interfaces qvo bridge (qbr). qvb Linux interface is used to connect the bridge, qvo the interface is used to connect the integration bridge. Integrated bridge qvo internal port has a VLAN tag, which is a time when the packet arrives integration bridge attached to the packet header.

Q: What is the role 24 tunnel bridge (br-tun) on the compute nodes are?

A: The tunnel bridge (br-tun) according to traffic rules OpenFlow VLAN tag is converted from an integrated bridge tunnel ID.

Tunnel network bridge allows different instances communicate with each other. Tunnel traffic in favor of the package transmitted over an insecure network, it supports two-tier network that GRE and VXLAN.

Q: What is the role of external OVS 25 bridge (br-ex) is?

A: As the name suggests, this bridge forwarding traffic to and from the network to allow external access to the instance. br-ex physical interfaces such as eth2, floating IP data network so that the user receives from the physical network and routes the user to the network port.

Q: What is the role of 26 OpenStack network OpenFlow rules is?

A: OpenFlow rule is a mechanism that defines how a packet from the source to the destination. OpenFlow rules are stored in the flow table. OpenFlow flow table is part of the switch.

When a packet arrives at the switch will be a first flow table check, if the flow does not match any entry in the table, then the packet will be discarded or forwarded to another flow table.

Q: 27 How to view information OpenFlow switches (such as port, table number, cache number, etc.)?

A: If we want to display information OpenFlow switch (br-int), you need to perform the following command:

  1. root@compute-0-15# ovs-ofctl show br-int
  2. OFPT_FEATURES_REPLY (xid=0x2): dpid:0000fe981785c443
  3. n_tables:254, n_buffers:256
  4. capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
  5. actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
  6.  1(patch-tun): addr:3a:c6:4f:bd:3e:3b
  7.      config:     0
  8.      state:      0
  9.      speed: 0 Mbps now, 0 Mbps max
  10.  2(qvob35d2d65-f3): addr:b2:83:c4:0b:42:3a
  11.      config:     0
  12.      state:      0
  13.      current:    10GB-FD COPPER
  14.      speed: 10000 Mbps now, 0 Mbps max
  15.  ………………………………………

Q: 28 How to display all of the inlet flow in the switch?

A: You can use the command  ovs-ofctl dump-flows to view the flow inlet switch.

Suppose we want to display all flow inlet OVS integrated bridge (br-int), you can use the following command:

  1. [root@compute01 ~]# ovs-ofctl dump-flows br-int

Q: 29 What is Neutron agent? How to display all Neutron agent?

A: OpenStack Neutron server acts as a central controller, the network configuration is actually executing on a computing node or network node. Neutron agent is configured software updates on the computing nodes or network nodes. Neuron by Neutron agent and message queues to service centers and Neutron communication services.

Neutron can view a list of agents with the following command:

  1. ~# openstack network agent list -c Agent type -c Host -c Alive -c State

Q: What is 30 CPU Pinning that?

A: CPU Pinning refers to retain physical core for a virtual machine. It is also referred to as CPU or processor affinity isolation. There are two purposes:

  • It ensures that virtual machines can run on a dedicated core
  • It also ensures that public host process is not running on these core

We can also think Pinning a physical core to a user virtual CPU (vCPU) one to one mapping.

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12092657.html