Month: December 2013

Defining the Cloud

  1. A cloud must be built on pooled, virtual infrastructure. This includes not only the CPU and memory resources but also the storage and networking and associated services.
  2. The cloud should provide application mobility between clouds, allowing the consumer to easily enter the cloud and exit the cloud with existing workloads. The use of existing consumer tools for performing the migration of workloads to or from the cloud is highly desirable.
  3. The cloud should be open and interoperable, allowing the consumer to consume cloud resources over open, Internet standard protocols. There should not be a requirement for specific networking or clients in order to access cloud resources.
  4. The cloud consumer should only pay for resources they consume or commit to consuming.
  5. The cloud should be a secure and trusted location for running cloud consumer workloads.
  6. The cloud consumer should have the option and the ability to protect their cloud-based workloads from data loss.
  7. The cloud consumer must not be responsible for the maintenance of any part of the shared infrastructure, or have to interact with the cloud provider to maintain the infrastructure, including storage and network maintenance, on-going patches, or business continuity activities. The cloud should be available to run high availability workloads and any faults occurring in the cloud infrastructure should be transparent to the cloud consumer as a result of built-in availability, scalability, security and performance guarantees.

read count : 263

Jetty require servlet-api 2.5 to fix “java.lang.NoSuchMethodError

Jetty require servlet-api 2.5 to fix “java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String”, don’t add “org.mortbay.jetty servlet-api”, you need :

[INFO] [03:08:44,408] []	 Starting jetty on port 8081
[INFO] [03:08:44,964] []
[main] INFO org.eclipse.jetty.server.Server - jetty-9.1.0.RC0
[main] INFO /monitor - Set web app root system property: 'webapp.root' = [/Users/peter/Desktop/workspace/titan-monitor/target/titan-monitor]
[main] INFO /monitor - Initializing log4j from []
[main] INFO /monitor - Initializing Spring root WebApplicationContext
[INFO]	[2013-12-26 03:08:45] - Root WebApplicationContext: initialization started
[ERROR]	[2013-12-26 03:08:45] - Context initialization failed
java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(
	at org.eclipse.jetty.webapp.WebAppContext.startContext(
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(
	at org.eclipse.jetty.webapp.WebAppContext.doStart(

read count : 2492

devstack neutron problem

When you meet the following error when starting devtsack with neutron, add “enable_service q-lbaas” in your localrc.


   mod = imp.load_source(module_id, path, fp)
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/", line 105, in
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/", line 89, in run_migrations_online
  File "", line 7, in run_migrations
  File "/usr/local/lib/python2.7/dist-packages/alembic/", line 652, in run_migrations
  File "/usr/local/lib/python2.7/dist-packages/alembic/", line 225, in run_migrations
  File "/opt/stack/neutron/neutron/db/migration/alembic_migrations/versions/", line 50, in upgrade
    local_cols=['agent_type', 'host']
  File "", line 7, in create_unique_constraint
  File "/usr/local/lib/python2.7/dist-packages/alembic/", line 544, in create_unique_constraint
    schema=schema, **kw)
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/", line 135, in add_constraint
  File "/usr/local/lib/python2.7/dist-packages/alembic/ddl/", line 76, in _exec
    conn.execute(construct, *multiparams, **params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/", line 1449, in execute
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/", line 1542, in _execute_ddl
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/", line 1698, in _execute_context
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/", line 1691, in _execute_context
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/", line 331, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1146, "Table 'neutron_ml2.agents' doesn't exist") 'ALTER TABLE agents ADD CONSTRAINT uniq_agents0agent_type0host UNIQUE (agent_type, host)' ()
++ failed
++ local r=1
+++ jobs -p
++ kill
++ set +o xtrace

My localrc


disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
enable_service q-lbaas
# Optional, to enable tempest configuration as part of devstack
#enable_service tempest

After the fix, my neutron is running

/root>keystone service-list
|                id                |   name   |    type   |        description        |
| 4a20abbac9144556b24a09b1f49d537e |  cinder  |  volumev2 |  Cinder Volume Service V2 |
| 5de3083f702647b7bdee345170d625c5 |  cinder  |   volume  |   Cinder Volume Service   |
| 7061e82a8ee64dfe93a6350830a0a2b8 |   ec2    |    ec2    |  EC2 Compatibility Layer  |
| f540e854d72647e59cdf5519cbc1c5d4 |  glance  |   image   |    Glance Image Service   |
| 31a825f0b21c472b80d7d2d388ffbe5b | keystone |  identity | Keystone Identity Service |
| cc14b963113149fba3606ff413334128 | neutron  |  network  |      Neutron Service      |
| 15c3204709884e638478f835dc0ed6fb |   nova   |  compute  |    Nova Compute Service   |
| e36c8a8f06a742ffb1e336fc04d4fd69 |   nova   | computev3 |  Nova Compute Service V3  |
| bfba1eafd5e9411484e587a736017ddf |    s3    |     s3    |             S3            |
/root>keystone endpoint-list
|                id                |   region  |                 publicurl                  |                internalurl                 |                  adminurl                  |            service_id            |
| 21c0fa2efe5d4b948c8e67adcc229508 | RegionOne |          |          |          | bfba1eafd5e9411484e587a736017ddf |
| 2e8ed4da5dfc46909c581efa5624fa72 | RegionOne |$(tenant_id)s |$(tenant_id)s |$(tenant_id)s | 5de3083f702647b7bdee345170d625c5 |
| 3ca0ce043a394668b94590cc37f9ff20 | RegionOne |  |  |  | 7061e82a8ee64dfe93a6350830a0a2b8 |
| 6fcc13f5dffa495795928c09f9992058 | RegionOne |         |         |         | cc14b963113149fba3606ff413334128 |
| 7b7fe89091c34b31a85dcbb7c272c6fa | RegionOne |          |          |          | f540e854d72647e59cdf5519cbc1c5d4 |
| 8d7541779f484af193b95626639fac07 | RegionOne |        |        |        | e36c8a8f06a742ffb1e336fc04d4fd69 |
| a237ad3aa87b440fb20a7440b3aa1979 | RegionOne |$(tenant_id)s |$(tenant_id)s |$(tenant_id)s | 4a20abbac9144556b24a09b1f49d537e |
| a5147a55c5a444f4936accf5f8639dc1 | RegionOne |       |       |       | 31a825f0b21c472b80d7d2d388ffbe5b |
| d13e9a6a79784eb2b37a311dc507bfe4 | RegionOne |$(tenant_id)s |$(tenant_id)s |$(tenant_id)s | 15c3204709884e638478f835dc0ed6fb |

read count : 887

The Costs of Versioning an API

Contract versioning and API/Service versioning has always been a consideration for SOA based systems. Whether because of the impact it has on composability, or client-service governance, it is still something of an art rather than a science. There are many examples of groups giving the benefit of their experiences (e.g., around REST is extremely popular). However, recently Jean-Jacques Dubray has written an article which attempts to inject some scientific objectivity into this problem domain.

I have been asked recently to create an estimate of the costs of versioning APIs (or Web Services). I wanted to share this estimate because I feel a lot of people still don’t understand the cost implications of API/Service versioning.

According to JJ, during the work they found that the cost of building APIs was dependent upon the approach used subsequently to version them.

The key point that [you need] to understand is that even if the cost to your consumers may look small to you, it is not just a pure cost, it is risks, disrupted project plans, unavailable budgets… with changes that often have no immediate business value to an existing consumer who was not expecting any change to API.

The article then goes on to classify three different approaches to API versioning (see the full article for a more in depth discussion of each, including how JJ defines a way to measure cost):

  • The Knot. “All API consumers are tied to a single version of the API, when that API changes, all consumers have to change, in essence creating a massive ripple effect across the entire set of consumers / ecosystem.”

  • Point-to-Point. “Every service version is left running in production and consumers are required to migrate on their own, when they need to. The maintenance costs increase as the number of version in production increases.”

  • Compatible Versioning. “All clients talk to the same compatible API/Service version.”

Given these definitions and associated costs computed using the equations JJ describes, it is possible to plot the relative costs as shown below (y axis is cost, x axis is the version number):


As JJ says:

[…] a single version forcing every consumer to upgrade when the API changes is the most expensive to the ecosystem. A multiplicity of versions that need to be maintained is better, but still quite costly when you try to keep upgrading each version or alternatively operating older versions. A compatible versioning strategy seem to offer the best efficiency.

So what do others think? Is this way of calculating the cost of versioning APIs applicable beyond the environments in which it was developed by JJ and team? Does the relative cost explanation make sense given your own experiences? Are there other categories which JJ and team don’t cover?

read count : 257

Open vswitch overview

Start ovs monitor, look at the tabs’ name, you probably know how many function that OVS offer, this give me a big picture of integrate ova into openstack.

OVS monitor
OVS monitor

read count : 278

Titan on retina display

Titan on retina display, all icons are smooth, but don’t know why the CPU is high when controlling over 40 VMs.

very nice looking on mac pro retina 15"
very nice looking on mac pro retina 15″
remote control two VMs
remote control two VMs
CPU is high when controlling over 40 VMs
CPU is high when controlling over 40 VMs
Network is ok
Network is ok
Memory is nice, doesn't use too much
Memory is nice, doesn’t use too much

read count : 340