summaryrefslogtreecommitdiffstats
path: root/nova/consoleauth
Commit message (Collapse)AuthorAgeFilesLines
* Add rpc client side version control.Russell Bryant2013-06-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at client side version control for rpc. It allows you to configure a max version of messages that clients are allowed to send. You can find one example of how clients need to adapt in the conductor rpcapi. All other changes in rpc apis since the grizzly release are not applicable to this. Some future improvements to this could be reporting the versions supported by running services and having that be discoverable via the API. We could also consider allow setting these client side version caps via the API. For now, recommended values for these config options while attempting a rolling upgrade will just have to be documented. The config options allow specifying specific rpc api version numbers if desired, but an alias of 'grizzly' is also supported. So typically at the start of a rolling upgrade you'd have: [upgrade_levels] compute=grizzly conductor=grizzly scheduler=grizzly ... etc ... And as you update all instances of a service, you would remove that bit from your configuration across the deployment using your config management system of choice. DocImpact Implements blueprint rpc-version-control. Change-Id: I2c0fd6dd7484c87823846d7c31d6525d93cd1b43
* Fix bug where consoleauth depended on remote conductor serviceSam Morrison2013-05-311-2/+2
| | | | | | | | Fixes bug 1186123 Conductor API was being imported directly so ignoring use_local FLAG Change-Id: I055a5301d4c18d201d67f114047f503114751603
* Merge "Move get_backdoor_port to base rpc API."Jenkins2013-04-252-4/+2
|\
| * Move get_backdoor_port to base rpc API.Russell Bryant2013-04-242-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Each service implemented the get_backdoor_port method individually. This patch moves the implementation of this method to the base rpc API instead, and removes the now unnecessary code from each of the services. The server side method was left on all of the managers for rpc backwards copmatibility. They can be removed on the next major rpc version bump of those APIs. Part of blueprint base-rpc-api. Change-Id: Ia8838fafd80eb86a1c2d66f5e97370042d8d8c53
* | Merge "Add an rpc API common to all services."Jenkins2013-04-251-1/+2
|\|
| * Add an rpc API common to all services.Russell Bryant2013-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an rpc API that is exposed by all services. The methods in this API exist in their own namespace and are versioned independently of the main API for the service. The first method for this API is a simple ping() method. This method exists in the conductor rpc API already, and could be more generally useful. Other methods will be added in later patches. The base rpc API will be exposed from all services automatically unless they override the create_rpc_dispatcher method in the base manager class. All services need to pass a service_name into the base manager constructor. Some services already did this, but now it's needed for all of them. Implements blueprint base-rpc-api. Change-Id: I02ab1970578bc53ba26461b533d06d1055c2d88e
* | Encode consoleauth token in utf-8 to make it a strSam Morrison2013-04-091-1/+1
|/ | | | | | | | | | | This is needed for memcached backend, because the key cannot be a unicode object in any of the exposed functions. Fixes bug 1164784 Co-authored-by: Stanislaw Pitucha <stanislaw.pitucha@hp.com> Change-Id: Ieb1429116d96eefe97564fe92631063dc16117cb
* Fix console support with cellsChris Behrens2013-03-192-3/+14
| | | | | | | | | | | | | | | | | | | | | | The (relatively recent) security fixes for consoleauth do not work with cells because consoleauth and the compute manager for the instance talk to different rabbit servers. consoleauth is in the API cell and the compute manager is in a child cell. This patch adds code to proxy the following via cells: 1) compute -> consoleauth's delete_tokens_for_instance() 2) consoleauth -> compute's validate_console_port() Also: On instance deletion when the compute manager tells consoleauth to delete tokens for the instance, it's not necessary to do an rpc.call and block. The only purpose it could serve would be log a traceback on failure on the compute manager side, but that seems unnecessary. There's no return value. This patch changes it to an rpc.cast instead. Fixes bug 1154755 Change-Id: Ic763f2a5c0dcff7b7ccfac5927680e7881605f61
* Switch to using memorycache from oslo.Vishvananda Ishaya2013-03-011-1/+1
| | | | Change-Id: I11ee70b36f06bc4a45b5ff207e53a331891a6bfa
* Update OpenStack LLC to FoundationKurt Taylor2013-02-262-2/+2
| | | | | | Update all references of "LLC" to "Foundation". Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
* Flush tokens on instance deleteJohn Herndon2013-02-212-5/+54
| | | | | | | | | | | | | | | | | Force console auth service to flush all tokens associated with an instance when it is deleted. This will fix bug 1125378, where the console for the wrong instance can be connected to via the console if the correct circumstances occur. This change also adds a call to validate the token when it is used. This check will ensure that all tokens are valid for their target instances. Tokens can become scrambled when a compute node is restarted, because the virt driver may not assign ports in the same way. Change-Id: I0d83ec6c4dbfef1af912a200ee15f8052f72da96 fixes: bug 1125378
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-193-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Move memcached_servers opt into common.memorycacheMark McLoughlin2013-01-091-8/+2
| | | | | | | | | | Add a factory function to nova.common.memorycache which consolidates the code to choose between real or fake memcache. This then means that memcached_servers is used in just one place and we can move the config option there. blueprint: scope-config-opts Change-Id: I67c191e0db58364eda4162b9e881606063509b9d
* Add get_backdoor_port to consoleauth.Matthew Treinish2012-12-192-1/+9
| | | | | | | | This adds a get_backdoor_port function to the consoleauth service which enables returning the eventlet_backdoor port from rpc for the service. Change-Id: I7da9cbc8111342b5f49f148a8e3389faf5c4f2ab
* Encode consoleauth token in utf-8 to make it a strEugene Kirpichov2012-11-231-2/+2
| | | | | | Fix for lp:1057279. Change-Id: I9da0fd42e919aca0075613c4930ebfc3cf425349
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-1/+1
| | | | | | | | | | | | | The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
* Remove nova.config.CONFMark McLoughlin2012-11-203-5/+4
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-173-3/+0
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
* Switch from FLAGS to CONF in misc modulesMark McLoughlin2012-11-043-10/+12
| | | | | | | | | | | Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
* fix rpcapi version.Russell Bryant2012-09-111-0/+8
| | | | | | | | | | | | In commit ce4dbbd7, the BASE_RPC_API_VERSION was changed to '2.1' in nova.compute.rpcapi. This should remain '2.0' until the API goes to 3.X. Only specify version '2.1' for the method that requires it (rebuild_instance). Add a NOTE above each instance of BASE_RPC_API_VERSION to try to help clarify this for the future. Change-Id: I06cef44c905e8966505d5fb5b1046d6a0c75d533
* Change base rpc version to 1.0 in compute rpcapi.Russell Bryant2012-07-121-3/+4
| | | | | | | | | | | | | | | | | | | A recent patch change the RPC_API_VERSION in compute/rpcapi.py to 1.1. This change was the right thing to do in compute/manager.py, but not compute/rpcapi.py. This patch changes it back to 1.0, and changes the code to only specify that 1.1 is required for the new method. This version in the rpcapi modules is used as the default version to set in a message. The version sent in a message is the minimum version required to be implemented on the manager side for the message to be successfully processed. For most messages, that is just 1.0. In the case of the new method, it's 1.1. This patch also changes the name of his variable in the rpcapi modules from RPC_API_VERSION to BASE_RPC_API_VERSION to help clarify this a bit more. Change-Id: I2bb4602845869bd44b39531eeb4f1e7c0c4c20c2
* Switch to common logging.Andrew Bogott2012-07-021-1/+1
| | | | | | I only just moved logging from nova to common, so behavior should remain the same. Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
* Fix several PEP-8 issuesSascha Peilicke2012-06-261-1/+1
| | | | | | As found by pep8 version 1.2. Change-Id: I5d40294416db0410fa7d9c82ea8efe8efadd0f58
* Use rpc from openstack-common.Russell Bryant2012-06-201-2/+2
| | | | | | | | Final patch for blueprint common-rpc. This patch removes nova.rpc in favor of the copy in openstack-common. Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd
* Use memcache to store consoleauth tokensAnthony Young2012-05-211-22/+18
| | | | | | | | | * Rather than store tokens in a dict, use memorycache so that deployers can optionally use memcached if they would like to run multile nova-consoleauth processes * Fixes bug 989337 Change-Id: I96ec4d796e53b69a494d856269e3c4e8f9b3d222
* Add version to consoleauth rpc API.Russell Bryant2012-05-172-0/+55
| | | | | | Part of blueprint versioned-rpc-apis. Change-Id: I9682bdbd06d744141b94385992b37cd2e55b8f5e
* pylint cleanupJoe Gordon2012-05-071-2/+0
| | | | | | Mostly remove unused imports Change-Id: Icdb3ec77537b2568f4e85843bab89eb63cd17d8e
* Fix OpenStack CapitalizationJoe Gordon2012-03-152-2/+2
| | | | | | | Openstack => OpenStack for nova/*py Change-Id: Ibcfae4776422a515a109e59510fc84f8b63c00b9
* Standardize logging delaration and useJason Kölker2012-02-141-1/+1
| | | | | | * Make modules use getLogger(__name__) and log to the result Change-Id: Ib6d69b4be140ec89affc86ed11e65e422d551df1
* Remove the last of the gflags shim layerMark McLoughlin2012-02-102-2/+2
| | | | | | | Make FLAGS a ConfigOpts instance and fix up all the places where we expected FlagValues behaviour. Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
* Backslash continuations (misc.)Zhongyue Luo2012-02-081-4/+3
| | | | | | | | | | | Fixes bug #925166 This patch for packages which have few backslash continuations. Follow up patches will be for packages network, scheduler, virt, db/sqlalchemy, tests, and api/openstack. Change-Id: I4200010b47b33fa8b9115b5d379b543200f6668d
* Move cfg to nova.openstack.commonMark McLoughlin2012-02-032-2/+2
| | | | | | | | | | | | | | | Move it here so that it can be kept in sync with openstack-common using the new update.py script for code in openstack-common's incubation area. See here for more details: http://wiki.openstack.org/CommonLibrary#Incubation Note: this commit just moves the existing code in Nova with no other changes. A subsequent commit will sync it with latest openstack-common so that it is easier see the new changes. Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
* Refactor away the flags.DEFINE_* helpersMark McLoughlin2012-01-282-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The next obvious step in porting to cfg is to define all options using cfg schemas directly rather than using the flags.DEFINE_* helpers. This is a large change, but it is almost entirely pure refactoring and does not result in any functional changes. The only change to note is that the default values for glance_host, glance_api_servers and default_publisher_id options are now using opt value interpolation i.e. -glance_host=_get_my_ip() +glance_host='$my_ip' -glance_api_servers=['%s:%d' % (FLAGS.glance_host, FLAGS.glance_port)] +glance_api_servers=['$glance_host:$glance_port'] -default_publisher_id=FLAGS.host +default_publisher_id='$host' Also note that the lower_bound check on the {report,periodic}_interval options are no more, but this has been true since cfg was first added. Change-Id: Ia58c8f0aaf61628bb55b1b8485118a2a9852ed17
* Implements blueprint vnc-console-cleanupAnthony Young2012-01-172-0/+100
* Creates a unified way to access vnc consoles for xenserver and libvirt * Now supports both java and websocket clients * Removes nova-vncproxy - a replacement version of this (nova-novncproxy) can be found as described in vncconsole.rst * Adds nova-xvpvncproxy, which supports a java vnc client * Adds api extension to access java and novnc access_urls * Fixes proxy server to close/shutdown sockets more cleanly * Address style feedback * Use new-style extension format * Fix setup.py * utils.gen_uuid must be wrapped like str(utils.gen_uuid()) or it can't be serialized Change-Id: I5e42e2f160e8e3476269bd64b0e8aa77e66c918c