
From the early days of Valet, there has been a known O(n) inefficiency concerning Music query filtering. This is further exacerbated by the instantiation of Music-backed ORM objects, leading to a O(n*m) inefficiency. This commit is a mitigation that greatly increases the likelihood of O(1) filtering performance. valet-engine job status check efficiency is also improved as a result. This commit also fixes a condition where valet-api may create multiple valet-engine placement requests for a stack id that already has a request in process (e.g., if nova-scheduler calls valet-api multiple times due to a retry by nova-controller). IMPORTANT: When applying this commit, perform the following changes. 1: In valet.conf, ensure "tries" and "interval" are set to 100 and 0.1, respectively. (If they're commented out, change the commented versions. There is no need to uncomment them.) [music] tries = 100 interval = 0.1 2: Manually create secondary keys in the valet-api cassandra tables. For instance, given a keyspace of "valet_aic", execute these commands in cqlsh on the cassandra server used by valet-api. CREATE INDEX ON valet_aic.plans (stack_id); CREATE INDEX ON valet_aic.placements (plan_id); CREATE INDEX ON valet_aic.placements (orchestration_id); CREATE INDEX ON valet_aic.placements (resource_id); Until Music is updated to handle this automatically, these commands must be executed every time the tables are dropped/re-added. 3: Determine the realistically expected number of simultaneous plan requests for valet-api. Ensure the server running valet-api is sized appropriately, set the httpd configuration's thread count to match this number (perhaps a few extra), and restart the daemon. For example, to specify 10 threads in Apache2 httpd, edit the WSGIDaemonProcess directive for valet-api (this is one line): WSGIDaemonProcess valet user=ubuntu group=ubuntu threads=10 python-home=/opt/stack/heat.venv 4: To start with a clean slate, clear out any residual placement requests and responses in the valet-engine cassandra tables. For instance, given a keyspace of "valet_aic", execute these commands in cqlsh on the cassandra server used by valet-engine. TRUNCATE valet_aic.placement_requests; TRUNCATE valet_aic.placement_results; Change-Id: I76528c9b81dc451241ecc547cadc18cc4b1284df
Valet
Valet is a cloud resource placement optimization service. Valet gives OpenStack the ability to optimize cloud resources while simultaneously meeting a cloud application's QoS requirements. Through model driven orchestration, the target state of Valet is to provide “holistic OpenStack data-plane resource placement”. Valet provides an api service, a placement optimizer (Ostro), a high availability data storage and persistence layer (Music), and a set of OpenStack plugins.
Why Valet exists:
For large-scale, multi-tenant cloud operators, there is a large demand for tenant specific service requests. This demand drives the growth of the number of cloud availability zones and compartmentalization of the cloud, which then leads to increased provisioning and sub-optimal use of cloud and staff resources. Also, security requirements lead us to place specialized network appliances of these tenants separately into “exclusive” hosts that do not have internet connectivity.
Valet responds to the challenges outlined above by enhancing OpenStack Nova scheduling to develop resource management optimization. By planning the placement of all the cloud resources for an application in a holistic manner, there is opportunity to reduce cross-rack traffic, reduce resource fragmentation, and save on operating costs.
Learn more about Valet:
- OpenStack Newton Summit Presentation (Austin, TX, 27 April 2016)
- Presentation Slides (PDF)
Valet consists of the following components:
- valet-openstack: a set of OpenStack plugins used to interact with Valet
- valet-api: an API engine used to interact with Valet
- Ostro: a placement optimization engine
- ostro-listener: a message bus listener used in conjunction with Ostro and Music
Additional documents:
- OpenStack Heat Resource Plugins: Heat resources
- Placement API: API requests/responses
- Using Postman with valet-api: Postman support
License:
Valet is distributed under the terms of the Apache License, Version 2.0. The full terms and conditions of this license are detailed in the LICENSE file.