summaryrefslogtreecommitdiffstats
path: root/bin/nova-dhcpbridge
Commit message (Collapse)AuthorAgeFilesLines
* Delete unused bin directoryJoe Gordon2013-06-031-22/+0
| | | | | | | | | | | | Delete last bits of bin/. With the move to entrypoints these aren't needed anymore. Update CONF.bindir to default to os.path.join(sys.prefix, 'local', 'bin') Part of blueprint entrypoints-plugins Change-Id: I95250d3779433e7b85aaa889a873b16c86a7d2be
* Move console scripts to entrypoints.Monty Taylor2013-04-041-145/+14
| | | | | | | | | | | | As part of the move of plugins to entrypoints, take advantage of the entrypoints based console scripts, which will make our command line scripts available for unittesting. Part of blueprint entrypoints-plugins Co-authored-by: Michael Still <mikal@stillhq.com> Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
* Change nova-dhcpbridge FLAGFILE to a list of filesBrent Eagles2013-02-241-1/+3
| | | | | | | | | | | | | | | | | | | This patch adds support to linux_net and nova-dhcpbridge for specifying and conveying multiple dhcpbridge_flagfile values. The support is implemented as follows: dhcpbridge_flagfile is now a "MultiStr" configuration file option allowing the flag files to be defined over multiple configuration files. The configured files are concatenated into a comma separated string and assigned to the FLAGFILE environment variable when invoking nova-dhcpbridge. nova-dhcpbridge splits the value of the environment variable on the comma an initializes its configuration with the provided files (the configuration system already supports loading configuration from multiple files) Fixes bug 1131932 Change-Id: Ic9cc57b8f7d9356606b9134ef5b63ab07b6099d9
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* maint: remove unused imports from bin/nova-*Pádraig Brady2013-02-071-2/+0
| | | | Change-Id: I80b58ac41bbb0517221d5fd5ba9938f2b7836779
* Support optional 4 arg for nova-dhcpbridgeChet Burgess2013-01-241-0/+5
| | | | | | | | | | | | dnsmasq will call the add, old, and del actions with an optional 4 argument of hostname if the hostname is known. Since we populate the hostname in the DHCP host file its always passed to us. Add an optional 4 argument for hostname for the add, old, and del actions. Change-Id: I1a6c095324be2424d6c1d469877b254f88fba4aa Fixes: bug #1103783
* Fix typos in docstringChangbin Liu2013-01-141-1/+1
| | | | | | | | * code in bin/ * code in nova/api/ Change-Id: Ic643d640b66785d4bb54defcddc3d2312292bfdf
* Move global service networking opts to new moduleMark McLoughlin2013-01-091-1/+1
| | | | | | | | | | | The my_ip, host and use_ipv6 options are used all over the codebase and they're pretty well related to each other. Create a new netconf module for them to live in. There are now no options registered globally in nova.config! blueprint: scope-config-opts Change-Id: Ifde37839ae6f38e6bf99dff1e80b8e25fd68ed25
* Move manager options into nova.serviceMark McLoughlin2013-01-091-1/+1
| | | | | | | | | | | | Move the compute_manager, console_manager, cert_manager, network_manager and scheduler_manager options into nova.service. Apart from the tests, these options are mostly just used in nova.service so it makes sense for them to live there. Also, metadata_manager already lives there. blueprint: scope-config-opts Change-Id: I180859817b57c081b83d6a6f075a6ff76bb0ef6d
* Merge "Port to argparse based cfg"Jenkins2012-12-121-9/+25
|\
| * Port to argparse based cfgMark McLoughlin2012-12-111-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import latest cfg from oslo-incubator with these changes: Add deprecated --logdir common opt Add deprecated --logfile common opt. Allow nova and others to override some logging defaults Fixing the trim for ListOp when reading from config file Fix set_default() with boolean CLI options Improve cfg's argparse sub-parsers support Hide the GroupAttr conf and group attributes Fix regression with cfg CLI arguments Fix broken --help with CommonConfigOpts Fix ListOpt to trim whitespace updating sphinx documentation Don't reference argparse._StoreAction Fix minor coding style issue Remove ConfigCliParser class Add support for positional arguments Use stock argparse behaviour for optional args Use stock argparse --usage behaviour Use stock argparse --version behaviour Remove add_option() method Completely remove cfg's disable_interspersed_args() argparse support for cfg The main cfg API change is that CONF() no longer returns the un-parsed CLI arguments. To handle these args, you need to use the support for positional arguments or sub-parsers. Switching nova-manage to use sub-parser based CLI arguments means the following changes in behaviour: - no more lazy matching of commands - e.g. 'nova-manage proj q' will no longer work. If we find out about common abbreviations used in peoples' scripts, we can easily add those. - the help output displayed if you run nova-manage without any args (or just a category) has changed - 'nova-manage version list' is no longer equivalent to 'nova-manage version' Change-Id: I19ef3a1c00e97af64d199e27cb1cdc5c63b46a82
* | Use fixtures library for nova test fixtures.Monty Taylor2012-12-071-1/+1
|/ | | | | | | | | | Moving the test-case setup and teardown code into managed fixtures so that we can better interact with them when we start running things in parallel. Part of blueprint grizzly-testtools Change-Id: I406be0a88b14c0dba2d22b4957e26a53442bbae3
* Make nova-dhcpbridge use CONFIG_FILE over FLAGFILEMark McLoughlin2012-11-261-2/+5
| | | | | | | | | | | | | | | nova-dhcpbridge's FLAGFILE environment variable is one of the few remaining references we have to "flags". Switching to use a new environment variable is easy, but we need to take care that when you upgrade the code the compute and network services might not be restarted immediately. If this happens, the services may launch a new dnsmasq (so rootwrap needs to continue to support FLAGFILE) or an existing dnsmasq might run the lease script (so the script needs to support FLAGFILE). Change-Id: Ieb55daa2507abb8327c7f5a2ef2f682740f31a5d
* nova-dhcpbridge should require the FLAGFILE is setMark McLoughlin2012-11-231-2/+2
| | | | | | | | | | | | | | We always launch dnsmasq with FLAGFILE set, so something is very broken if FLAGFILE isn't set when nova-dhcpbridge is launched. Also, the fallback to CONF.dhcpbridge_flagfile is a little strange - at this point, we haven't parsed any config files so the only possible value of this config option is its default value. There's no real need to gracefully handle this condition either - a KeyError is a straightforward enough error. Change-Id: I734d7b739f17c8a9ab48d8ba13baacff3f00e1c4
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-0/+2
| | | | | | | | | | | | | 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-201-1/+2
| | | | | | | | | | | | | | | 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.flags imports from bin/*Chris Behrens2012-11-151-1/+0
| | | | | | | | | | nova.flags is no longer needed except to load nova config options shared across multiple daemons. This removes nova.flags from the bin programs and makes sure that nova.flags is imported in nova.config for now. Change-Id: If066ac0070387bee4b41e6a78ad972f7a0955c75
* Fix import ordering in /bin scripts.Dan Prince2012-11-091-1/+1
| | | | | | Fix a couple hacking violations in Nova's bin scripts. Change-Id: I5cab72a5a94f761f429ad45f94a95cd4bc7e30e8
* Switch from FLAGS to CONF in binMark McLoughlin2012-11-041-10/+9
| | | | | | | | | | | 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: Id0c59b2dc8002ec89ccbc5e5d7986fb68d3a693d
* Move parse_args to nova.configMark McLoughlin2012-11-041-1/+2
| | | | | | | The flags module will eventually be removed and this is a first step towards that. Change-Id: I729b08900e53e2ae6db10633dcff3be59720fa6f
* Fix config-file overrides for nova-dhcpbridgeAndrew Laski2012-10-261-1/+1
| | | | | | | | | | | | | | | | nova-dhcpbridge can read in an alternate config file location but wasn't using it to parse config options. This fixes a regression introduced in 00786bc554a2dfacb3c6f02fbb7e9c98f35d4262. This change is motivated by the fact that nova-dhcpbridge is passed to dnsmasq in restart_dhcp() in nova/network/linux_net.py, and there is currently no support for overriding config options for nova-dhcpbridge in that call. There is support for overriding the FLAGFILE env variable in that call, but nova-dhcpbridge was ignoring that. If I start nova-network with an alternate config this provides a way for me to pass that config to nova-dhcpbridge as well. Change-Id: I002ea768500555a089bd1d5b0fea2354b27fba14
* Add version to network rpc API.Russell Bryant2012-10-091-8/+6
| | | | | | | | | | | | | | | | | | | | | This patch adds versioning support for the nova-network rpc API. During Folsom development I added versioning to all rpc APIs with the exception of network and volume. I was holding off on those to see what the fate of that code in nova was going to be for sure. Adding it to the volume API in nova doesn't make much sense at this point (but doing it in Cinder does). Since nova-network is sticking around for a while, it seems worthwhile to add a version number to the API for any future changes while the code is still in the tree. There are plenty of things in this rpc API that could be cleaned up or improved, but I held off on doing any of those things. I would recommend the same for anyone else (unless it's a bug that needs to be fixed). I think any further improvements should be focused on Quantum integration with Nova or Quantum itself. Fixes bug 1060197. Change-Id: I63ce57657388166544202af9c44c2298ae551aea
* Switch to common logging.Andrew Bogott2012-07-021-2/+2
| | | | | | I only just moved logging from nova to common, so behavior should remain the same. Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
* Use rpc from openstack-common.Russell Bryant2012-06-201-1/+1
| | | | | | | | Final patch for blueprint common-rpc. This patch removes nova.rpc in favor of the copy in openstack-common. Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd
* Use openstack.common.cfg.CONF.Russell Bryant2012-06-041-2/+0
| | | | | | | | | | | | Part of blueprint common-rpc. This patch makes the rpc code use the global config object from openstack-common. Based on some recent discussions on the mailing list, this may not be the final way configuration handling is done here, but it is certainly better than the register_opts() hack that is removed by this patch. Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6
* Backslash continuation removal (Nova folsom-2)Zhongyue Luo2012-05-311-4/+4
| | | | | | | | Fixes bug #938588 Backslash continuations removal for scripts in bin/, plugin/, and etc. Change-Id: Idd17048b6e8db6e939946968e011e68da8585b8d
* Use cfg's new global CONF objectMark McLoughlin2012-05-301-2/+1
| | | | | | | | | | Implements blueprint cfg-global-object Replace nova.flags.FLAGS with openstack.common.cfg.CONF. In future, we can do a s/FLAGS/CONF/ across the codebase. Change-Id: Ib293873089a5399febd7a3b0410f66e9bef115f1
* Remove old flagfile support.Ghe Rivero2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | | Implements blueprint remove-old-flagfile nova-manage can still be used to convert old flagfiles style files to new .ini files: $ ./bin/nova-manage config convert --help Usage: nova-manage config convert <args> [options] Options: -h, --help show this help message and exit --infile=<path> old-style flagfile to convert to config --outfile=<path> path for output file. Writes configto stdout if not specified. Change-Id: Ib8fbbd858b1db7faef70d7d97955e5042bf378f2 Signed-off-by: Ghe Rivero <ghe@debian.org>
* Use openstack.common.importutils.Russell Bryant2012-04-281-3/+4
| | | | | | | | | | | | | | Use import_class(), import_object(), and import_module() from openstack-common's importutils module. The equivalent functions have been removed from nova.utils. A few modules had import order cleaned up in passing, as well. My initial motivation for this was to remove some more usage of nova bits from nova.rpc as another step towards being able to move nova.rpc import openstack-common. Since I was pulling importutils into nova, I went ahead and converted the whole thing. Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
* Merge "Refactor nova.rpc config handling."Jenkins2012-04-271-0/+2
|\
| * Refactor nova.rpc config handling.Russell Bryant2012-04-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does a couple of things: 1) Remove the dependency of nova.rpc on nova.flags. This is a step toward decoupling nova.rpc from the rest of nova so that it can be moved to openstack-common. 2) Refactor nova.rpc so that a configuration object is passed around as needed instead of depending on nova.flags.FLAGS. This was done by avoiding changing the nova.rpc API as much as possible so that existing usage of nova.rpc would not have to be touched. So, instead, a config object gets registered, cached, and then passed into the rpc implementations as needed. Getting rid of this global config reference in nova.rpc will require changing the public API and I wanted to avoid doing that until there was a better reason than this. Change-Id: I9a7fa67bd12ced877c83e48e31f5ef7263be6815
* | Imports to human alphabetical orderJoe Gordon2012-04-261-1/+1
|/ | | | | | Problems identified by enabling N306 in run_tests.sh Change-Id: Ifddfe58da020dd041bcbbf5f14941514a09f61c1
* Stop notifications from old leasesVishvananda Ishaya2012-03-191-9/+5
| | | | | | | | * Fixes performance issue with lots of instances * Also removes some commented out code * Fixes bug 959356 Change-Id: I6e4cf3cd6ebe9d5d1ae4fc2472ef1765d13f49f6
* Clear out RPC connection pool before exit.Russell Bryant2012-01-311-0/+3
| | | | | | | | | Fixes bug 767984. This patch ensures that pooled connections to a messaging system get cleaned up before a process that has used the RPC API exits. Change-Id: I56eca54334075378534a7a5d3434c420319672b4
* Remove useless flags declarationJulien Danjou2011-12-151-4/+0
| | | | | Change-Id: I326d0b7a8690dd392d089b792085c38825a55861 Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
* Add DHCP support to the QuantumManager and break apart dhcp/gatewayBrad Hall2011-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new flag "quantum_use_dhcp=<boolean>" which indicates whether or not to enable dhcp for all of the networks. If it is set then we start dnsmasq (and provide it with the IP/MACs from Melange) similar to how this was done in linux_net before. Prior to this if you enabled dhcp then you would also get a gateway device.. some people may not want that so we now require that you specify the gateway when creating the network in order to end up with a device that will act as a gateway. If you're using Melange IPAM and you don't specify the gateway you still end up with one because it doesn't allow you to not have one. This lays the groundwork for the option of not having one in the future, at least :) Also, fix quantum/melange ipam interaction We now query for the subnets by net_id/vif_id instead of searching through all the blocks to find the right one. Both of the allocate and deallocate for instance calls are now using the vif_id -> network_id mapping instead of searching the quantum networks. get_port_by_attachment was also changed to take a net_id so that we don't have to search through all of the quantum networks to find the corresponding port. Change-Id: I6a84da35237b6c5f5cdee91ada92642103439a97
* dhcpbridge: add better error if NETWORK_ID is not set, convert locals() to ↵Dan Wendlandt2011-08-181-2/+10
| | | | static dict
* in dhcpbridge, only grab network id from env if neededDan Wendlandt2011-08-171-4/+2
|
* bug #828429: remove references to interface in nova-dhcpbridgeDan Wendlandt2011-08-171-6/+6
|
* merge trunk, fix conflict frim dprince's branch to remove hostname from ↵Dan Wendlandt2011-08-121-9/+8
|\ | | | | | | bin/nova-dhcpbridge
| * Nuke hostname. We don't use it.Dan Prince2011-08-041-9/+8
| |
* | initial commit of vif-plugging for network-service interfacesDan Wendlandt2011-08-011-12/+12
|/
* filter the dhcp to only respond to requests from this hostVishvananda Ishaya2011-07-051-1/+1
|
* removed unneded mac parameter to lease and release fixed ip functionsTrey Morris2011-06-271-6/+2
|
* make fake_flags set defaults instead of runtime valuestermie2011-05-241-0/+7
|
* Make Dnsmasq_interface configurableJosh Kearney2011-03-291-1/+3
|
* Make "dhcpbridge init" output correctly formatted leases information.Soren Hansen2011-03-071-1/+1
|
* use flags for sqlite db names and fix flags in dhcpbridgeVishvananda Ishaya2011-02-231-12/+1
|
* pretty colors for logs and a few optimizationsVishvananda Ishaya2011-02-211-0/+2
|
* switch to explicit call to logging.setup()Vishvananda Ishaya2011-02-211-1/+2
|