Fix security group race condition while listing and deleting rules

Previously, there was a race condition that could occur if one was listing
a security group which contained a rule which referenced another security
group as an additional api call is used to look up the security group's
name which is returned (rather than id) via the API. The problem occurs if
this security group is deleted in which case a 404 was raised.
This patch fixes this issue by catching the 404 and ignoring the rule as
its already deleted as there is a constraint enforced that you cannot
delete a security group if another security group has a rule that references
that security group.

Change-Id: I3855b8d3a1bd2f7c88901da071f9bd5581bd56e4
Closes-bug: 1262566
(cherry picked from commit eb84cfb4ef7376401f48488d4810714c2664e5fa)
Support aggregate API in cells

Change-Id: I1d687de36787ec70bd14a0ad613b405bcea2938a
Send up AZ and instance_name in system metadata

Change-Id: I63bbc86b4dd4cf107b09f10000b7c9ab06822ad6
Support consoleauth at child cells

Change-Id: I1475e3457fd7d153c90acddb22f103a5abde6f74
Restricted and direct only cell scheduler filters

Change-Id: I38a1a5c1fa90c9ec26ad9184deb0aa60f72abebf
Support flavor create call with cells

Change-Id: I3bfe5a302227e86b9dccac685f89f165abd941b4
Support public-ipv4 metadata lookup without floating IPs

Change-Id: I92dcdd1a5e0bbc0664d97b22c30b9c6990a8b03c
Fix instance AZ check when attaching volumes
Set unique hostnames when launching multiple instances

Change-Id: I5bef77aff24c35dcff1e993034e34cd87e672186
Use fixed_ip for public ip in ec2 responses

Change-Id: Iab568ae7422aa5d96d67fb277294feab9f2d963f
Ensure compute node IP is in list of DHCP servers

This will work for single network installs, and fixes issue
when live migrating the dhcp rule is wrong.

Change-Id: I407b576d9b58df7f34901f039961fdf0032f46e8
Cells: Event-based secgroup/rule/assoc syncing

- ec2 security groups with source groups
- create security group if it doesn't exist on rule create
- management command to force a sync of secgroups down cells

Change-Id: Ibc8c5acb6062e12bc876aff10ec1201b55d228eb
Cells: DB healing for groups/rules/instance assocs

Change-Id: I0721f1eb7f971da4d55cee027c8a4136f6f8b0e7
Healing for EC2 inst/vol and S3 image mappings

Change-Id: Iccb2fdc9b4d2f7a12e4e5569ae6159de50ef5b79
Expire reservations in cells manager

Normally reservations are expired by a periodic task in nova-scheduler.
In a cells deployment quotas are usually enabled only on the api-level
cell. This uses a separate DB from the scheduler, so any reservations
on the top level never get expired.

This change adds the same periodic task to the cells manager so
reservations at all levels have a chance to be expired. The task is
disabled by default and can be turned on with the
CONF.cells.expire_reservations option.

Change-Id: I217f5b5e947662a858eb295f2add5c3227c3b531
Remove cell api overrides for lock and unlock

This isn't actually needed as these methods handle objects and is
triggered when the instance object is saved.
It actually caused a race condition with unlock as it triggers 2
instance updates from a compute cell.

Change-Id: I42eea6a2984f70527d4fc37f48ad973a2248721c
Closes-Bug: #1257168
Support sending to havana scheduler for run_instance

Change-Id: I9126e4260015e00831687b8e795c5dd6ce809bf9
Use sysmetadata to get instance_name in API

Change-Id: If2ca9ff307f0d9b977d76f6ba8f34fb828c893cd
Use sysmetadata to get instance AZ in API cell

Change-Id: I606a900775810ba4151727ff36fd8e969a884251
Align EC2 and metadata API with rest of nova in get_instance_az

The EC2 and metadata API had their own custom method to get an
instances AZ. This removes this and gets them to use the same paths
as the rest of nova.

Change-Id: I6ff80ce75214959bf7f2c02e6231c58b28600cf0
Closes-bug: #1314490