[nova] Per-instance serial number implementation question

melanie witt melwittt at gmail.com
Fri Jan 25 02:20:01 UTC 2019

On Thu, 24 Jan 2019 09:09:07 -0600, Matt Riedemann <mriedemos at gmail.com> 
> The proposal from the spec for this feature was to add an image property
> (hw_unique_serial), flavor extra spec (hw:unique_serial) and new
> "unique" choice to the [libvirt]/sysinfo_serial config option. The image
> property and extra spec would be booleans but really only True values
> make sense and False would be more or less ignored. There were no plans
> to enforce strict checking of a boolean value, e.g. if the image
> property was True but the flavor extra spec was False, we would not
> raise an exception for incompatible values, we would just use OR logic
> and take the image property True value.
> The boolean usage proposed is a bit confusing, as can be seen from
> comments in the spec [1] and the proposed code change [2].
> After thinking about this a bit, I'm now thinking maybe we should just
> use a single-value enum for the image property and flavor extra spec:
> image: hw_guest_serial=unique
> flavor: hw:guest_serial=unique
> If either are set, then we use a unique serial number for the guest. If
> neither are set, then the serial number is based on the host
> configuration as it is today.
> I think that's more clear usage, do others agree? Alex does. I can't
> think of any cases where users would want hw_unique_serial=False, so
> this removes that ability and confusion over whether or not to enforce
> mismatching booleans.

I think use of the enum makes sense and it happens to make it easier to 
reason about in conjunction with the [libvirt]/sysinfo_serial config 
option, at least for me.


More information about the openstack-discuss mailing list