2013年5月27日 星期一
OpenvSwitch Component Introduction
ovs−appctl − utility for configuring running Open vSwitch daemons ovs−controller − simple OpenFlow controller reference implementation
|
ovs−pki − OpenFlow public key infrastructure management utility |
ovs−ofctl − administer OpenFlow switches ovs−vswitchd − Open vSwitch daemon |
2013年5月26日 星期日
Nova: Xenserver Block Migration support on OpenStack
Prerequisites
- Compatible XenServer hypervisors. The hypervisors must support the Storage XenMotion feature. Please refer to the manual of your XenServer to make sure your edition has this feature.
Note | |
---|---|
Please note, that you need to use an extra option
--block-migrate for the live migration command, in order to use block migration. |
Note | |
---|---|
Please note, that block migration works only with EXT local storage SRs, and the server should not have any volumes attached.
|
python的函式修飾器: decorator
Function Decorator
decorator用來主要是用來修飾函式而不必修改函式的本身。
只要利用@來接"修飾函式"就可以達到修飾效果了,這算是python的syntax sugar。
@ decorator_function
http://caterpillar.onlyfun.net/Gossip/Python/FunctionDecorator.html
2013年5月24日 星期五
Cinder NFS Driver on OpenStack
在grizzly版本當中,cinder.volume.drivers.nfs.NfsDriver所製作出來的volumes就如同其他driver所製作出的一樣可以執行attach/detach的operation,但目前無法執行snapshot的運作。
OpenStack Security Group設定
為了讓Security Group的相關設定都交給Quantum Service來代理(proxy)處理,所以必須在/etc/nova/nova.conf中做以下的設定,以避免與原來Nova Networking所處理的Security Group相衝突。
## security groups ##
firewall_driver = nova.virt.firewall.NoopFirewallDriver
security_group_api = quantum
2013年5月23日 星期四
QEMU和KVM的差異
QEMU和KVM大致上都是相同的,但QEMU不支援原生虛擬化(Native Virtualization)
he main difference is that QEMU does not support native virtualization. Consequently, QEMU has worse performance than KVM and is a poor choice for a production deployment.
http://docs.openstack.org/grizzly/openstack-compute/admin/content/qemu.html
2013年5月22日 星期三
2013年5月20日 星期一
OpenStack: nova.conf section
Configuration options are grouped by section. The Compute config file supports the following sections.
- Almost all of the configuration options are organized into this section. If the documentation for a configuration option does not specify its section, assume that it should be placed in this one.
- The
cells
section is used for options for configuring cells functionality. See the Cells section of the OpenStack Compute Admin Manual for more details. - This section is used for options that relate to the baremetal hypervisor driver.
- The
conductor
section is used for options for configuring the nova-conductor service. - The
trusted_computing
section is used for options that relate to the trusted computing pools functionality. Options in this section describe how to connect to a remote attestation service.
[DEFAULT]
[cells]
[baremetal]
[conductor]
[trusted_computing]
Nova Conductor Service: no-db-compute for compute node
Q: 為何要做nova conductor service?這個從folsom版本開始討論構思,一直到了grizzly版本才合併。nova conductor究竟是啥樣子的服務呢!!?
[Dev List]
Nova Conductor Dev List, http://lists.openstack.org/pipermail/openstack-dev/2012-November/002573.html
A:
主要是不透過Nova DB的存取來降低效能的瓶頸以及compromised compute node會帶來淺在的危險。
The nova-conductor service is key to completing no-db-compute. Conceptually, it implements a new layer on top of nova-compute.
[Objective]
1. Compute nodes are the least trusted part of a nova deployment, so removing direct database access is a step toward reducing the potential impact of a compromised compute node.
2. The other benefit of no-db-compute is for upgrades. Direct database access complicates the ability to do live rolling upgrades
2. http://russellbryantnet.wordpress.com/2013/02/19/deployment-considerations-for-nova-conductor-service-in-openstack-grizzly/
[Dev List]
Nova Conductor Dev List, http://lists.openstack.org/pipermail/openstack-dev/2012-November/002573.html
A:
主要是不透過Nova DB的存取來降低效能的瓶頸以及compromised compute node會帶來淺在的危險。
The nova-conductor service is key to completing no-db-compute. Conceptually, it implements a new layer on top of nova-compute.
[Objective]
1. Compute nodes are the least trusted part of a nova deployment, so removing direct database access is a step toward reducing the potential impact of a compromised compute node.
2. The other benefit of no-db-compute is for upgrades. Direct database access complicates the ability to do live rolling upgrades
Reference:
1. http://cloudystuffhappens.blogspot.tw/2013/04/understanding-nova-conductor-in.html2. http://russellbryantnet.wordpress.com/2013/02/19/deployment-considerations-for-nova-conductor-service-in-openstack-grizzly/
2013年5月19日 星期日
Cinder: volume-type
What's Volume Type?
In the context of Cinder, Volume Type is an abstraction of various properties of a volume. It is _NOT_ type of back-end storage although one can create one volume type that only certain back-end is able to serve.
In current Cinder's implementation, volume type is just a string/name: 0
mysql> desc volume_types;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------------
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| deleted | tinyint(1) | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+
https://etherpad.openstack.org/grizzly-cinder-volumetypes
What's co-routine
Coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks,iterators, infinite lists and pipes.
Reference:
1. coroutine wiki, http://en.wikipedia.org/wiki/Coroutinegit: 改變commit(送交)的歷史
如果要改變最近一次的commit紀錄的話,則可以下達:
git commit --amend
Reference:
1. http://git-scm.com/book/zh-tw/Git-%E5%B7%A5%E5%85%B7-%E9%87%8D%E5%AF%AB%E6%AD%B7%E5%8F%B2
2013年5月18日 星期六
Python: understanding python super() and __init__() methods
Super lets you avoid referring to the base class explicitly, which can be nice. But the main advantage comes with multiple inheritance, where all sorts of fun stuff can happen. See the standard docs on superif you haven't already.
Reference:
1. http://stackoverflow.com/questions/576169/understanding-python-super-and-init-methods
2013年5月17日 星期五
MVC=Model-View-Control
M=Model, 負責資料儲存
V=View, 負責資料的呈現,例如網頁。
C=Control, 負責程式的邏輯控制
定義好framework的話則可將一些程式實作上的細節給隱藏起來(encapsulate)加以抽象化,再降低程式之間的隅合程度。
再以資料庫查詢應用為例,使用 MVC 而未使用 framework 之前,我們會用 sample1.php 的寫法。
接著,假設我們使用了某個名為 "MyCommonApp" 的 framework 之後,按該 framework 的預先建置內容,我們改成 sample2.php 的寫法。
sample1.php 和 sample2.php 兩種寫法的差異,一眼可見資料庫連線的動作被隱蔽了,而且也不需要用全域變數 (global) $dbh , $dbh 變成了個體成員 $this->dbh 。更進一步,被隱蔽的部份可以加以抽象化,如 MyCommonApp 可能會支援多種資料庫系統,或是支援不同的資料庫連接層 (DBA, MDB2 等) 。但這些細節皆被 framework 隱蔽起來, programmer 只需要專注 class FooApp 的內容即可。還有一件事要提,上述內容沒有 View 和 Control 的程式碼,因為根本不需要知道。 View 只管呈現陣列 ($fooSet) 的內容,不管是 sample1.php 或是 sample2.php ,只要 Model 丟出來的是個陣列, View 就不用作任何修改。這也是 MVC 架構所帶來的好處:低耦合度,各項工作間彼此獨立,其中一個項目的修改動作不會連帶要修改其他項目。在 team-work 中也意味著三種設計工作可以交由三個人同時進行。
訂閱:
文章 (Atom)