Previously we had aimed to make things like compute RPC automatically
look up the InstanceMapping or HostMapping for the call being performed
to target appropriately. However, we cannot do that within the cell,
and even trying incurs some overhead. For now, just deprecate the
by_instance() and by_host() methods and honor what is in the context
(if set) and otherwise fall back to the default client. Make the context
target routines create and store the RPC transport and remove the caching
logic from the ClientRouter since we're removing its ability to do that.
Related to blueprint cells-aware-api
Change-Id: I10f374adca672576058c4dbab708c040d166df47
fdatasync is not available on Windows, for which reason this
operation now fails.
This change switches to fsync, which is platform independent.
Closes-Bug: #1671435
Change-Id: I71ac19160f198a97bb1834c5c81684758f129bcc
This merely pulls out the loading of the global cells cache
into a helper function that can be used by later patches that
will also depend on this. Since it's the same code, existing
tests exercise this path just like they did before it was moved.
This was moved out of another patch to re-order some dependencies.
Related to blueprint cells-aware-api
Change-Id: Idb25f5905f3e33cec3c7887d08408251fef5b262
This adds a decorator that lets us auto-target cells for methods in
conductor that are supposed to run at super-conductor level and thus
need to look up the instance mapping.
Related to blueprint cells-aware-api
Change-Id: I1c9a16b90774fb76e96b36259327dc0f273ab3c8
Image download closes the filehandle of the downloaded image before
use, but doesn't fdatasync it. This means that in the event of a host
crash we may be left with only the file metadata when the host comes
back up: i.e. an empty file of the correct size. Nova cannot detect
this data corruption, so operator intervention is required.
By adding an fdatasync() before closing the file handle we ensure that
the downloaded file is either entirely present, or entirely not
present.
See also change I33bd99b0, which fixes this issue for downloads
requiring a subsequent conversion step.
Partial-Bug: #1669844
Change-Id: Id9905a87f16f66530623800e33e2581c555ae81d
Since we look up the instance and call to its cell in consoleauth,
we need to look up the InstanceMapping and properly target the
database and rpc operation.
Related to blueprint cells-aware-api
Change-Id: I80013fa59b221f70376d6e1d4080ca699ff6caeb
It's not particularly clear which methods send legacy
unversioned notifications since the docstrings are not
clear about that, nor is the method name.
I came across this while trying to figure out what
puts the "compute." prefix on the legacy unversioned
notifications and whether or not that was on the
versioned notifications (it's not).
This just updates the docstrings to be more clear.
Change-Id: Ic85f4f9d31a719368495fc0dcd07ace043816693