values in the data attribute is exactly the same as that shown in the preceding figure:
ImageData. data [index * 4 + 0]
ImageData. data [index * 4 + 1]
ImageData. data [index * 4 + 2]
ImageData. data [index * 4 + 3]
The data array is taken out above.Four consecutive adjacent valuesThese four values representIndex + 1 pixelThe size of the red, green, blue, and transparency values.
Note::Index starts from 0.
levelIv. What you may not know in SwiftAbout Swift's development series, explaining the swift knowledge you may have overlookedV. CoreData VS Realm:ios persistence which strong?IOS persistence is not a lot of choice, high-end a little coredata, Realm, FMDB, KV class (LEVELDB, etc.). Low-end Some direct a nsarray is written Plist can also be persistentTeam of a new "peer said" application, to help engineer Bo main promotion of the article app, welcome bloggers to write good articles to share int
://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160827-1472302026023002224.jpg "style=" border:0px;white-space:normal;float:none; "/>Type_drivers tells ML2 to load all 5 types of network type driver.
Type_drivers = Local,flat,vlan,gre,vxlan
This allows us to create all types of networks (although only the local network is created in this section).Both the normal user and the admin can create the network through the CLI or the W
In the previous section we learned the principle of Neutron Vlan Network, and today we discuss how to enable it in the ML2 configuration.The VLAN network related parameters are set first in/etc/neutron/plugins/ml2/ml2_conf.ini.
Tenant_network_types = VLAN
Specifies that a normal user creates a network type of VLAN.Then specify the range of VLANs:The above configuration defines the range of VLAN Network,vlan IDs for which label "default" is 3001-4000. This range is for ordinary user
"style=" border:0px;white-space:normal;float:none; "/>Two instance VIF are hung on the same Linux bridge and can communicate with each other.Here's a question for you to think about:
If CIRROS-VM2 launch is schedule to a compute node instead of a control node, does it get DHCP IP?
Answer:
I can't . Because the DHCP agent is running on the control node, CIRROS-VM2 is located on the local network of the compute nodes, and the two are in different physical nodes. Because the
before we created the vlan100 and deployed the instance, today we will continue creating a second VLAN network "vlan101". The subnet IP address is 172.16.101.0/24.what has changed in the underlying networkNeutron automatically creates the vlan101 corresponding bridge Brq1d7040b8-01,vlan interface eth1.101, as well as the DHCP tap device tap5b1a2247-32. Eth1.101 and tap5b1a2247-32 are already connected to Brq1d7040b8-01,vlan 101 's two-layer network ready.Now, the network structure is as follows:
In the previous section, "First_local_net" was created through the Web GUI, and we need to figure out what changes have been made to the underlying network structure. Click on the "First_local_net" link to display the subnet and port information for the network.A port has been created in the Ports list named "(a5bd3746-3f89)", IP is 172.16.1.2, attached Device is network:dhcp. Here we just need to know that the port corresponds to the DHCP interface, as to how DHCP works is discussed in detail l
.
Veth pair named Qvbxxxx, Qvoxxxx.
OVS Integration Bridge is named Br-int.
OVS patch ports is named Int-br-ethx and PHY-BR-ETHX (ordinal of Interface).
OVS provider Bridge is named Br-ethx (X is the ordinal of the interface).
The physical interface is named EthX (X is the ordinal of interface).
OVS Tunnel Bridge is named Br-tun.
OVS provider Bridge is used in flat and VLAN networks, and OVS Tunnel Bridge is used in Vxlan and GRE networks. These devices are discussed
Pair "Cloud" was successfully imported.
Use the Key Pair "cloud". Launch instance, select Key Pair "Cloud" in the Access Security tab. OpenStack automatically adds the public key into the instance ~/.ssh/authorized_keys file.
SSH instance. Use the-I cloud.key to specify the private key and the Ubuntu user ssh "Web1" and "Web2".Login instance without a password directly.Note: For the sake of demonstration, here we execute SSH in router's namespace, the main purpose is to reach the network.
updating the XML configuration file for instance.We can also view the updated XML by Virsh edit.As you can see, instance adds a virtual disk of type block, source is the volume to be attach, the device name of the virtual disk is VDB.Manual Shut off and Start instance, through Fdisk-l to see volume has attach up, equipment for VDBThe GUI interface also updates relevant attach informationNow if we execute tgt-admin--show--mode target on the storage node, we will see the compute node as initiator
the contents of the container directoryThere are three files, according to the previous log we can know:
BACKUP-00001, compressed backup file.
Backup_metadata,metadata file.
Backup_sha256file, encrypt files.
You can view the current backup by Cinder Backup-list.In addition we can check the usage of cinder backup-create.Here is the--incremental option, which means you can perform an incremental backup. If you have done normal (full-volume) backups before, then you can signi
connection with the physical network card eth0, which ran 1 virtual machine VM1, now has a problem is: How to let VM1 access to the extranet?There are at least two scenarios
assign a virtual NIC to VM1 Vnet0, br0 by Linux Bridge eth0 and Vnet0 connected as shown in
Linux Bridge is used on Linux to do TCP/IP Layer Two protocol exchange device, its functions can be easily understood as a two-layer switch or Hub. Multiple network devices can connect to the same Linux
in the previous section we will NFS volume provider Configuration ready, this section will create volume. Create VolumeTo create an NFS volume action method as with LVM volume, the only difference is to select "NFS" in the drop-down list of volume type.Click "Create Volume", Cinder-api,cinder-scheduler and Cinder-volume work together to create Volume "Nfs-vol-1". This process is the same as LVM volume.Below we focus on analyzing Cinder-volume's logs to see how NFS Volume provider created volume.
evacuate operation.EvacuateRebuilds Instance on other compute nodes using the Instance image file on the shared storage. So planning for shared storage ahead of time is key.SectionHere, we've learned about the OpenStack Nova architecture, discussed key components such as Nova Api,scheduler,compute, and analyzed the Nova operations in detail, and finally summed up the purpose and usage scenarios for these operations using a single graph.Nova is the most important project in OpenStack, at the cen
-api will receive the attach volume request, the attach request actually contains two steps:
initializing volume connections volume is created, only the corresponding storage objects (such as LV) are created in volume provider, and the compute nodes are unusable. The Cinder-volume needs to export the volume in some way, and the compute nodes will be able to access it. The export process is "initializing the volume Connection". The following is a CINDER-API log file/opt/stack/logs/c-
running on it, it is a storage node, and of course, other OpenStack services can be run on that node.Cinder-volume is a storage node hat, CINDER-API is a control node hat. In our environment, devstack-controller wear both hats at the same time, so it is both a control node and a storage node. Of course, we can also use a dedicated node to run Cinder-volume.This once again demonstrates the flexibility of OpenStack distributed architecture deployment: All services can be placed on a single physic
the database, generally using MySQL. The database is installed on the control node. Nova uses a database named "Nova".650) this.width=650; "Title=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160419-1461074293725058214.png "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160419-1461074293725058214.png "alt=" Image137.png "style=" border:0px; "/>Message QueueBefore we learned that Nova contains a multitude of sub-services that need to coordinate and communic
.
For OpenStack operations and administrators, in most cases, we don't need to look at the source code.Because OpenStack logs are detailed enough to help us analyze and locate the problem.But there are still some detail logs that are not documented and can be understood more clearly by looking at the source code if necessary.Even so, the log will provide us with clues to source code, and we don't need to find a needle in the haystack.This is what we'll see in the operational analysis that fo
the source code if necessary. Even so, the log will provide us with clues to source code, and we don't need to find a needle in the haystack. This is what we'll see in the operational analysis that follows.650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160503-1462278430411006088.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-spac
code, you might think you're in a haystack. In fact, it is very simple, the above log has been clearly told we need to see the source code in/opt/stack/nova/nova/compute/api.py 1977 lines, the method is force_stop.The Force_stop method finally calls the Stop_instance method of the object Self.compute_rpcapi. In the OpenStack source code, the object named Xxx_rpcapi is the message queue of XXX. The Xxx_rpcapi.yyy () method represents a message that sends a YYY operation to the message queue of X
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.