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
These problems were introduced in https://review.openstack.org/2918
* nova-manage needs the change from local_gb to root_gb/ephemeral_gb.
* fixes 'nova-manage flavor ...'
* fixes 'nova-manage service describe_resource ...'
Change-Id: I63040359a425aac3ef7a0a84e6834b1dfe3a8790
* Adds new worker for cert management
* Makes decrypt use an rpc to the worker
* Moves CA filesystem creation out of cloud.setup
* Moves test for X509 into crypto
* Adds test for encrypting and decrypting using cert
* Cleans up extra code in cloudpipe
* Fixes bug 918563
* Prepares for a future patch that will fix bug 903345
Change-Id: I4693c50c8f432706f97395af39e736f49d60e719
Change nova-manage network modify --network to --fixed_range, to match
nova-manage network delete.
Also document both.
Change-Id: I3c03a33e9e3576393252d771eb4ce3353a7f2eaa
Updates the nova-manage to use db.instance_get_all for instance
information instead of relying on Sqlalchemy model relationships
(which no longer exist due to network refactorings).
This commit fixes 'nova-manage fixed list' so that it correctly
displays hostname, and host. I dropped the MAC address column
which would have required an extra VIF's table lookup and
wasn't used as much.
Fixes LP Bug #920159.
Change-Id: I3cec690c5e40631e0f10b2a914f46863601a1734
Fix environment passing in DnsmasqFilter so that dnsmasq can
be run as root through nova-rootwrap. Fixes bug 919275.
Change-Id: I2e78d92b9af4ddea9c0f1c5ddbe2d55fb672310e
Fixes nova-manage config list to work with the latest flags
implementation in nova Essex. Fixes LP bug #920157.
Change-Id: I3321dc68e4a571354d62836b39f887b0fc2e9877
* 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
* Moves openstack/v2 directory to compute and fixes tests accordingly
* Moves some code from api/openstack/compute to shared location, for use by volume api
* Implements basic volume functionality for types, volumes, and snapshots
* Changes service name from osapi to osapi_compute (and adds osapi_volume)
* Renames nova-api-os to nova-api-os-compute, adds nove-api-os-volume
* Separate extension mechanism for compute and volume
** Removes flag osapi_extension and replaces with osapi_compute_extension and osapi_volume_extension
* Updates the paste config
* Fixes setup.py to include nova-os-api-compute and nova-os-api-volume
* Fix bug in volume version code that occurred as result of trunk merge
* Update integrated/test_volumes.py to use new endpoint
Change-Id: I4c2e57c3cafd4e1a9e2ff3ce201c8cf28326afcd
Fix based on revewer's comment
upgraded the migration version
nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py
rebase on master
Change-Id: Ia762f8dec761c3d595bc6fcd39f127f6d92306d2
* Add pool, interface to 'floating list' output
These columns were added to the floating_ips table in
https://review.openstack.org/2892 and are not visible elsewhere
* Fix 'floating delete' to skip network/broadcast addresses
Makes the delete command match the create command behaviour
introduced in https://review.openstack.org/2663
* Address changes listed in bug 817281
Change host column in output to project ID, change hostname
column to uuid
Change-Id: Ibbfbe9ed5543927a6b2a1e676f5617901a32f897
* Implements blueprint multiple-floating-ip-ranges
* Adds pool and interface fields to floating ip tables
* Adds extension to get a list of available pools
* Optionally allows a pool to be specified when allocating
* Changes nova-manage command to allow pool and interface
* Ip binding uses the interface from table instead of flag
* Adds default pool flag to use when pool is not specified
* updates test to work with new fields
* adds tests for extension
Change-Id: Ieb4cbbf07b211697d08178b1cf2252caf75049a2
Fixes bug #910295
The None, True, and False values are singletons.
All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.
"== None", "== True", "== False", and "!= None" comparisons in sqlalchemy's
where(), or_(), filter(), and_(), and select() functions should not be changed.
Incorrect comparisons or evaluations in comments were not changed.
Change-Id: I087f0883bf115b5fe714ccfda86a794b9b2a87f7
Fixes bug #910763
According to PEP8,
- Object type comparisons should always use isinstance() instead
of comparing types directly.
Yes: if isinstance(obj, int):
No: if type(obj) is type(1):
When checking if an object is a string, keep in mind that it might be a
unicode string too! In Python 2.3, str and unicode have a common base
class, basestring, so you can do:
if isinstance(obj, basestring):
Change-Id: I7c0fdecf99872f5b8f72b2c2ed4f5c539c33def1
Some flags seem not used anymore, whereas some are not correctly declared
and would fail.
Change-Id: I8fd0ad949fd9a4b932e8e31d28e6e9dc5426bb28
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
Fixes bug #900564
Changes `Context`.`read_deleted` from a bool to an enum string with values
"yes" (can read deleted records), "no" (cannot read deleted records), and
"only" (can only see deleted records, for backwards compatibility).
Change-Id: Ic81db3664c33f23f751b73973782efb06fce90d9
Alternative to using a sudoers file to limit which commands can be run as
root in Nova. This one makes use of command filters defined in Nova code
itself, which can be customized to deeply inspect command arguments before
allowing a command to be executed.
This change puts the infrastructure in place, together with command filters
that replicate the level of filtering provided by a sudoers file (no deep
argument inspection yet). An example of an advanced filter (RegExpFilter) is
also provided. This new root wrapper is not active by default (root_helper
still defaults to "sudo"). Implements blueprint nova-rootwrap.
Change-Id: I7ad723b55e9446758876f21b4fbb09374a910425
Swap the URLError and HTTPError exception handlers. HTTPError is a subclass
of URLError, so the HTTPError handler wasn't being reached.
Change-Id: Iec86d2b345dbd37858af888bbd54a74884025eda
part 1 of blueprint separate-nova-metadata
* adds api/metadata/ and moves code from ec2
* moves metadata into separate binary
* changes metadata forward to use metadata host and port
* moves the metadata accept rule to the metadata api
* adds nova-api-* to setup.py
Change-Id: I7f5d8e6cafc55b5c383cd88991f29c6059fb8d82
This indicates the failure to the user through the exit status.
Original author: Renuka Apte <renuka.apte@citrix.com>
Change-Id: I73fc2cc35530e7ee7f113f5aaec7b577663e4dc1
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
With melange it will be possible to have overlapping cidrs so it would be
better to specify the uuid of the network to delete.
Change-Id: I6781225d587952cbab3387cd40164d8ac77c58d6
Add in a log report to nova-manage
Usages:
Get the last errors in the nova logs
nova-manage logs errors
Get the last x nova messages in the syslog. The default is 10
nova-manage logs syslog <x>
Change-Id: Id5d3a546051e25175b6523711f437618d07c3f19
nova-ajax-console-proxy is overriding the logging configuration carefully
set up by nova.log. There's no reason for it to do this, and it's the only
script in nova/bin that does. I've removed that code.
Change-Id: I5b2d5026d529a20d26ba3bb721b15f235f6fdda8