From d5240fb4ce9cf94d9e1b920012db6a78bce415e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Mon, 3 Dec 2018 11:04:13 +0800 Subject: [PATCH 1/6] Create Top 30 OpenStack Interview Questions and Answers.md --- ...enStack Interview Questions and Answers.md | 327 ++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 translated/tech/Top 30 OpenStack Interview Questions and Answers.md diff --git a/translated/tech/Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/Top 30 OpenStack Interview Questions and Answers.md new file mode 100644 index 0000000000..dc5411f1fa --- /dev/null +++ b/translated/tech/Top 30 OpenStack Interview Questions and Answers.md @@ -0,0 +1,327 @@ +ScarboroughCoral translating! + + +Top 30 OpenStack Interview Questions and Answers +====== +Now a days most of the firms are trying to migrate their IT infrastructure and Telco Infra into private cloud i.e OpenStack. If you planning to give interviews on Openstack admin profile, then below list of interview questions might help you to crack the interview. + +![](https://www.linuxtechi.com/wp-content/uploads/2018/11/OpenStack-Interview-Questions.jpg) + +### Q:1 Define OpenStack and its key components? + +Ans: It is a bundle of opensource software, which all in combine forms a provide cloud software known as OpenStack.OpenStack is known as Stack of Open source Software or Projects. + +Following are the key components of OpenStack + + * **Nova** – It handles the Virtual machines at compute level and performs other computing task at compute or hypervisor level. + * **Neutron** – It provides the networking functionality to VMs, Compute and Controller Nodes. + * **Keystone** – It provides the identity service for all cloud users and openstack services. In other words, we can say Keystone a method to provide access to cloud users and services. + * **Horizon** – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease. + * **Cinder** – It provides the block storage functionality, generally in OpenStack Cinder is integrated with Chef and ScaleIO to service block storage to Compute & Controller nodes. + * **Swift** – It provides the object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service. + * **Glance** – It provides Cloud image services, using glance admin used to upload and download cloud images. + * **Heat** – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out + * **Ceilometer** – It provides the telemetry and billing services. + + + +### Q:2 What are services generally run on a controller node? + +Ans: Following services run on a controller node: + + * Identity Service ( KeyStone) + * Image Service ( Glance) + * Nova Services like Nova API, Nova Scheduler & Nova DB + * Block & Object Service + * Ceilometer Service + * MariaDB / MySQL and RabbitMQ Service + * Management services of Networking (Neutron) and Networking agents + * Orchestration Service (Heat) + + + +### Q:3 What are the services generally run on a Compute Node? + +Ans: Following services run on a compute node, + + * Nova-Compute + * Networking Services like OVS + + + +### Q:4 What is the default location of VMs on the Compute Nodes? + +Ans: VMs in the Compute node are stored at “ **/var/lib/nova/instances** ” + +### Q:5 What is default location of glance images? + +Ans: As the Glance service runs on a controller node, all the glance images are store under the folder “ **/var/lib/glance/images** ” on a controller node. + +Read More : [**How to Create and Delete Virtual Machine(VM) from Command line in OpenStack**][1] + +### Q:6 Tell me the command how to spin a VM from Command Line? + +Ans: We can easily spin a new VM using the following openstack command, + +``` +# 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} +``` + +### Q:7 How to list the network namespace of a tenant in OpenStack? + +Ans: Network namespace of a tenant can be listed using “ip net ns” command + +``` +~# ip netns list +qdhcp-a51635b1-d023-419a-93b5-39de47755d2d +haproxy +vrouter +``` + +### Q:8 How to execute command inside network namespace in openstack? + +Ans: Let’s assume we want to execute “ifconfig” command inside the network namespace “qdhcp-a51635b1-d023-419a-93b5-39de47755d2d”, then run the beneath command, + +Syntax : ip netns exec {network-space} + +``` +~# ip netns exec qdhcp-a51635b1-d023-419a-93b5-39de47755d2d "ifconfig" +``` + +### Q:9 How to upload and download a cloud image in Glance from command line? + +Ans: A Cloud image can be uploaded in glance from command using beneath openstack command, + +``` +~# openstack image create --disk-format qcow2 --container-format bare   --public --file {Name-Cloud-Image}.qcow2     +``` + +Use below openstack command to download a cloud image from command line, + +``` +~# glance image-download --file --progress  +``` + +### Q:10 How to reset error state of a VM into active in OpenStack env? + +Ans: There are some scenarios where some VMs went to error state and this error state can be changed into active state using below commands, + +``` +~# nova reset-state --active {Instance_id} +``` + +### Q:11 How to get list of available Floating IPs from command line? + +Ans: Available floating ips can be listed using the below command, + +``` +~]# openstack ip floating list | grep None | head -10 +``` + +### Q:12 How to provision a virtual machine in specific availability zone and compute Host? + +Ans: Let’s assume we want to provision a VM on the availability zone NonProduction in compute-02, use the beneath command to accomplish this, + +``` +~]# 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 VMs which are provisioned on a specific Compute node? + +Ans: Let’s assume we want to list the vms which are provisioned on compute-0-19, use below + +Syntax: openstack server list –all-projects –long -c Name -c Host | grep -i {Compute-Node-Name} + +``` +~# openstack server list --all-projects --long -c Name -c Host | grep -i  compute-0-19 +``` + +### Q:14 How to view the console log of an openstack instance from command line? + +Ans: Console logs of an instance can be viewed from the command line using the following commands, + +First get the ID of an instance and then use the below command, + +``` +~# openstack console log show {Instance-id} +``` + +### Q:15 How to get console URL of an openstack instance? + +Ans: Console URL of an instance can be retrieved from command line using the below openstack command, + +``` +~# openstack console url show {Instance-id} +``` + +### Q:16 How to create a bootable cinder / block storage volume from command line? + +Ans: To Create a bootable cinder or block storage volume (assume 8 GB) , refer the below steps: + + * Get Image list using below + + + +``` +~# openstack image list | grep -i cirros +| 89254d46-a54b-4bc8-8e4d-658287c7ee92 | cirros  | active | +``` + + * Create bootable volume of size 8 GB using cirros image + + + +``` +~# cinder create --image-id 89254d46-a54b-4bc8-8e4d-658287c7ee92 --display-name cirros-bootable-vol  8 +``` + +### Q:17 How to list all projects or tenants that has been created in your opentstack? + +Ans: Projects or tenants list can be retrieved from the command using the below openstack command, + +``` +~# openstack project list --long +``` + +### Q:18 How to list the endpoints of openstack services? + +Ans: Openstack service endpoints are classified into three categories, + + * Public Endpoint + * Internal Endpoint + * Admin Endpoint + + + +Use below openstack command to view endpoints of each openstack service, + +``` +~# openstack catalog list +``` + +To list the endpoint of a specific service like keystone use below, + +``` +~# openstack catalog show keystone +``` + +Read More : [**Step by Step Instance Creation Flow in OpenStack**][2] + +### Q:19 In which order we should restart nova services on a controller node? + +Ans: Following order should be followed to restart the nova services on openstack controller node, + + * service nova-api restart + * service nova-cert restart + * service nova-conductor restart + * service nova-consoleauth restart + * service nova-scheduler restart + + + +### Q:20 Let’s assume DPDK ports are configured on compute node for data traffic, now how you will check the status of dpdk ports? + +Ans: As DPDK ports are configured via openvSwitch (OVS), use below commands to check the status, + +### Q:21 How to add new rules to the existing SG(Security Group) from command line in openstack? + +Ans: New rules to the existing SG in openstack can be added using the neutron command, + +``` +~# neutron security-group-rule-create --protocol   --port-range-min --port-range-max --direction  --remote-ip-prefix Security-Group-Name +``` + +### Q:22 How to view the OVS bridges configured on Controller and Compute Nodes? + +Ans: OVS bridges on Controller and Compute nodes can be viewed using below command, + +``` +~]# ovs-vsctl show +``` + +### Q:23 What is the role of Integration Bridge(br-int) on the Compute Node ? + +Ans: The integration bridge (br-int) performs VLAN tagging and untagging for the traffic coming from and to the instance running on the compute node. + +Packets leaving the n/w interface of an instance goes through the linux bridge (qbr) using the virtual interface qvo. The interface qvb is connected to the Linux Bridge & interface qvo is connected to integration bridge (br-int). The qvo port on integration bridge has an internal VLAN tag that gets appended to packet header when a packet reaches to the integration bridge. + +### Q:24 What is the role of Tunnel Bridge (br-tun) on the compute node? + +Ans: The tunnel bridge (br-tun) translates the VLAN tagged traffic from integration bridge to the tunnel ids using OpenFlow rules. + +br-tun (tunnel bridge) allows the communication between the instances on different networks. Tunneling helps to encapsulate the traffic travelling over insecure networks, br-tun supports two overlay networks i.e GRE and VXLAN + +### Q:25 What is the role of external OVS bridge (br-ex)? + +Ans: As the name suggests, this bridge forwards the traffic coming to and from the network to allow external access to instances. br-ex connects to the physical interface like eth2, so that floating IP traffic for tenants networks is received from the physical network and routed to the tenant network ports. + +### Q:26 What is function of OpenFlow rules in OpenStack Networking? + +Ans: OpenFlow rules is a mechanism that define how a packet will reach to destination starting from its source. OpenFlow rules resides in flow tables. The flow tables are part of OpenFlow switch. + +When a packet arrives to a switch, it is processed by the first flow table, if it doesn’t match any flow entries in the table then packet is dropped or forwarded to another table. + +### Q:27 How to display the information about a OpenFlow switch (like ports, no. of tables, no of buffer)? + +Ans: Let’s assume we want to display the information about OpenFlow switch (br-int), run the following command, + +``` +root@compute-0-15# ovs-ofctl show br-int +OFPT_FEATURES_REPLY (xid=0x2): dpid:0000fe981785c443 +n_tables:254, n_buffers:256 +capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP +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 + 1(patch-tun): addr:3a:c6:4f:bd:3e:3b +     config:     0 +     state:      0 +     speed: 0 Mbps now, 0 Mbps max + 2(qvob35d2d65-f3): addr:b2:83:c4:0b:42:3a +     config:     0 +     state:      0 +     current:    10GB-FD COPPER +     speed: 10000 Mbps now, 0 Mbps max + ……………………………………… +``` + +### Q:28 How to display the entries for all the flows in a switch? + +Ans: Flows entries of a switch can be displayed using the command ‘ **ovs-ofctl dump-flows** ‘ + +Let’s assume we want to display flow entries of OVS integration bridge (br-int), + +### Q:29 What are Neutron Agents and how to list all neutron agents? + +Ans: OpenStack neutron server acts as the centralized controller, the actual network configurations are executed either on compute and network nodes. Neutron agents are software entities that carry out configuration changes on compute or network nodes. Neutron agents communicate with the main neutron service via Neuron API and message queue. + +Neutron agents can be listed using the following command, + +``` +~# openstack network agent list -c ‘Agent type’ -c Host -c Alive -c State +``` + +### Q:30 What is CPU pinning? + +Ans: CPU pinning refers to reserving the physical cores for specific virtual machine. It is also known as CPU isolation or processor affinity. The configuration is in two parts: + + * it ensures that virtual machine can only run on dedicated cores + * it also ensures that common host processes don’t run on those cores + + + +In other words we can say pinning is one to one mapping of a physical core to a guest vCPU. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/openstack-interview-questions-answers/ + +作者:[Pradeep Kumar][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lujun9972 +[1]: https://www.linuxtechi.com/create-delete-virtual-machine-command-line-openstack/ +[2]: https://www.linuxtechi.com/step-by-step-instance-creation-flow-in-openstack/ From 583ff266e3193f1a47782f163b9257ee85a89cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Mon, 3 Dec 2018 11:36:36 +0800 Subject: [PATCH 2/6] Rename Top 30 OpenStack Interview Questions and Answers.md to 20181107 Top 30 OpenStack Interview Questions and Answers.md --- ... 20181107 Top 30 OpenStack Interview Questions and Answers.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{Top 30 OpenStack Interview Questions and Answers.md => 20181107 Top 30 OpenStack Interview Questions and Answers.md} (100%) diff --git a/translated/tech/Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md similarity index 100% rename from translated/tech/Top 30 OpenStack Interview Questions and Answers.md rename to translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md From b0f7f3731d21e2e24149aacf2fa6c9371c504017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Mon, 3 Dec 2018 16:29:00 +0800 Subject: [PATCH 3/6] Update 20181107 Top 30 OpenStack Interview Questions and Answers.md --- ...enStack Interview Questions and Answers.md | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md index dc5411f1fa..7783fa2b83 100644 --- a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md +++ b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md @@ -1,17 +1,18 @@ -ScarboroughCoral translating! - -Top 30 OpenStack Interview Questions and Answers +Openstack 面试问题和解答 TOP 30 ====== -Now a days most of the firms are trying to migrate their IT infrastructure and Telco Infra into private cloud i.e OpenStack. If you planning to give interviews on Openstack admin profile, then below list of interview questions might help you to crack the interview. + +现在,大多数公司都试图将它们的 IT 基础设施和 Telco Infra 迁移到私有云,即OpenStack。如果你打算面试 OpenStack 管理员这个岗位,那么下面列出的这些面试问题可能会帮助你通过面试。 ![](https://www.linuxtechi.com/wp-content/uploads/2018/11/OpenStack-Interview-Questions.jpg) -### Q:1 Define OpenStack and its key components? +### Q:1 说一下 OpenStack 和它的主要组件? Ans: It is a bundle of opensource software, which all in combine forms a provide cloud software known as OpenStack.OpenStack is known as Stack of Open source Software or Projects. -Following are the key components of OpenStack +OpenStack 是一系列开源软件,这些软件组成了一个提供云软件,也就是 OpenStack,被称为开源软件或项目栈。 + +下面是 OpenStack 的主要关键组件 * **Nova** – It handles the Virtual machines at compute level and performs other computing task at compute or hypervisor level. * **Neutron** – It provides the networking functionality to VMs, Compute and Controller Nodes. @@ -22,6 +23,16 @@ Following are the key components of OpenStack * **Glance** – It provides Cloud image services, using glance admin used to upload and download cloud images. * **Heat** – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out * **Ceilometer** – It provides the telemetry and billing services. + + * **Nova** – + * **Neutron** – It provides the networking functionality to VMs, Compute and Controller Nodes. + * **Keystone** – It provides the identity service for all cloud users and openstack services. In other words, we can say Keystone a method to provide access to cloud users and services. + * **Horizon** – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease. + * **Cinder** – It provides the block storage functionality, generally in OpenStack Cinder is integrated with Chef and ScaleIO to service block storage to Compute & Controller nodes. + * **Swift** – It provides the object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service. + * **Glance** – It provides Cloud image services, using glance admin used to upload and download cloud images. + * **Heat** – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out + * **Ceilometer** – It provides the telemetry and billing services. From 5371cfb97f13ef43dcfae08bb7c350b4ff799d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Wed, 5 Dec 2018 16:25:39 +0800 Subject: [PATCH 4/6] Update 20181107 Top 30 OpenStack Interview Questions and Answers.md --- ...enStack Interview Questions and Answers.md | 106 ++++++++---------- 1 file changed, 47 insertions(+), 59 deletions(-) diff --git a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md index 7783fa2b83..8350e9e564 100644 --- a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md +++ b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md @@ -1,86 +1,74 @@ -Openstack 面试问题和解答 TOP 30 +Openstack 30个经典面试问题和解答 ====== 现在,大多数公司都试图将它们的 IT 基础设施和 Telco Infra 迁移到私有云,即OpenStack。如果你打算面试 OpenStack 管理员这个岗位,那么下面列出的这些面试问题可能会帮助你通过面试。 ![](https://www.linuxtechi.com/wp-content/uploads/2018/11/OpenStack-Interview-Questions.jpg) -### Q:1 说一下 OpenStack 和它的主要组件? +### Q:1 说一下 OpenStack 及其主要组件? -Ans: It is a bundle of opensource software, which all in combine forms a provide cloud software known as OpenStack.OpenStack is known as Stack of Open source Software or Projects. +Ans: OpenStack 是一系列开源软件,这些软件组成了一个云提供软件,也就是 OpenStack,被称为开源软件或项目栈。 -OpenStack 是一系列开源软件,这些软件组成了一个提供云软件,也就是 OpenStack,被称为开源软件或项目栈。 - -下面是 OpenStack 的主要关键组件 - - * **Nova** – It handles the Virtual machines at compute level and performs other computing task at compute or hypervisor level. - * **Neutron** – It provides the networking functionality to VMs, Compute and Controller Nodes. - * **Keystone** – It provides the identity service for all cloud users and openstack services. In other words, we can say Keystone a method to provide access to cloud users and services. - * **Horizon** – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease. - * **Cinder** – It provides the block storage functionality, generally in OpenStack Cinder is integrated with Chef and ScaleIO to service block storage to Compute & Controller nodes. - * **Swift** – It provides the object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service. - * **Glance** – It provides Cloud image services, using glance admin used to upload and download cloud images. - * **Heat** – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out - * **Ceilometer** – It provides the telemetry and billing services. +下面是 OpenStack 的主要关键组件: - * **Nova** – - * **Neutron** – It provides the networking functionality to VMs, Compute and Controller Nodes. - * **Keystone** – It provides the identity service for all cloud users and openstack services. In other words, we can say Keystone a method to provide access to cloud users and services. - * **Horizon** – It provides a GUI (Graphical User Interface), using the GUI Admin can all day to day operations task at ease. - * **Cinder** – It provides the block storage functionality, generally in OpenStack Cinder is integrated with Chef and ScaleIO to service block storage to Compute & Controller nodes. - * **Swift** – It provides the object storage functionality. Generally, Glance images are on object storage. External storage like ScaleIO can work as Object storage too and can easily be integrated with Glance Service. - * **Glance** – It provides Cloud image services, using glance admin used to upload and download cloud images. - * **Heat** – It provides an orchestration service or functionality. Using Heat admin can easily VMs as stack and based on requirements VMs in the stack can be scale-in and Scale-out - * **Ceilometer** – It provides the telemetry and billing services. + * **Nova** – 用于计算级别管理虚拟机,并在计算或管理程序级别执行其他计算任务。 + * **Neutron** – 为虚拟机、计算和控制节点提供网络功能。 + * **Keystone** – 为所有云用户和 OpenStack 云服务提供身份认证服务。换句话说,我们可以说 Keystone 是一个提供给云用户和云服务访问权限的方法。 + * **Horizon** – 用于提供图形用户界面。使用图形化管理界面可以很轻松地完成各种日常操作任务。 + * **Cinder** – 用于提供块存储功能。通常来说 OpenStack 的 Cinder 中集成了 Chef 和 ScaleIO 来共同为计算和控制节点提供块存储服务。 + * **Swift** – 用于提供对象存储功能。通常来说,Glance 管理的镜像是存储在对象存储空间的。扩展存储就像 ScaleIO 也可以提供对象存储,可以很容易的集成 Glance 服务。 + * **Glance** – 用于提供镜像服务。使用 Glance 的管理平台来上传和下载云镜像。 + * **Heat** – 用于提供编排服务或功能。使用 Heat 管理平台可以轻松地将虚拟机作为堆栈,并且根据需要可以将虚拟机扩展或收缩。 + * **Ceilometer** – 用于提供计量与监控功能。 -### Q:2 What are services generally run on a controller node? +### Q:2 什么服务通常在控制节点上运行? -Ans: Following services run on a controller node: +Ans: 以下服务通常在控制节点上运行: - * Identity Service ( KeyStone) - * Image Service ( Glance) - * Nova Services like Nova API, Nova Scheduler & Nova DB - * Block & Object Service - * Ceilometer Service - * MariaDB / MySQL and RabbitMQ Service - * Management services of Networking (Neutron) and Networking agents - * Orchestration Service (Heat) + * 认证服务 ( KeyStone) + * 镜像服务 ( Glance) + * Nova 服务比如 Nova API, Nova Scheduler 和 Nova DB + * 块存储和对象存储服务 + * Ceilometer 服务 + * MariaDB / MySQL 和 RabbitMQ 服务 + * 网络(Neutron)和网络代理的管理服务 + * 编排服务 (Heat) -### Q:3 What are the services generally run on a Compute Node? +### Q:3 什么服务通常在计算节点上运行? -Ans: Following services run on a compute node, +Ans: 以下服务通常在计算节点运行: - * Nova-Compute - * Networking Services like OVS + * Nova 计算 + * 网络服务,比如 OVS -### Q:4 What is the default location of VMs on the Compute Nodes? +### Q:4 计算节点上虚拟机的默认地址是什么? -Ans: VMs in the Compute node are stored at “ **/var/lib/nova/instances** ” +Ans: 虚拟机存储在计算节点的 “ **/var/lib/nova/instances** ” -### Q:5 What is default location of glance images? +### Q:5 Glance 镜像的默认地址是什么? -Ans: As the Glance service runs on a controller node, all the glance images are store under the folder “ **/var/lib/glance/images** ” on a controller node. +Ans: 因为Glance 服务运行在控制节点上,所以 Glance 镜像都被存储在控制节点的“ **/var/lib/glance/images** ”文件夹下。 -Read More : [**How to Create and Delete Virtual Machine(VM) from Command line in OpenStack**][1] +想了解更多请访问 : [**在 OpenStack 中如何使用命令行创建和删除虚拟机**][1] -### Q:6 Tell me the command how to spin a VM from Command Line? +### Q:6 说一下如何使用命令行启动一个虚拟机? -Ans: We can easily spin a new VM using the following openstack command, +Ans: 我们可以使用如下 OpenStack 命令来启动一个新的虚拟机: ``` # 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} ``` -### Q:7 How to list the network namespace of a tenant in OpenStack? +### Q:7 如何在 OpenStack 中显示用户的网络命名空间列表? -Ans: Network namespace of a tenant can be listed using “ip net ns” command +Ans: 可以使用 “ip net ns” 命令来列出用户的网络命名空间。 ``` ~# ip netns list @@ -89,41 +77,41 @@ haproxy vrouter ``` -### Q:8 How to execute command inside network namespace in openstack? +### Q:8 如何在 OpenStack 中执行网络命名空间内的命令? -Ans: Let’s assume we want to execute “ifconfig” command inside the network namespace “qdhcp-a51635b1-d023-419a-93b5-39de47755d2d”, then run the beneath command, +Ans: 假设我们想在 “qdhcp-a51635b1-d023-419a-93b5-39de47755d2d” 网络命名空间中执行 “ifconfig” 命令,我们可以执行如下命令。 -Syntax : ip netns exec {network-space} +格式 : ip netns exec {network-space} ``` ~# ip netns exec qdhcp-a51635b1-d023-419a-93b5-39de47755d2d "ifconfig" ``` -### Q:9 How to upload and download a cloud image in Glance from command line? +### Q:9 在 Glance 服务中如何使用命令行上传和下载镜像? -Ans: A Cloud image can be uploaded in glance from command using beneath openstack command, +Ans: Glance 服务中云镜像上传可以使用如下 OpenStack 命令: ``` ~# openstack image create --disk-format qcow2 --container-format bare   --public --file {Name-Cloud-Image}.qcow2     ``` -Use below openstack command to download a cloud image from command line, +下载云镜像则使用如下命令: ``` ~# glance image-download --file --progress  ``` -### Q:10 How to reset error state of a VM into active in OpenStack env? +### Q:10 OpenStack 如何将虚拟机从错误状态转换为活动状态? -Ans: There are some scenarios where some VMs went to error state and this error state can be changed into active state using below commands, +Ans: 在某些情况下虚拟机可能会进入错误状态,可以使用如下命令将错误状态转换为活动状态: ``` ~# nova reset-state --active {Instance_id} ``` -### Q:11 How to get list of available Floating IPs from command line? +### Q:11 如何使用命令行来获取可使用的浮动 IP 列表? -Ans: Available floating ips can be listed using the below command, +Ans: 可使用如下命令来显示可用浮动 IP 列表: ``` ~]# openstack ip floating list | grep None | head -10 @@ -327,7 +315,7 @@ via: https://www.linuxtechi.com/openstack-interview-questions-answers/ 作者:[Pradeep Kumar][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[ScarboroughCoral](https://github.com/ScarboroughCoral) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ebe61ae246dda3d61fbad516128563355a52e017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Wed, 5 Dec 2018 16:59:03 +0800 Subject: [PATCH 5/6] Update 20181107 Top 30 OpenStack Interview Questions and Answers.md --- ...enStack Interview Questions and Answers.md | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md index 8350e9e564..31129b4e14 100644 --- a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md +++ b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md @@ -81,7 +81,7 @@ vrouter Ans: 假设我们想在 “qdhcp-a51635b1-d023-419a-93b5-39de47755d2d” 网络命名空间中执行 “ifconfig” 命令,我们可以执行如下命令。 -格式 : ip netns exec {network-space} +命令格式 : ip netns exec {network-space} ``` ~# ip netns exec qdhcp-a51635b1-d023-419a-93b5-39de47755d2d "ifconfig" @@ -117,47 +117,47 @@ Ans: 可使用如下命令来显示可用浮动 IP 列表: ~]# openstack ip floating list | grep None | head -10 ``` -### Q:12 How to provision a virtual machine in specific availability zone and compute Host? +### Q:12 如何在特定可用区域中或在计算主机上配置虚拟机? -Ans: Let’s assume we want to provision a VM on the availability zone NonProduction in compute-02, use the beneath command to accomplish this, +Ans: 假设我们想在 compute-02 中的可用区 NonProduction 上配置虚拟机,可以使用如下命令: ``` ~]# 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 VMs which are provisioned on a specific Compute node? +### Q:13 如何在特定计算节点上获取配置的虚拟机列表? -Ans: Let’s assume we want to list the vms which are provisioned on compute-0-19, use below +Ans: 假设我们想要获取在 compute-0-19 中配置的虚拟机列表,可以使用如下命令: -Syntax: openstack server list –all-projects –long -c Name -c Host | grep -i {Compute-Node-Name} +命令格式: openstack server list –all-projects –long -c Name -c Host | grep -i {Compute-Node-Name} ``` ~# openstack server list --all-projects --long -c Name -c Host | grep -i  compute-0-19 ``` -### Q:14 How to view the console log of an openstack instance from command line? +### Q:14 如何使用命令行查看 OpenStack 实例的打印信息? -Ans: Console logs of an instance can be viewed from the command line using the following commands, +Ans: 使用如下命令可查看实例的命令行打印信息: -First get the ID of an instance and then use the below command, +首先获取实例的 ID,然后使用如下命令: ``` ~# openstack console log show {Instance-id} ``` -### Q:15 How to get console URL of an openstack instance? +### Q:15 如何获取 OpenStack 实例的控制台的 URL 地址? -Ans: Console URL of an instance can be retrieved from command line using the below openstack command, +Ans: 可以使用以下 OpenStack 命令从命令行检索实例的控制台 URL 地址: ``` ~# openstack console url show {Instance-id} ``` -### Q:16 How to create a bootable cinder / block storage volume from command line? +### Q:16 如何使用命令行创建可启动的 cinder / block 存储卷? -Ans: To Create a bootable cinder or block storage volume (assume 8 GB) , refer the below steps: +Ans: 假设创建一个 8GB 可启动存储卷,可参考如下步骤: - * Get Image list using below + * 使用如下命令获取镜像列表 @@ -166,7 +166,7 @@ Ans: To Create a bootable cinder or block storage volume (assume 8 GB) , refer t | 89254d46-a54b-4bc8-8e4d-658287c7ee92 | cirros  | active | ``` - * Create bootable volume of size 8 GB using cirros image + * 使用 cirros 镜像创建 8GB 的可启动存储卷 @@ -174,41 +174,41 @@ Ans: To Create a bootable cinder or block storage volume (assume 8 GB) , refer t ~# cinder create --image-id 89254d46-a54b-4bc8-8e4d-658287c7ee92 --display-name cirros-bootable-vol  8 ``` -### Q:17 How to list all projects or tenants that has been created in your opentstack? +### Q:17 如何列出所有在你的 OpenStack 中创建的项目或用户? -Ans: Projects or tenants list can be retrieved from the command using the below openstack command, +Ans: 可以使用如下命令来检索所有项目和用户: ``` ~# openstack project list --long ``` -### Q:18 How to list the endpoints of openstack services? +### Q:18 如何显示 OpenStack 服务端点列表? -Ans: Openstack service endpoints are classified into three categories, +Ans: OpenStack 服务端点被分为 3 类: - * Public Endpoint - * Internal Endpoint - * Admin Endpoint + * 公共端点 + * 内部端点 + * 管理端点 -Use below openstack command to view endpoints of each openstack service, +使用如下 OpenStack 命令来查看各种 OpenStack 服务端点: ``` ~# openstack catalog list ``` -To list the endpoint of a specific service like keystone use below, +可通过以下命令来显示特定服务端点(比如说 keystone)列表: ``` ~# openstack catalog show keystone ``` -Read More : [**Step by Step Instance Creation Flow in OpenStack**][2] +想了解更多请访问 : [**OpenStack 中的实例创建流程**][2] -### Q:19 In which order we should restart nova services on a controller node? +### Q:19 在控制节点上你应该按照什么步骤来重启 nova 服务? -Ans: Following order should be followed to restart the nova services on openstack controller node, +Ans: 应该按照如下步骤来重启 OpenStack 控制节点的 nova 服务: * service nova-api restart * service nova-cert restart From 19e63d1f15d2009df24225285ef4b7ec665eed13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8E=E5=B2=B3?= <3249977074@qq.com> Date: Wed, 5 Dec 2018 23:41:40 +0800 Subject: [PATCH 6/6] Update 20181107 Top 30 OpenStack Interview Questions and Answers.md --- ...enStack Interview Questions and Answers.md | 73 +++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md index 31129b4e14..953989ccc9 100644 --- a/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md +++ b/translated/tech/20181107 Top 30 OpenStack Interview Questions and Answers.md @@ -218,51 +218,60 @@ Ans: 应该按照如下步骤来重启 OpenStack 控制节点的 nova 服务: -### Q:20 Let’s assume DPDK ports are configured on compute node for data traffic, now how you will check the status of dpdk ports? +### Q:20 假如计算节点上为数据流量配置了一些 DPDK 端口,你如何检查 DPDK 端口的状态呢? -Ans: As DPDK ports are configured via openvSwitch (OVS), use below commands to check the status, +Ans: 因为我们使用 openvSwitch (OVS) 来配置 DPDK 端口,因此可以使用如下命令来检查端口的状态: -### Q:21 How to add new rules to the existing SG(Security Group) from command line in openstack? +``` +root@compute-0-15:~# ovs-appctl bond/show | grep dpdk +active slave mac: 90:38:09:ac:7a:99(dpdk0) +slave dpdk0: enabled +slave dpdk1: enabled +root@compute-0-15:~# +root@compute-0-15:~# dpdk-devbind.py --status +``` -Ans: New rules to the existing SG in openstack can be added using the neutron command, +### Q:21 How to add new rules to the existing SG(Security Group) from command line in openstack?如何使用命令行在 OpenStack 中向存在的安全组 SG(Security Group)中添加新规则? + +Ans: 可以使用 neutron 命令向 OpenStack 已存在的安全组中添加新规则: ``` ~# neutron security-group-rule-create --protocol   --port-range-min --port-range-max --direction  --remote-ip-prefix Security-Group-Name ``` -### Q:22 How to view the OVS bridges configured on Controller and Compute Nodes? +### Q:22 如何查看控制节点和计算节点的 OVS 桥配置? -Ans: OVS bridges on Controller and Compute nodes can be viewed using below command, +Ans: 控制节点和计算节点的 OVS 桥配置可使用以下命令来查看: ``` ~]# ovs-vsctl show ``` -### Q:23 What is the role of Integration Bridge(br-int) on the Compute Node ? +### Q:23 计算节点上的集成桥(br-int)的作用是什么? -Ans: The integration bridge (br-int) performs VLAN tagging and untagging for the traffic coming from and to the instance running on the compute node. +Ans: 集成桥(br-int)对来自和运行在计算节点上的实例的流量执行 VLAN 标记和取消标记。 -Packets leaving the n/w interface of an instance goes through the linux bridge (qbr) using the virtual interface qvo. The interface qvb is connected to the Linux Bridge & interface qvo is connected to integration bridge (br-int). The qvo port on integration bridge has an internal VLAN tag that gets appended to packet header when a packet reaches to the integration bridge. +数据包从实例的 n/w 接口发出使用虚拟接口 qvo 通过 linux 桥(qbr)。qvb接口是用来连接 Linux 桥的,qvo 接口是用来连接集成桥(br-int)的。集成桥上的 qvo 端口有一个内部 VLAN 标签,这个标签是用于当数据包到达集成桥的时候贴到数据包头部的。 -### Q:24 What is the role of Tunnel Bridge (br-tun) on the compute node? +### Q:24 隧道桥(br-tun)在计算节点上的作用是什么? -Ans: The tunnel bridge (br-tun) translates the VLAN tagged traffic from integration bridge to the tunnel ids using OpenFlow rules. +Ans: 隧道网桥(br-tun)根据 OpenFlow 规则将 VLAN 标记的流量从集成网桥转换为隧道 ID。 -br-tun (tunnel bridge) allows the communication between the instances on different networks. Tunneling helps to encapsulate the traffic travelling over insecure networks, br-tun supports two overlay networks i.e GRE and VXLAN +br-tun(tunnel bridge,即隧道桥)允许不同网络的实例彼此进行通信。隧道有利于封装在非安全网络上传输的流量,br-tun 支持两层网络,即 GRE 和 VXLAN。 -### Q:25 What is the role of external OVS bridge (br-ex)? +### Q:25 外部 OVS 桥(br-ex)的作用是什么? -Ans: As the name suggests, this bridge forwards the traffic coming to and from the network to allow external access to instances. br-ex connects to the physical interface like eth2, so that floating IP traffic for tenants networks is received from the physical network and routed to the tenant network ports. +Ans: 顾名思义,此网桥转发来往网络的流量,以允许外部访问实例。br-ex 连接物理接口比如 eth2,这样用户网络的浮动 IP 数据从物理网络接收并路由到用户网络端口。 -### Q:26 What is function of OpenFlow rules in OpenStack Networking? +### Q:26 OpenStack 网络中 OpenFlow 规则的作用是什么? -Ans: OpenFlow rules is a mechanism that define how a packet will reach to destination starting from its source. OpenFlow rules resides in flow tables. The flow tables are part of OpenFlow switch. +Ans: OpenFlow 规则是一种机制,这种机制定义了一个数据包如何从源到达目的地。OpenFlow 规则存储在 flow 表中。flow 表是 OpenFlow 交换机的一部分。 -When a packet arrives to a switch, it is processed by the first flow table, if it doesn’t match any flow entries in the table then packet is dropped or forwarded to another table. +当一个数据包到达交换机就会被第一个 flow 表检查,如果不匹配 flow 表中的任何入口,那这个数据包就会被丢弃或者转发到其他 flow 表中。 -### Q:27 How to display the information about a OpenFlow switch (like ports, no. of tables, no of buffer)? +### Q:27 怎样查看 OpenFlow 交换机的信息(比如端口、表编号、缓存编号等)? -Ans: Let’s assume we want to display the information about OpenFlow switch (br-int), run the following command, +Ans: 假如我们要显示 OpenFlow 交换机的信息(br-int),需要执行如下命令: ``` root@compute-0-15# ovs-ofctl show br-int @@ -282,32 +291,36 @@ actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_d  ……………………………………… ``` -### Q:28 How to display the entries for all the flows in a switch? +### Q:28 如何显示交换机中的所有 flow 的入口? -Ans: Flows entries of a switch can be displayed using the command ‘ **ovs-ofctl dump-flows** ‘ +Ans: 可以使用命令 ‘ **ovs-ofctl dump-flows** ‘ 来查看交换机的 flow 入口 -Let’s assume we want to display flow entries of OVS integration bridge (br-int), +假设我们想显示 OVS 集成桥(br-int)的所有 flow 入口,可以使用如下命令: -### Q:29 What are Neutron Agents and how to list all neutron agents? +``` +[root@compute01 ~]# ovs-ofctl dump-flows br-int +``` -Ans: OpenStack neutron server acts as the centralized controller, the actual network configurations are executed either on compute and network nodes. Neutron agents are software entities that carry out configuration changes on compute or network nodes. Neutron agents communicate with the main neutron service via Neuron API and message queue. +### Q:29 什么是 Neutron 代理?如何显示所有 Neutron 代理? -Neutron agents can be listed using the following command, +Ans: OpenStack Neutron 服务器充当中心控制器,实际网络配置是在计算节点或者网络节点上执行的。Neutron 代理是计算节点或者网络节点上进行配置更新的软件实体。Neutron 代理通过 Neuron 服务和消息队列来和中心 Neutron 服务通信。 + +可通过如下命令查看 Neutron 代理列表: ``` ~# openstack network agent list -c ‘Agent type’ -c Host -c Alive -c State ``` -### Q:30 What is CPU pinning? +### Q:30 CPU Pinning 是什么? -Ans: CPU pinning refers to reserving the physical cores for specific virtual machine. It is also known as CPU isolation or processor affinity. The configuration is in two parts: +Ans: CPU Pinning 是指为某个虚拟机保留物理核心。它也称为 CPU 隔离或处理器关联。有两个目的: - * it ensures that virtual machine can only run on dedicated cores - * it also ensures that common host processes don’t run on those cores + * 它确保虚拟机只能在专用核心上运行 + * 它还确保公共主机进程不在这些核心上运行 -In other words we can say pinning is one to one mapping of a physical core to a guest vCPU. +我们也可以认为 Pinning 是物理核心到一个用户虚拟 CPU(vCPU) 的一对一映射。 --------------------------------------------------------------------------------