Commit Graph

44999 Commits

Author SHA1 Message Date
Jenkins 5dad7eaef7 Merge "doc: update the man page entry for nova-manage db sync" 2017-02-02 09:52:37 +00:00
Jenkins 0a45b739e0 Merge "doc: refer to the cell_v2 man pages from the cells v2 doc" 2017-02-02 09:52:03 +00:00
Jenkins 1847c81440 Merge "doc: add some detail to the map_cell0 man page" 2017-02-02 09:48:25 +00:00
Jenkins 1d3ba1beda Merge "Fix tag attribute disappearing in 2.33 and 2.37" 2017-02-02 03:35:05 +00:00
Jenkins 89c1c6ff61 Merge "Allow scheduler to run cell host discovery periodically" 2017-02-02 03:33:20 +00:00
Jenkins 32a2f51b08 Merge "reno for notification-transformation-ocata" 2017-02-02 01:34:55 +00:00
Jenkins 6bb8a8edd6 Merge "Remove pre-cellsv2 short circuit in instance get" 2017-02-02 01:34:22 +00:00
Jenkins 68e79d304c Merge "placement-api: fix ResourceProviderList query" 2017-02-02 00:06:22 +00:00
Jenkins cbc84b3cff Merge "Continue processing build requests even if one is gone already" 2017-02-01 23:38:40 +00:00
Balazs Gibizer 4f05f06add reno for notification-transformation-ocata
Change-Id: I93d6681ead0d0034caec45ad6dbb52ea88b6f9d7
2017-02-01 21:11:00 +00:00
Dan Smith 9eb7bcea05 Allow scheduler to run cell host discovery periodically
Since cellsv2 has required host mappings to be present, we have lost
our automatic host registration behavior. This is a conscious choice,
given that we do not want to have upcalls from the cells to the API
database. This adds a periodic task to have the scheduler do the
discovery routine, which for small deployments may be an acceptable
amount of background overhead in exchange for the automatic behavior.

There is also probably some amount of performance improvement that
can be added to the host discovery routine to make it less of an
issue. However, just generalizing the existing routine and letting
it run periodically gives us some coverage, given where we are in
the current cycle.

Related to blueprint cells-scheduler-integration

Change-Id: Iab5f172cdef35645bae56b9b384e032f3160e826
2017-02-01 12:22:23 -08:00
Matt Riedemann a8aa093925 doc: update the man page entry for nova-manage db sync
The docs for this command were woefully out of date. This
change clarifies the wording since we're really upgrading
the schema in the database, not "synchronizing" it even
though that's the name of the command - the migration scripts
run the 'upgrade' method only. Also, it was saying this was
how you created the main database, which is totally wrong
since this command doesn't create the database. The deployer
creates the database, this command migrates the schema on that
database.

Then I also added the arguments along with a description of each
and noted that this will by default upgrade the cell0 schema.

Change-Id: I3d40cb32c325bc3f665e727b921082efba043192
2017-02-01 15:09:55 -05:00
Matt Riedemann a3563ed37e doc: refer to the cell_v2 man pages from the cells v2 doc
This is just a simple change that provides a references section
for setting up cells v2 and points to the nova-manage cell_v2
man pages.

Change-Id: I94d3de97f4ff2120e250ac40ac82c31372d90a2b
2017-02-01 15:09:50 -05:00
Matt Riedemann 9ca2a51ec4 doc: add some detail to the map_cell0 man page
There are two changes here:

1. Removes the mention of the message queue since the cell0
   mapping has a transport_url but it's effectively none meaning
   we don't use RPC for accessing cell0 objects.
2. Adds boilerplate wording on the config option used to determine
   the database connection if the --database_connection argument
   is not specified. This was particularly confusing at one point
   because it originally started out as the CONF.api_database.connection
   but we changed that mid-cycle in Ocata since the schema for cell0
   is the cell (nova) DB, not the nova_api DB.

Change-Id: Ie869f8565460600da767d99e9e397abc5e8bf0e0
2017-02-01 15:07:18 -05:00
Dan Smith 466769e588 Remove pre-cellsv2 short circuit in instance get
This removes a couple short circuits around instance cell mapping,
which were in place for pre-cellsv2 code. Now, they defeat some of
our atomic logic around what should be done in and around deletes.
These were TODOs to remove once people had to be on cellsv2, which
is now the case.

Note that the api samples tests were depending on these in order to
work at all (which is a good demonstration of why they need to
be removed). This patch also extends the SingleCellSimple fixture
with a couple more mocks to make them happily take the same path
as the rest of the code. Since the default in that fixture is
now to make instances look mapped all the time, we also need a flag
so the tests that check for yet-to-be-mapped instances can still
function.

Related-Bug: #1660878
Change-Id: I7eb4b41fd2f33e8a63e329adbafc47d149e31552
2017-02-01 11:25:18 -08:00
Jenkins 039a917ed7 Merge "Ignore IOError when creating 'console.log'" 2017-02-01 18:04:00 +00:00
Matt Riedemann f09d11269a Continue processing build requests even if one is gone already
There was a very subtle yet busted 'return' statement in the
except block when cleaning up an instance in the case that the
build request was already deleted. This return statement would
short-circuit the for loop it's in such that no other build
requests in the loop would get processed (so those instances
wouldn't get built).

This was probably missed because of how large the method is so
that when you're looking at that cleanup code, it's easy to miss
that you're in a for loop.

This change moves the build request cleanup block into a private
method so it's more self-contained, and fixes the issue with the
return statement by changing it to a 'continue' statement.

An existing test that deals with multiple instances already is
updated to show the bug and the fix (and also cleaned up a bit
in the process to avoid lots of copy/paste).

Change-Id: I399023ea705c514c33d07cc3613d79744cbf7a07
Closes-Bug: #1661024
2017-02-01 13:02:45 -05:00
Jenkins 82c315208e Merge "libvirt: fix nova can't delete the instance with nvram" 2017-02-01 16:36:10 +00:00
Jenkins d308d1f70e Merge "Remove mox in libvirt destory tests" 2017-02-01 15:26:00 +00:00
Mehdi Abaakouk 03eced19f5 placement-api: fix ResourceProviderList query
The ResourceProviderList query use groupby without all grouped columns.
This works on mysql with unpredicable result, but don't for other RDBMS.

For example, postgresql gating jobs dsvm that use nova are currently
broken.

This change removes the unused consumer_id on first query,
and uses the primary key 'id' instead of 'uuid' the second groupby.
(Because groupby in postgresql requires a PK or all non-primary columns)

The fix is tested by gate-ceilometer-dsvm-tempest-plugin-postgresql-ubuntu-xenial job
here: https://review.openstack.org/#/c/427668/

closes-bug: #1660959
Change-Id: I6cc93ba0dd569d56696c9210d38dd2d77b4157c1
2017-02-01 14:56:33 +01:00
Jenkins 8c820b8b85 Merge "Fix map_cell_and_hosts help" 2017-02-01 13:55:18 +00:00
Jenkins 35e4b149b6 Merge "Read instances from API cell for cells v1" 2017-02-01 08:21:40 +00:00
Jenkins 918d1b85fc Merge "Fresh resource provider in RT must have generation 0" 2017-02-01 02:43:08 +00:00
Jenkins 1129a9ff47 Merge "Scheduler calling the Placement API" 2017-01-31 21:18:47 +00:00
Jenkins 7767bbd35a Merge "Add 'disabled' to WatchdogAction field" 2017-01-31 21:14:03 +00:00
melanie witt 826df45a40 Read instances from API cell for cells v1
Recent work on cells v2 has us reading instances from compute cells
via target_cell, but that breaks the existing behavior of cells v1
because of the syncing between API cell and compute cells. When
state changes are effected in the API cell, there is a slight delay
before they are reflected in the compute cell. So, reading from the
compute cell instead of the API cell results in behavior changes.

This adds a conditional in compute/api get_all to read instances
from the API cell if cells v1 is enabled. We are already doing this
for compute/api get, and get_all was missed.

Closes-Bug: #1660747

Change-Id: I7df5c4616ef386216c7bd7efea2be68173c61be0
2017-01-31 20:50:43 +00:00
Jenkins 63d2e4a4c9 Merge "Block starting compute unless placement conf is provided" 2017-01-31 20:43:44 +00:00
Jenkins b83ac21b57 Merge "libvirt: make coherent logs when reboot success" 2017-01-31 20:42:44 +00:00
Jenkins f811384cb2 Merge "Pre-load info_cache when handling external events and handle NotFound" 2017-01-31 20:42:13 +00:00
Jenkins 727375d5d4 Merge "Trivial-fix: replace "json" with "yaml" in policy README" 2017-01-31 19:10:46 +00:00
Jenkins 8c0b832dc4 Merge "ironic: Add trigger crash dump support to ironic driver" 2017-01-31 19:10:18 +00:00
Jenkins 380313b0d4 Merge "nova-manage docs: cell_v2 delete_cell" 2017-01-31 19:02:04 +00:00
Jenkins 233c390d7b Merge "nova-manage docs: cell_v2 list_cells" 2017-01-31 19:01:29 +00:00
Jenkins 61fb9c1957 Merge "nova-manage docs: cell_v2 discover_hosts" 2017-01-31 19:00:57 +00:00
Jenkins d273b6cecc Merge "nova-manage docs: cell_v2 create_cell" 2017-01-31 19:00:30 +00:00
Jenkins 55c669bda3 Merge "nova-manage docs: cell_v2 verify_instance" 2017-01-31 19:00:03 +00:00
Jenkins 6823e47f58 Merge "nova-manage docs: cell_v2 map_cell_and_hosts" 2017-01-31 18:59:35 +00:00
Jenkins c1a249efed Merge "Fix root_device_name for Xen" 2017-01-31 18:56:46 +00:00
Diana Clarke 193b584207 Fix map_cell_and_hosts help
The help message for the --verbose option claims map_cell_and_hosts
both returns and prints the cell uuid, when really it just prints
the cell uuid and returns 0 on success.

Change-Id: Ia14f2250fedf0bd6456b0088b962460b999b9f8d
2017-01-31 12:25:41 -05:00
Chris Dent 29f3d8bae2 Fresh resource provider in RT must have generation 0
When the resource tracker creates a new resource provider it sets
the generation to 1. This is wrong, because on the server side the
default value for a generation, and thus the generation for a new
provider is 0. This fixes that situation and thus avoids causing the
first inventory write operation from the resource tracker to the
placement API being a 409 conflict.

Change-Id: Iaa9e786f33049799678f21b5dfaac417c6601ac8
Closes-Bug: #1660682
2017-01-31 17:25:11 +00:00
Stephen Finucane 1848860fd4 Ignore IOError when creating 'console.log'
In 'd4e6bd8', and later refined in 'ec6ed24c', an issue with the the
Quobyte CI was resolved by ensuring that the 'console.log' file is
always created, even when libvirt's 'dynamic_ownership' config option
is set to '0'. However, attempting to take ownership of this file can
cause issues when 'dynamic_ownership' is set to '1' and a user attempts
to reschedule an instance to a host where it was previously located. In
this case, the permissions on the file have already been co-opted by
libvirt, and attempting to change them results in an IOError.

The easiest fix for this is to simply ignore the IOError, as the file
already exists and libvirt has set correct permissions already. This is
what do here. A longer term fix would be to avoid changing the
permissions only for the offending Quobytes block devices, but this is
likely not backportable and will be done in a follow-up fix.

Change-Id: I353afd57be207330757580447a1b606c7b9b7c09
Partial-bug: #1634282
Related-bug: #1597644
Related-bug: #1609298
2017-01-31 11:23:54 +00:00
Diana Clarke dec7505935 nova-manage docs: cell_v2 delete_cell
Document the `nova-manage cell_v2 delete_cell` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: I280b87ad38feeaa68728f51c78b1c6a0dc895ca7
2017-01-30 20:49:05 -05:00
Diana Clarke 218d26c5bc nova-manage docs: cell_v2 list_cells
Document the `nova-manage cell_v2 list_cells` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: I0cd0c3d8c6cd0229a62b3eaf18679d4931c6e4eb
2017-01-30 20:49:05 -05:00
Diana Clarke fb7599db49 nova-manage docs: cell_v2 discover_hosts
Document the `nova-manage cell_v2 discover_hosts` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: I7ce9a93384741e42f409324cf0ee3cb1fc4c6a67
2017-01-30 20:49:05 -05:00
Diana Clarke 94687a9074 nova-manage docs: cell_v2 create_cell
Document the `nova-manage cell_v2 create_cell` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: Ic9ddef319aaf8a377d733633cc279a0fc1558cb2
2017-01-30 20:48:57 -05:00
Diana Clarke 4d5998f09a nova-manage docs: cell_v2 verify_instance
Document the `nova-manage cell_v2 verify_instance` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: Id243299bdf0f115e86200cee38634791ea359b2a
2017-01-30 20:48:57 -05:00
Diana Clarke 42b7df072a nova-manage docs: cell_v2 map_cell_and_hosts
Document the `nova-manage cell_v2 map_cell_and_hosts` command.

This is part of a series to document the nova-manage cells
commands.

Change-Id: I4ed1e77f100e9d90d6a1ebd5e20bdd1f1ff5ce6e
2017-01-30 20:48:50 -05:00
Artom Lifshitz e80e2511cf Fix tag attribute disappearing in 2.33 and 2.37
In the context of device tagging, bugs have caused the tag attribute
to disappear starting with version 2.33 for block_devices and starting
with version 2.37 for network interfaces. In other words, block
devices could only be tagged in 2.32 and network interfaces between
2.32 and 2.36 inclusively.

This patch documents this behaviour in api-ref and introduces
microversion 2.42, which re-adds the tag in all the right places.

Change-Id: Ia0869dc6f7f5bd347ccbd0930d1d668d37695a22
Closes-bug: 1658571
Implements: blueprint fix-tag-attribute-disappearing
2017-01-30 19:38:46 -05:00
Jenkins dae6b760b9 Merge "libvirt: Use the mirror element to detect job completion" 2017-01-31 00:23:39 +00:00
Jenkins 91b4a56bc5 Merge "libvirt: Mock is_job_complete in test_driver" 2017-01-30 21:48:00 +00:00