Challenge to add OpenStack API Validation Framework



Similar documents
Ken ichi Ohmichi NEC Solution Innovators, Ltd.

Multi Provider Cloud. Srinivasa Acharya, Engineering Manager, Hewlett-Packard

OpenStack Alberto Molina Coballes

Isabell Sippli Cloud Architect, Lab Based Services IBM Software Group 2013 IBM Corporation

An Introduction to OpenStack and its use of KVM. Daniel P. Berrangé

Sales Slide Midokura Enterprise MidoNet V1. July 2015 Fujitsu Limited

Adventures & Challenges building an OpenStack public cloud. Walter Heukels, Koert van der Veer en Pim van Riezen

Is OpenStack the best path forward towards successful Clouds? Cor van der Struijf Senior Cloud Advisor

Change the Game with HP Helion

Agile Infrastructure: an updated overview of IaaS at CERN

Ubuntu OpenStack Fundamentals Training

Cloud on TIEN Part I: OpenStack Cloud Deployment. Vasinee Siripoonya Electronic Government Agency of Thailand Kasidit Chanchio Thammasat

Iron Chef: Bare Metal OpenStack

OpenStack The State of the Stack

How To Use Openstack On Your Laptop

Clodoaldo Barrera Chief Technical Strategist IBM System Storage. Making a successful transition to Software Defined Storage

Your Journey to the Cloud with Red Hat

OpenStack Awareness Session

KVM, OpenStack, and the Open Cloud

OpenStack Introduction. November 4, 2015

Develop a process for applying updates to systems, including verifying properties of the update. Create File Systems

OpenStack/Quantum SDNbased network virtulization with Ryu

How an Open Source Cloud Will Help Keep Your Cloud Strategy Options Open

OpenStack An Open Cloud for an Open Data World IBM s Contributions, Commitments & Products

Tuskar UI Documentation

CloudCIX Bootcamp. The essential IaaS getting started guide.

KVM, OpenStack, and the Open Cloud

Cloud on TEIN Part I: OpenStack Cloud Deployment. Vasinee Siripoonya Electronic Government Agency of Thailand Kasidit Chanchio Thammasat University

Sunshine in a Cloudy World

DevOps in OpenStack Public Cloud 副 标 题 副 标 题 副 标 题 Presented at OpenStack Summit, Fall 2012, San Diego

SuperVessel: The Open Cloud Service for OpenPOWER

Infrastructure as a Service (IaaS)

WHITE PAPER. Software Defined Storage Hydrates the Cloud

Whither Enterprise Cloud Platform Linux, Docker and more Loo Chia Zyn Head of Sales Consulting, Japan & Asia Pacific Oracle Linux & Oracle VM

Openstack. Cloud computing with Openstack. Saverio Proto

HO5604 Deploying MongoDB. A Scalable, Distributed Database with SUSE Cloud. Alejandro Bonilla. Sales Engineer abonilla@suse.com

How To Install Openstack On Ubuntu (Amd64)

Software Defined Networking (SDN) and OpenStack. Christian Koenning

Déployer son propre cloud avec OpenStack. GULL François Deppierraz

The Total Newbie s Introduction to Heat Orchestration in OpenStack

AMD SEAMICRO OPENSTACK BLUEPRINTS CLOUD- IN- A- BOX OCTOBER 2013

OpenStack IaaS. Rhys Oxenham OSEC.pl BarCamp, Warsaw, Poland November 2013

How To Make A Cloud Work For You

Wojciech Furmankiewicz Senior Solution Architect Red Hat CEE

Release Notes for Fuel and Fuel Web Version 3.0.1

Copyright 2014, Oracle and/or its affiliates. All rights reserved. 2

Are We Done Yet? Testing Your OpenStack Deployment

KVM, OpenStack and the Open Cloud SUSECon November 2015

Introduction to OpenStack

Savanna Hadoop on. OpenStack. Savanna Technical Lead

CERN Cloud Architecture

UZH Experiences with OpenStack

Today. 1. Private Clouds. Private Cloud toolkits. Private Clouds and OpenStack Introduction

Firenze. Iottly, open source Internet of Things distribution

cloud functionality: advantages and Disadvantages

CON8473 Oracle Distribution of OpenStack Making OpenStack an Enterprise Grade Solution

Leveraging OpenStack Private Clouds

RED HAT ENTERPRISE LINUX OPENSTACK PLATFORM

By Reeshu Patel. Getting Started with OpenStack

An Intro to OpenStack. Ian Lawson Senior Solution Architect, Red Hat

Alan Clark. OpenStack. The Foundation for Open Source Cloud

TUT5605: Deploying an elastic Hadoop cluster Alejandro Bonilla

Design and Implementation of IaaS platform based on tool migration Wei Ding

HP OpenStack & Automation

Using SUSE Cloud to Orchestrate Multiple Hypervisors and Storage at ADP

Introduction to Openstack, an Open Cloud Computing Platform. Libre Software Meeting

Getting Started with the CLI and APIs using Cisco Openstack Private Cloud

Cloud Essentials for Architects using OpenStack

Surviving the Worst: Disaster Recovery for OpenStack

OpenStack Manila Shared File Services for the Cloud

Getting Started with Database As a Service on OpenStack

Nessus or Metasploit: Security Assessment of OpenStack Cloud

Comparing Ganeti to other Private Cloud Platforms. Lance Albertson

Using GitHub for Rally Apps (Mac Version)

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

SUSE Cloud 5 Private Cloud based on OpenStack

Research of Enterprise Private Cloud Computing Platform Based on OpenStack. Abstract

OpenStack Towards a fully open cloud. Thierry Carrez Release Manager, OpenStack

How To Compare Cloud Computing To Cloud Platforms And Cloud Computing

Project Documentation

Running an OpenStack Cloud for several years and living to tell the tale. Alexandre Maumené Gaëtan Trellu Tokyo Summit, November 2015

Building Multi-Site & Ultra-Large Scale Cloud with Openstack Cascading

SUSE Cloud 2.0. Pete Chadwick. Douglas Jarvis. Senior Product Manager Product Marketing Manager

HOW RED HAT BRINGS OPENSTACK INTO THE ENTERPRISE by Bryan Che and Gordon Haff

Isaku Yamahata CloudOpen Japan May 22, 2014

OpenShift on you own cloud. Troy Dawson OpenShift Engineer, Red Hat November 1, 2013

การใช งานและต ดต งระบบ OpenStack ซอฟต แวร สาหร บบร หารจ ดการ Cloud Computing เบ องต น

OpenStack Assessment : Profiling & Tracing

Transcription:

Challenge to add OpenStack API Validation Framework 2013.05.31 Ken ichi Ohmichi NEC-Soft, Ltd. (oomichi@mxs.nes.nec.co.jp)

Agenda OpenStack OpenStack community development OpenStack functions through RESTful API Issues of RESTful APIs Fail-Fast architecture API validation framework Development process Schedule for Havana Page 2 NEC Corporation 2013

OpenStack The Open Source Cloud Operating System Controls virtual machines, storage/networking resources. Consists of multiple functional components. Compute: Nova VM image: Glance Identity: Keystone Networking: Quantum (will be renamed) Block storage: Cinder Object Storage: Swift Dashboard: Horizon Metering: Ceilometer Orchestration: Heat

OpenStack community development The community is very active. OpenStack community consists of many developers, users and operators. They are cooperating each other on mailing-list, IRC and development tools such as Gerrit. The community releases new version of OpenStack every six months, and the functions increases by each version.

OpenStack community development The development routine 1. Submit a bug-report / blueprint to OpenStack Launchpad. 2. git clone necessary source code from OpenStack github. 3. Modify the source code as you like. 4. git commit with the id of bug-report / blueprint. 5. git review for posting a patch into Gerrit system. 6. (Reviewers) review the patch and submit their feedbacks with score on Gerrit. Score +2: Approve Score +1: Looks good do me, but someone else must approve Score -1: I would prefer that you didn t merge this. Score -2: Do not merge 7. Apply reviewer s feedback to your patch, and retry git review for reposting it. 8. (Reviewers) re-review the patch. When core reviewer marks it as +2, the patch is merged to OpenStack github. Congratulations

OpenStack functions through RESTful API Control functions with dashboard or command line. These tools uses RESTful API in the background. Dashboard Create vm by pushing here. Control functions through RESTful API directly. EX) We can create a virtual machine by sending API request with following parameters to http://<openstack>:8774/<tenant-id>/servers with POST method. The parameters can be specified with JSON/XML format. { } "server": { "flavorref": "1", "imageref": "70a599e0-31e7-49b7-b260-868f441e862b", "name": "new-server-01"

Issue/Solution of RESTful APIs Issue Not all API parameters are completely validated, so some API operations execute without parameter validations. Solution By validating every API parameters just after receiving API request, it makes better OpenStack quality. Because the basic design of OpenStack is Fail-Fast architecture. Page 7 NEC Corporation 2013

Fail-Fast Architecture Fail-Fast system does not retry/cleanup if something wrong happens. Ex) If something wrong happens after adding a DB record during one API operation, it does not remove the added record. As the result, incomplete record remains in DB. The antonym is Fail-Safe. The implementation cost of Fail-Safe tends to higher: What should be cleaned up when error handling? What should it do when double errors (something wrong in error handling)? On Fail-Fast system is easy-debugging because developers can know what happens easily. Op-01 add Op-01 add Op-02 Record-01 remains Op-02 del Record-01 removed Op-03 Op-03 Fail-Fast Fail-Safe

API validation framework: Goals I have proposed API validation framework to OpenStack community for comprehensive validation. This framework goals are: To validate every API parameter. To return an error response before API operation, if invalid API parameter. To unify the error message format of the response, if the same cause. ex).. is not string.", ".. is not integer." By comprehensive validation just after receiving API request, it makes better OpenStack quality because it can reduce incomplete situations like incomplete record remaining. Merit Page 9 NEC Corporation 2013

API validation framework: Validation Point (discussing now) The API validations are executed before each API method. The proposed framework is implemented with jsonschema library. This framework can validate requests of both XML and JSON, because jsonschema handles dict data after JSON/XML deserialization. I heard often Can this framework handle XML request? due to its library name. The answer is Yes, it can. Nova (2) Execute the selected validation Client request JSON/XML Deserialization Router API Validation API Validation API Validation (1) Select a validation and a method corresponding to API API method API method API method (3) Execute the selected method Page 10 NEC Corporation 2013

API validation framework: API Schema (discussing now) API schema = API parameter data format. Ex) The API schema of the Change Password API. { 'type' : 'object', 'properties' : { 'changepassword': { 'properties' : { 'adminpass': {'type': 'string', 'required': True}, } } } } Need many API schema definitions because OpenStack has many APIs (hundreds). Page 11 NEC Corporation 2013

API validation framework: Merits In addition to the goals, there are two merits of the framework. Clarification of API Parameter Definitions The type and acceptable range and length of each parameter are clarified in the API schema definitions. By defining the schemas of every API, developers will be able to create applications more easily using Nova APIs. Cleaned-up Code The amount of Nova code can be reduced by merging validations and error response methods. Ex) the min_count parameter of create a virtual machine instance API try: min_count = int(str(min_count)) except ValueError: msg = _('min_count must be an integer value') raise exc.httpbadrequest(explanation=msg) if min_count < 1: msg = _('min_count must be > 0') raise exc.httpbadrequest(explanation=msg) 'min_count': {'type': 'integer', 'minimum': 1}, Page 12 NEC Corporation 2013

Development process March, 2013 Created some prototype for Nova. Proposed the prototype to OpenStack community. Could listen positive responses. April, 2013 Had a session of OpenStack Design Summit for this framework in Portland, Ore. Could make consensus for its purpose. Could know it is good that the first target of this framework is Nova v3 API. Nova v3 API will be implemented for Havana, and compatibility issues do not happen even if applying strict validation.

Schedule for Havana Now we are discussing what is best validation mechanism. We need more time for consensus. We have 4 months until Havana-3 meaning deadline for new code. Make Framework Core Patches. Make API schema Definition Patches. This is very hard work, because Nova has many APIs. Merge by middle of August. Deadline for new code Framework core h1 API schema definition h2 h3 rc1 rc2 rc3 Havana Apr May June July Aug Sep Oct we AD 2013 Page 14 NEC Corporation 2013

OpenStack community development is hard work, but contribution to the community is very interesting because the community consists of skillful developers and they give good questions, advices, and answers. I am glad if many people are into OpenStack community. Thanks

Page 16 NEC Corporation 2013

Related URLs Blueprint Nova API Validation Framework https://blueprints.launchpad.net/nova/+spec/nova-api-validation-fw Framework core patch for Oslo https://review.openstack.org/#/c/25884/ Framework core for Nova https://review.openstack.org/#/c/25358/ Nova v3 API https://blueprints.launchpad.net/nova/+spec/nova-v3-api How to contribute to OpenStack https://wiki.openstack.org/wiki/how_to_contribute Page 17 NEC Corporation 2013