From f7eaf2bf78e031c2f28259359cf4efb6655bcf5a Mon Sep 17 00:00:00 2001 From: Kevin Parsons Date: Fri, 9 Jul 2021 15:36:39 -0700 Subject: [PATCH] Update hcsshim vendor to v0.8.20 Full set of changes: https://github.com/Microsoft/hcsshim/compare/v0.8.16...v0.8.20 Importantly brings in https://github.com/microsoft/hcsshim/pull/1065, which fixes #42610. Signed-off-by: Kevin Parsons --- vendor.conf | 2 +- .../Microsoft/hcsshim/computestorage/setup.go | 2 +- .../hcsshim/computestorage/storage.go | 2 +- .../github.com/Microsoft/hcsshim/container.go | 2 +- vendor/github.com/Microsoft/hcsshim/errors.go | 6 +- vendor/github.com/Microsoft/hcsshim/go.mod | 17 +++-- .../github.com/Microsoft/hcsshim/interface.go | 2 +- .../Microsoft/hcsshim/internal/cow/cow.go | 10 ++- .../hcsshim/internal/hcs/callback.go | 4 +- .../Microsoft/hcsshim/internal/hcs/errors.go | 12 ++-- .../Microsoft/hcsshim/internal/hcs/process.go | 67 ++++++++++++++++--- .../internal/{ => hcs}/schema1/schema1.go | 2 +- .../internal/{ => hcs}/schema2/attachment.go | 0 .../internal/{ => hcs}/schema2/battery.go | 0 .../schema2/cache_query_stats_response.go | 0 .../internal/{ => hcs}/schema2/chipset.go | 0 .../{ => hcs}/schema2/close_handle.go | 0 .../internal/{ => hcs}/schema2/com_port.go | 0 .../{ => hcs}/schema2/compute_system.go | 0 .../{ => hcs}/schema2/configuration.go | 0 .../{ => hcs}/schema2/console_size.go | 0 .../internal/{ => hcs}/schema2/container.go | 0 ...r_credential_guard_add_instance_request.go | 0 ...edential_guard_hv_socket_service_config.go | 0 .../container_credential_guard_instance.go | 0 ...ainer_credential_guard_modify_operation.go | 0 ...iner_credential_guard_operation_request.go | 0 ...redential_guard_remove_instance_request.go | 0 .../container_credential_guard_state.go | 0 .../container_credential_guard_system_info.go | 0 .../schema2/container_memory_information.go | 0 .../internal/{ => hcs}/schema2/cpu_group.go | 0 .../{ => hcs}/schema2/cpu_group_affinity.go | 0 .../{ => hcs}/schema2/cpu_group_config.go | 0 .../schema2/cpu_group_configurations.go | 0 .../{ => hcs}/schema2/cpu_group_operations.go | 0 .../{ => hcs}/schema2/cpu_group_property.go | 0 .../schema2/create_group_operation.go | 0 .../schema2/delete_group_operation.go | 0 .../internal/{ => hcs}/schema2/device.go | 0 .../internal/{ => hcs}/schema2/devices.go | 0 .../{ => hcs}/schema2/enhanced_mode_video.go | 0 .../{ => hcs}/schema2/flexible_io_device.go | 0 .../{ => hcs}/schema2/guest_connection.go | 0 .../schema2/guest_connection_info.go | 0 .../schema2/guest_crash_reporting.go | 0 .../internal/{ => hcs}/schema2/guest_os.go | 0 .../internal/{ => hcs}/schema2/guest_state.go | 0 .../schema2/host_processor_modify_request.go | 0 .../{ => hcs}/schema2/hosted_system.go | 0 .../internal/{ => hcs}/schema2/hv_socket.go | 0 .../internal/{ => hcs}/schema2/hv_socket_2.go | 0 .../{ => hcs}/schema2/hv_socket_address.go | 0 .../schema2/hv_socket_service_config.go | 0 .../schema2/hv_socket_system_config.go | 0 .../schema2/interrupt_moderation_mode.go | 0 .../{ => hcs}/schema2/iov_settings.go | 0 .../internal/{ => hcs}/schema2/keyboard.go | 0 .../internal/{ => hcs}/schema2/layer.go | 0 .../{ => hcs}/schema2/linux_kernel_direct.go | 0 .../{ => hcs}/schema2/logical_processor.go | 0 .../{ => hcs}/schema2/mapped_directory.go | 0 .../internal/{ => hcs}/schema2/mapped_pipe.go | 0 .../internal/{ => hcs}/schema2/memory.go | 0 .../internal/{ => hcs}/schema2/memory_2.go | 0 .../schema2/memory_information_for_vm.go | 0 .../{ => hcs}/schema2/memory_stats.go | 0 .../{ => hcs}/schema2/modification_request.go | 0 .../schema2/modify_setting_request.go | 0 .../internal/{ => hcs}/schema2/mouse.go | 0 .../{ => hcs}/schema2/network_adapter.go | 0 .../internal/{ => hcs}/schema2/networking.go | 0 .../{ => hcs}/schema2/pause_notification.go | 0 .../{ => hcs}/schema2/pause_options.go | 0 .../internal/{ => hcs}/schema2/plan9.go | 0 .../internal/{ => hcs}/schema2/plan9_share.go | 0 .../{ => hcs}/schema2/process_details.go | 0 .../schema2/process_modify_request.go | 0 .../{ => hcs}/schema2/process_parameters.go | 0 .../{ => hcs}/schema2/process_status.go | 0 .../internal/{ => hcs}/schema2/processor.go | 0 .../internal/{ => hcs}/schema2/processor_2.go | 5 +- .../{ => hcs}/schema2/processor_stats.go | 0 .../{ => hcs}/schema2/processor_topology.go | 0 .../internal/{ => hcs}/schema2/properties.go | 0 .../{ => hcs}/schema2/property_query.go | 0 .../{ => hcs}/schema2/property_type.go | 0 .../schema2/rdp_connection_options.go | 0 .../{ => hcs}/schema2/registry_changes.go | 0 .../{ => hcs}/schema2/registry_key.go | 0 .../{ => hcs}/schema2/registry_value.go | 0 .../{ => hcs}/schema2/restore_state.go | 0 .../{ => hcs}/schema2/save_options.go | 0 .../internal/{ => hcs}/schema2/scsi.go | 0 .../{ => hcs}/schema2/service_properties.go | 0 .../schema2/shared_memory_configuration.go | 0 .../{ => hcs}/schema2/shared_memory_region.go | 0 .../schema2/shared_memory_region_info.go | 0 .../{ => hcs}/schema2/silo_properties.go | 0 .../internal/{ => hcs}/schema2/statistics.go | 0 .../internal/{ => hcs}/schema2/storage.go | 0 .../{ => hcs}/schema2/storage_qo_s.go | 0 .../{ => hcs}/schema2/storage_stats.go | 0 .../internal/{ => hcs}/schema2/topology.go | 0 .../internal/{ => hcs}/schema2/uefi.go | 0 .../{ => hcs}/schema2/uefi_boot_entry.go | 0 .../internal/{ => hcs}/schema2/version.go | 0 .../{ => hcs}/schema2/video_monitor.go | 0 .../{ => hcs}/schema2/virtual_machine.go | 0 .../{ => hcs}/schema2/virtual_node_info.go | 0 .../schema2/virtual_p_mem_controller.go | 0 .../{ => hcs}/schema2/virtual_p_mem_device.go | 0 .../{ => hcs}/schema2/virtual_pci_device.go | 0 .../{ => hcs}/schema2/virtual_pci_function.go | 0 .../internal/{ => hcs}/schema2/virtual_smb.go | 0 .../{ => hcs}/schema2/virtual_smb_share.go | 0 .../schema2/virtual_smb_share_options.go | 0 .../internal/{ => hcs}/schema2/vm_memory.go | 0 .../{ => hcs}/schema2/vm_processor_limits.go | 0 .../schema2/windows_crash_reporting.go | 0 .../Microsoft/hcsshim/internal/hcs/service.go | 6 +- .../Microsoft/hcsshim/internal/hcs/system.go | 38 +++++------ .../internal/wclayer/expandscratchsize.go | 2 +- .../hcsshim/osversion/osversion_windows.go | 28 +++++--- 124 files changed, 138 insertions(+), 69 deletions(-) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema1/schema1.go (99%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/attachment.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/battery.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cache_query_stats_response.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/chipset.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/close_handle.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/com_port.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/compute_system.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/configuration.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/console_size.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_add_instance_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_hv_socket_service_config.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_instance.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_modify_operation.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_operation_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_remove_instance_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_state.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_credential_guard_system_info.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/container_memory_information.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group_affinity.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group_config.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group_configurations.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group_operations.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/cpu_group_property.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/create_group_operation.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/delete_group_operation.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/device.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/devices.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/enhanced_mode_video.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/flexible_io_device.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/guest_connection.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/guest_connection_info.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/guest_crash_reporting.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/guest_os.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/guest_state.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/host_processor_modify_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hosted_system.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hv_socket.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hv_socket_2.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hv_socket_address.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hv_socket_service_config.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/hv_socket_system_config.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/interrupt_moderation_mode.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/iov_settings.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/keyboard.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/layer.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/linux_kernel_direct.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/logical_processor.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/mapped_directory.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/mapped_pipe.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/memory.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/memory_2.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/memory_information_for_vm.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/memory_stats.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/modification_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/modify_setting_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/mouse.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/network_adapter.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/networking.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/pause_notification.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/pause_options.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/plan9.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/plan9_share.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/process_details.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/process_modify_request.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/process_parameters.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/process_status.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/processor.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/processor_2.go (73%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/processor_stats.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/processor_topology.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/properties.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/property_query.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/property_type.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/rdp_connection_options.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/registry_changes.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/registry_key.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/registry_value.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/restore_state.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/save_options.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/scsi.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/service_properties.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/shared_memory_configuration.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/shared_memory_region.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/shared_memory_region_info.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/silo_properties.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/statistics.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/storage.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/storage_qo_s.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/storage_stats.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/topology.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/uefi.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/uefi_boot_entry.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/version.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/video_monitor.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_machine.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_node_info.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_p_mem_controller.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_p_mem_device.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_pci_device.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_pci_function.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_smb.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_smb_share.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/virtual_smb_share_options.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/vm_memory.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/vm_processor_limits.go (100%) rename vendor/github.com/Microsoft/hcsshim/internal/{ => hcs}/schema2/windows_crash_reporting.go (100%) diff --git a/vendor.conf b/vendor.conf index 0eddd2741a..8c9debba5f 100644 --- a/vendor.conf +++ b/vendor.conf @@ -1,5 +1,5 @@ github.com/Azure/go-ansiterm d185dfc1b5a126116ea5a19e148e29d16b4574c9 -github.com/Microsoft/hcsshim e811ee705ec77df2ae28857ade553043fb564d91 # v0.8.16 +github.com/Microsoft/hcsshim 3ad51c76263bad09548a40e1996960814a12a870 # v0.8.20 github.com/Microsoft/go-winio 5c2e05d71961716a6c392a06ada435aaf5d5302c # v0.4.19 github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a github.com/golang/gddo 72a348e765d293ed6d1ded7b699591f14d6cd921 diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go b/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go index ca7b40ef66..06aaf841e8 100644 --- a/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go +++ b/vendor/github.com/Microsoft/hcsshim/computestorage/setup.go @@ -49,7 +49,7 @@ func SetupBaseOSLayer(ctx context.Context, layerPath string, vhdHandle windows.H // // `options` are the options applied while processing the layer. func SetupBaseOSVolume(ctx context.Context, layerPath, volumePath string, options OsLayerOptions) (err error) { - if osversion.Get().Build < 19645 { + if osversion.Build() < 19645 { return errors.New("SetupBaseOSVolume is not present on builds older than 19645") } title := "hcsshim.SetupBaseOSVolume" diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go b/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go index 9cd283d4b3..95aff9c184 100644 --- a/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go +++ b/vendor/github.com/Microsoft/hcsshim/computestorage/storage.go @@ -4,7 +4,7 @@ package computestorage import ( - hcsschema "github.com/Microsoft/hcsshim/internal/schema2" + hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2" ) //go:generate go run ../mksyscall_windows.go -output zsyscall_windows.go storage.go diff --git a/vendor/github.com/Microsoft/hcsshim/container.go b/vendor/github.com/Microsoft/hcsshim/container.go index 7205a62c5e..bfd722898e 100644 --- a/vendor/github.com/Microsoft/hcsshim/container.go +++ b/vendor/github.com/Microsoft/hcsshim/container.go @@ -8,8 +8,8 @@ import ( "time" "github.com/Microsoft/hcsshim/internal/hcs" + "github.com/Microsoft/hcsshim/internal/hcs/schema1" "github.com/Microsoft/hcsshim/internal/mergemaps" - "github.com/Microsoft/hcsshim/internal/schema1" ) // ContainerProperties holds the properties for a container and the processes running in that container diff --git a/vendor/github.com/Microsoft/hcsshim/errors.go b/vendor/github.com/Microsoft/hcsshim/errors.go index 7943086733..f367022e71 100644 --- a/vendor/github.com/Microsoft/hcsshim/errors.go +++ b/vendor/github.com/Microsoft/hcsshim/errors.go @@ -59,7 +59,7 @@ var ( // ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation ErrVmcomputeOperationInvalidState = hcs.ErrVmcomputeOperationInvalidState - // ErrProcNotFound is an error encountered when the the process cannot be found + // ErrProcNotFound is an error encountered when a procedure look up fails. ErrProcNotFound = hcs.ErrProcNotFound // ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2 @@ -159,7 +159,7 @@ func (e *ProcessError) Error() string { // IsNotExist checks if an error is caused by the Container or Process not existing. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsNotExist(err error) bool { if _, ok := err.(EndpointNotFoundError); ok { return true @@ -192,7 +192,7 @@ func IsTimeout(err error) bool { // a Container or Process being already stopped. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsAlreadyStopped(err error) bool { return hcs.IsAlreadyStopped(getInnerError(err)) } diff --git a/vendor/github.com/Microsoft/hcsshim/go.mod b/vendor/github.com/Microsoft/hcsshim/go.mod index 6e52f732b8..21640a6b99 100644 --- a/vendor/github.com/Microsoft/hcsshim/go.mod +++ b/vendor/github.com/Microsoft/hcsshim/go.mod @@ -3,13 +3,13 @@ module github.com/Microsoft/hcsshim go 1.13 require ( - github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 - github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68 - github.com/containerd/console v1.0.1 - github.com/containerd/containerd v1.5.0-beta.4 - github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0 + github.com/Microsoft/go-winio v0.4.17 + github.com/containerd/cgroups v1.0.1 + github.com/containerd/console v1.0.2 + github.com/containerd/containerd v1.5.1 + github.com/containerd/go-runc v1.0.0 github.com/containerd/ttrpc v1.0.2 - github.com/containerd/typeurl v1.0.1 + github.com/containerd/typeurl v1.0.2 github.com/gogo/protobuf v1.3.2 github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d github.com/pkg/errors v0.9.1 @@ -20,3 +20,8 @@ require ( golang.org/x/sys v0.0.0-20210324051608-47abb6519492 google.golang.org/grpc v1.33.2 ) + +replace ( + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 + google.golang.org/grpc => google.golang.org/grpc v1.27.1 +) diff --git a/vendor/github.com/Microsoft/hcsshim/interface.go b/vendor/github.com/Microsoft/hcsshim/interface.go index 5b91e0cc55..300eb59966 100644 --- a/vendor/github.com/Microsoft/hcsshim/interface.go +++ b/vendor/github.com/Microsoft/hcsshim/interface.go @@ -4,7 +4,7 @@ import ( "io" "time" - "github.com/Microsoft/hcsshim/internal/schema1" + "github.com/Microsoft/hcsshim/internal/hcs/schema1" ) // ProcessConfig is used as both the input of Container.CreateProcess diff --git a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go index b8e2d4f30f..27a62a7238 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go @@ -4,8 +4,8 @@ import ( "context" "io" - "github.com/Microsoft/hcsshim/internal/schema1" - hcsschema "github.com/Microsoft/hcsshim/internal/schema2" + "github.com/Microsoft/hcsshim/internal/hcs/schema1" + hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2" ) // Process is the interface for an OS process running in a container or utility VM. @@ -17,6 +17,12 @@ type Process interface { // CloseStdin causes the process's stdin handle to receive EOF/EPIPE/whatever // is appropriate to indicate that no more data is available. CloseStdin(ctx context.Context) error + // CloseStdout closes the stdout connection to the process. It is used to indicate + // that we are done receiving output on the shim side. + CloseStdout(ctx context.Context) error + // CloseStderr closes the stderr connection to the process. It is used to indicate + // that we are done receiving output on the shim side. + CloseStderr(ctx context.Context) error // Pid returns the process ID. Pid() int // Stdio returns the stdio streams for a process. These may be nil if a stream diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go index cebbe75ad4..d13772b030 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/callback.go @@ -13,7 +13,7 @@ import ( var ( nextCallback uintptr - callbackMap = map[uintptr]*notifcationWatcherContext{} + callbackMap = map[uintptr]*notificationWatcherContext{} callbackMapLock = sync.RWMutex{} notificationWatcherCallback = syscall.NewCallback(notificationWatcher) @@ -87,7 +87,7 @@ func (hn hcsNotification) String() string { type notificationChannel chan error -type notifcationWatcherContext struct { +type notificationWatcherContext struct { channels notificationChannels handle vmcompute.HcsCallback diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go index 7696e4b481..644f0ab711 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go @@ -60,7 +60,7 @@ var ( // ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation ErrVmcomputeOperationInvalidState = syscall.Errno(0xc0370105) - // ErrProcNotFound is an error encountered when the the process cannot be found + // ErrProcNotFound is an error encountered when a procedure look up fails. ErrProcNotFound = syscall.Errno(0x7f) // ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2 @@ -242,12 +242,11 @@ func makeProcessError(process *Process, op string, err error, events []ErrorEven // IsNotExist checks if an error is caused by the Container or Process not existing. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsNotExist(err error) bool { err = getInnerError(err) return err == ErrComputeSystemDoesNotExist || - err == ErrElementNotFound || - err == ErrProcNotFound + err == ErrElementNotFound } // IsAlreadyClosed checks if an error is caused by the Container or Process having been @@ -278,12 +277,11 @@ func IsTimeout(err error) bool { // a Container or Process being already stopped. // Note: Currently, ErrElementNotFound can mean that a Process has either // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist -// will currently return true when the error is ErrElementNotFound or ErrProcNotFound. +// will currently return true when the error is ErrElementNotFound. func IsAlreadyStopped(err error) bool { err = getInnerError(err) return err == ErrVmcomputeAlreadyStopped || - err == ErrElementNotFound || - err == ErrProcNotFound + err == ErrElementNotFound } // IsNotSupported returns a boolean indicating whether the error is caused by diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go index b74389eca2..8f20346688 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go @@ -118,7 +118,7 @@ func (process *Process) Signal(ctx context.Context, options interface{}) (bool, process.handleLock.RLock() defer process.handleLock.RUnlock() - operation := "hcsshim::Process::Signal" + operation := "hcs::Process::Signal" if process.handle == 0 { return false, makeProcessError(process, operation, ErrAlreadyClosed, nil) @@ -143,7 +143,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) { process.handleLock.RLock() defer process.handleLock.RUnlock() - operation := "hcsshim::Process::Kill" + operation := "hcs::Process::Kill" if process.handle == 0 { return false, makeProcessError(process, operation, ErrAlreadyClosed, nil) @@ -164,7 +164,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) { // This MUST be called exactly once per `process.handle` but `Wait` is safe to // call multiple times. func (process *Process) waitBackground() { - operation := "hcsshim::Process::waitBackground" + operation := "hcs::Process::waitBackground" ctx, span := trace.StartSpan(context.Background(), operation) defer span.End() span.AddAttributes( @@ -229,7 +229,7 @@ func (process *Process) ResizeConsole(ctx context.Context, width, height uint16) process.handleLock.RLock() defer process.handleLock.RUnlock() - operation := "hcsshim::Process::ResizeConsole" + operation := "hcs::Process::ResizeConsole" if process.handle == 0 { return makeProcessError(process, operation, ErrAlreadyClosed, nil) @@ -267,7 +267,7 @@ func (process *Process) ExitCode() (int, error) { } return process.exitCode, nil default: - return -1, makeProcessError(process, "hcsshim::Process::ExitCode", ErrInvalidProcessState, nil) + return -1, makeProcessError(process, "hcs::Process::ExitCode", ErrInvalidProcessState, nil) } } @@ -275,7 +275,7 @@ func (process *Process) ExitCode() (int, error) { // these pipes does not close the underlying pipes. Once returned, these pipes // are the responsibility of the caller to close. func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.ReadCloser, err error) { - operation := "hcsshim::Process::StdioLegacy" + operation := "hcs::Process::StdioLegacy" ctx, span := trace.StartSpan(context.Background(), operation) defer span.End() defer func() { oc.SetSpanStatus(span, err) }() @@ -327,7 +327,7 @@ func (process *Process) CloseStdin(ctx context.Context) error { process.handleLock.RLock() defer process.handleLock.RUnlock() - operation := "hcsshim::Process::CloseStdin" + operation := "hcs::Process::CloseStdin" if process.handle == 0 { return makeProcessError(process, operation, ErrAlreadyClosed, nil) @@ -361,10 +361,59 @@ func (process *Process) CloseStdin(ctx context.Context) error { return nil } +func (process *Process) CloseStdout(ctx context.Context) (err error) { + ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStdout") //nolint:ineffassign,staticcheck + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("cid", process.SystemID()), + trace.Int64Attribute("pid", int64(process.processID))) + + process.handleLock.Lock() + defer process.handleLock.Unlock() + + if process.handle == 0 { + return nil + } + + process.stdioLock.Lock() + defer process.stdioLock.Unlock() + if process.stdout != nil { + process.stdout.Close() + process.stdout = nil + } + return nil +} + +func (process *Process) CloseStderr(ctx context.Context) (err error) { + ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStderr") //nolint:ineffassign,staticcheck + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("cid", process.SystemID()), + trace.Int64Attribute("pid", int64(process.processID))) + + process.handleLock.Lock() + defer process.handleLock.Unlock() + + if process.handle == 0 { + return nil + } + + process.stdioLock.Lock() + defer process.stdioLock.Unlock() + if process.stderr != nil { + process.stderr.Close() + process.stderr = nil + + } + return nil +} + // Close cleans up any state associated with the process but does not kill // or wait on it. func (process *Process) Close() (err error) { - operation := "hcsshim::Process::Close" + operation := "hcs::Process::Close" ctx, span := trace.StartSpan(context.Background(), operation) defer span.End() defer func() { oc.SetSpanStatus(span, err) }() @@ -414,7 +463,7 @@ func (process *Process) Close() (err error) { } func (process *Process) registerCallback(ctx context.Context) error { - callbackContext := ¬ifcationWatcherContext{ + callbackContext := ¬ificationWatcherContext{ channels: newProcessChannels(), systemID: process.SystemID(), processID: process.processID, diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema1/schema1.go similarity index 99% rename from vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema1/schema1.go index b468ad6365..b621c55938 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema1/schema1.go @@ -5,7 +5,7 @@ import ( "time" "github.com/Microsoft/go-winio/pkg/guid" - hcsschema "github.com/Microsoft/hcsshim/internal/schema2" + hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2" ) // ProcessConfig is used as both the input of Container.CreateProcess diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/attachment.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/attachment.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/attachment.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/attachment.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/battery.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/battery.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/battery.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/battery.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cache_query_stats_response.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cache_query_stats_response.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cache_query_stats_response.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cache_query_stats_response.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/chipset.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/chipset.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/chipset.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/chipset.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/close_handle.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/close_handle.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/close_handle.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/close_handle.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/com_port.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/com_port.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/compute_system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/compute_system.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/compute_system.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/compute_system.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/configuration.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/configuration.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/configuration.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/configuration.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/console_size.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/console_size.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/console_size.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/console_size.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_add_instance_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_add_instance_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_add_instance_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_add_instance_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_hv_socket_service_config.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_hv_socket_service_config.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_hv_socket_service_config.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_hv_socket_service_config.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_instance.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_instance.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_instance.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_modify_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_modify_operation.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_modify_operation.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_modify_operation.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_operation_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_operation_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_operation_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_operation_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_remove_instance_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_remove_instance_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_remove_instance_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_remove_instance_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_state.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_state.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_state.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_state.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_system_info.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_system_info.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_credential_guard_system_info.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_credential_guard_system_info.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/container_memory_information.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/container_memory_information.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_affinity.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_affinity.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_affinity.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_affinity.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_config.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_config.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_config.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_config.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_configurations.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_configurations.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_configurations.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_configurations.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_operations.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_operations.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_operations.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_operations.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_property.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_property.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/cpu_group_property.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cpu_group_property.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/create_group_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/create_group_operation.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/create_group_operation.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/create_group_operation.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/delete_group_operation.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/delete_group_operation.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/delete_group_operation.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/delete_group_operation.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/device.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/device.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/device.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/devices.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/devices.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/enhanced_mode_video.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/enhanced_mode_video.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/enhanced_mode_video.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/enhanced_mode_video.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/flexible_io_device.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/flexible_io_device.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/flexible_io_device.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/flexible_io_device.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_connection.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_connection.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_connection_info.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_connection_info.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_crash_reporting.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_crash_reporting.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_crash_reporting.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_crash_reporting.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_os.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_os.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_os.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_os.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_state.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_state.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/guest_state.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_state.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/host_processor_modify_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/host_processor_modify_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/host_processor_modify_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/host_processor_modify_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hosted_system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hosted_system.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hosted_system.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hosted_system.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_2.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_2.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_address.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_address.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_service_config.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_service_config.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_service_config.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_system_config.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/hv_socket_system_config.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/interrupt_moderation_mode.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/interrupt_moderation_mode.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/interrupt_moderation_mode.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/interrupt_moderation_mode.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/iov_settings.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/iov_settings.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/iov_settings.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/iov_settings.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/keyboard.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/keyboard.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/keyboard.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/keyboard.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/layer.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/layer.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/layer.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/layer.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/linux_kernel_direct.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/linux_kernel_direct.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/linux_kernel_direct.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/linux_kernel_direct.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/logical_processor.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/logical_processor.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/logical_processor.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/logical_processor.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/mapped_directory.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mapped_directory.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/mapped_directory.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mapped_directory.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/mapped_pipe.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mapped_pipe.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/mapped_pipe.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mapped_pipe.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/memory.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_2.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_2.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_information_for_vm.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_information_for_vm.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/modification_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/modification_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/modification_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/modification_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/modify_setting_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/modify_setting_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/modify_setting_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/modify_setting_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/mouse.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mouse.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/mouse.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/mouse.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/network_adapter.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/network_adapter.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/network_adapter.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/network_adapter.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/networking.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/networking.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/networking.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/networking.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/pause_notification.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/pause_notification.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/pause_options.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/pause_options.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/plan9.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/plan9.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/plan9.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/plan9.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/plan9_share.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/plan9_share.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/plan9_share.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/plan9_share.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/process_details.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/process_details.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/process_modify_request.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_modify_request.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/process_modify_request.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_modify_request.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/process_parameters.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_parameters.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/process_parameters.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_parameters.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/process_status.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_status.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/process_status.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_status.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/processor.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_2.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_2.go similarity index 73% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_2.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_2.go index 21fe46062b..c64f335ec7 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_2.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_2.go @@ -3,7 +3,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * API version: 2.1 + * API version: 2.5 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ @@ -17,4 +17,7 @@ type Processor2 struct { Weight int32 `json:"Weight,omitempty"` ExposeVirtualizationExtensions bool `json:"ExposeVirtualizationExtensions,omitempty"` + + // An optional object that configures the CPU Group to which a Virtual Machine is going to bind to. + CpuGroup *CpuGroup `json:"CpuGroup,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_topology.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_topology.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_topology.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_topology.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/properties.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/properties.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_type.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_type.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/rdp_connection_options.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/rdp_connection_options.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/rdp_connection_options.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/rdp_connection_options.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_changes.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_changes.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_changes.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_changes.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_key.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_key.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_key.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_key.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_value.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_value.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/registry_value.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/registry_value.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/restore_state.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/restore_state.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/restore_state.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/restore_state.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/save_options.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/save_options.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/save_options.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/save_options.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/scsi.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/scsi.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/scsi.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/scsi.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/service_properties.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/service_properties.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/service_properties.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/service_properties.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_configuration.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_configuration.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_configuration.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_configuration.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_region.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_region.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_region.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_region.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_region_info.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_region_info.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/shared_memory_region_info.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/shared_memory_region_info.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/silo_properties.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/silo_properties.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/storage.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_qo_s.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_qo_s.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_qo_s.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_qo_s.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/topology.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/topology.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/uefi.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/uefi.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/uefi.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/uefi.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/uefi_boot_entry.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/uefi_boot_entry.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/uefi_boot_entry.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/uefi_boot_entry.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/version.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/version.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/version.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/version.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/video_monitor.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/video_monitor.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/video_monitor.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/video_monitor.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_machine.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_machine.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_node_info.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_node_info.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_node_info.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_node_info.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_p_mem_controller.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_p_mem_controller.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_p_mem_controller.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_p_mem_controller.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_p_mem_device.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_p_mem_device.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_p_mem_device.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_p_mem_device.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_function.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_function.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb_share.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb_share.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb_share.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb_share.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb_share_options.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb_share_options.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_smb_share_options.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_smb_share_options.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/vm_memory.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/vm_memory.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_processor_limits.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/vm_processor_limits.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_processor_limits.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/vm_processor_limits.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/windows_crash_reporting.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/windows_crash_reporting.go similarity index 100% rename from vendor/github.com/Microsoft/hcsshim/internal/schema2/windows_crash_reporting.go rename to vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/windows_crash_reporting.go diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go index 3a5f012501..a634dfc151 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/service.go @@ -4,13 +4,13 @@ import ( "context" "encoding/json" - hcsschema "github.com/Microsoft/hcsshim/internal/schema2" + hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2" "github.com/Microsoft/hcsshim/internal/vmcompute" ) // GetServiceProperties returns properties of the host compute service. func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcsschema.ServiceProperties, error) { - operation := "hcsshim::GetServiceProperties" + operation := "hcs::GetServiceProperties" queryb, err := json.Marshal(q) if err != nil { @@ -34,7 +34,7 @@ func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcss // ModifyServiceSettings modifies settings of the host compute service. func ModifyServiceSettings(ctx context.Context, settings hcsschema.ModificationRequest) error { - operation := "hcsshim::ModifyServiceSettings" + operation := "hcs::ModifyServiceSettings" settingsJSON, err := json.Marshal(settings) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go index cea11dee7f..75499c967f 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go @@ -9,10 +9,10 @@ import ( "syscall" "github.com/Microsoft/hcsshim/internal/cow" + "github.com/Microsoft/hcsshim/internal/hcs/schema1" + hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2" "github.com/Microsoft/hcsshim/internal/log" "github.com/Microsoft/hcsshim/internal/oc" - "github.com/Microsoft/hcsshim/internal/schema1" - hcsschema "github.com/Microsoft/hcsshim/internal/schema2" "github.com/Microsoft/hcsshim/internal/timeout" "github.com/Microsoft/hcsshim/internal/vmcompute" "go.opencensus.io/trace" @@ -40,7 +40,7 @@ func newSystem(id string) *System { // CreateComputeSystem creates a new compute system with the given configuration but does not start it. func CreateComputeSystem(ctx context.Context, id string, hcsDocumentInterface interface{}) (_ *System, err error) { - operation := "hcsshim::CreateComputeSystem" + operation := "hcs::CreateComputeSystem" // hcsCreateComputeSystemContext is an async operation. Start the outer span // here to measure the full create time. @@ -96,7 +96,7 @@ func CreateComputeSystem(ctx context.Context, id string, hcsDocumentInterface in // OpenComputeSystem opens an existing compute system by ID. func OpenComputeSystem(ctx context.Context, id string) (*System, error) { - operation := "hcsshim::OpenComputeSystem" + operation := "hcs::OpenComputeSystem" computeSystem := newSystem(id) handle, resultJSON, err := vmcompute.HcsOpenComputeSystem(ctx, id) @@ -148,7 +148,7 @@ func (computeSystem *System) IsOCI() bool { // GetComputeSystems gets a list of the compute systems on the system that match the query func GetComputeSystems(ctx context.Context, q schema1.ComputeSystemQuery) ([]schema1.ContainerProperties, error) { - operation := "hcsshim::GetComputeSystems" + operation := "hcs::GetComputeSystems" queryb, err := json.Marshal(q) if err != nil { @@ -174,7 +174,7 @@ func GetComputeSystems(ctx context.Context, q schema1.ComputeSystemQuery) ([]sch // Start synchronously starts the computeSystem. func (computeSystem *System) Start(ctx context.Context) (err error) { - operation := "hcsshim::System::Start" + operation := "hcs::System::Start" // hcsStartComputeSystemContext is an async operation. Start the outer span // here to measure the full start time. @@ -209,7 +209,7 @@ func (computeSystem *System) Shutdown(ctx context.Context) error { computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::Shutdown" + operation := "hcs::System::Shutdown" if computeSystem.handle == 0 { return nil @@ -230,7 +230,7 @@ func (computeSystem *System) Terminate(ctx context.Context) error { computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::Terminate" + operation := "hcs::System::Terminate" if computeSystem.handle == 0 { return nil @@ -252,7 +252,7 @@ func (computeSystem *System) Terminate(ctx context.Context) error { // This MUST be called exactly once per `computeSystem.handle` but `Wait` is // safe to call multiple times. func (computeSystem *System) waitBackground() { - operation := "hcsshim::System::waitBackground" + operation := "hcs::System::waitBackground" ctx, span := trace.StartSpan(context.Background(), operation) defer span.End() span.AddAttributes(trace.StringAttribute("cid", computeSystem.id)) @@ -300,7 +300,7 @@ func (computeSystem *System) Properties(ctx context.Context, types ...schema1.Pr computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::Properties" + operation := "hcs::System::Properties" queryBytes, err := json.Marshal(schema1.PropertyQuery{PropertyTypes: types}) if err != nil { @@ -329,7 +329,7 @@ func (computeSystem *System) PropertiesV2(ctx context.Context, types ...hcsschem computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::PropertiesV2" + operation := "hcs::System::PropertiesV2" queryBytes, err := json.Marshal(hcsschema.PropertyQuery{PropertyTypes: types}) if err != nil { @@ -355,7 +355,7 @@ func (computeSystem *System) PropertiesV2(ctx context.Context, types ...hcsschem // Pause pauses the execution of the computeSystem. This feature is not enabled in TP5. func (computeSystem *System) Pause(ctx context.Context) (err error) { - operation := "hcsshim::System::Pause" + operation := "hcs::System::Pause" // hcsPauseComputeSystemContext is an async peration. Start the outer span // here to measure the full pause time. @@ -382,7 +382,7 @@ func (computeSystem *System) Pause(ctx context.Context) (err error) { // Resume resumes the execution of the computeSystem. This feature is not enabled in TP5. func (computeSystem *System) Resume(ctx context.Context) (err error) { - operation := "hcsshim::System::Resume" + operation := "hcs::System::Resume" // hcsResumeComputeSystemContext is an async operation. Start the outer span // here to measure the full restore time. @@ -409,7 +409,7 @@ func (computeSystem *System) Resume(ctx context.Context) (err error) { // Save the compute system func (computeSystem *System) Save(ctx context.Context, options interface{}) (err error) { - operation := "hcsshim::System::Save" + operation := "hcs::System::Save" // hcsSaveComputeSystemContext is an async peration. Start the outer span // here to measure the full save time. @@ -465,7 +465,7 @@ func (computeSystem *System) createProcess(ctx context.Context, operation string // CreateProcess launches a new process within the computeSystem. func (computeSystem *System) CreateProcess(ctx context.Context, c interface{}) (cow.Process, error) { - operation := "hcsshim::System::CreateProcess" + operation := "hcs::System::CreateProcess" process, processInfo, err := computeSystem.createProcess(ctx, operation, c) if err != nil { return nil, err @@ -498,7 +498,7 @@ func (computeSystem *System) OpenProcess(ctx context.Context, pid int) (*Process computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::OpenProcess" + operation := "hcs::System::OpenProcess" if computeSystem.handle == 0 { return nil, makeSystemError(computeSystem, operation, ErrAlreadyClosed, nil) @@ -521,7 +521,7 @@ func (computeSystem *System) OpenProcess(ctx context.Context, pid int) (*Process // Close cleans up any state associated with the compute system but does not terminate or wait for it. func (computeSystem *System) Close() (err error) { - operation := "hcsshim::System::Close" + operation := "hcs::System::Close" ctx, span := trace.StartSpan(context.Background(), operation) defer span.End() defer func() { oc.SetSpanStatus(span, err) }() @@ -554,7 +554,7 @@ func (computeSystem *System) Close() (err error) { } func (computeSystem *System) registerCallback(ctx context.Context) error { - callbackContext := ¬ifcationWatcherContext{ + callbackContext := ¬ificationWatcherContext{ channels: newSystemChannels(), systemID: computeSystem.id, } @@ -615,7 +615,7 @@ func (computeSystem *System) Modify(ctx context.Context, config interface{}) err computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() - operation := "hcsshim::System::Modify" + operation := "hcs::System::Modify" if computeSystem.handle == 0 { return makeSystemError(computeSystem, operation, ErrAlreadyClosed, nil) diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go index 93f27da8a0..22f7605bee 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go @@ -30,7 +30,7 @@ func ExpandScratchSize(ctx context.Context, path string, size uint64) (err error // Manually expand the volume now in order to work around bugs in 19H1 and // prerelease versions of Vb. Remove once this is fixed in Windows. - if build := osversion.Get().Build; build >= osversion.V19H1 && build < 19020 { + if build := osversion.Build(); build >= osversion.V19H1 && build < 19020 { err = expandSandboxVolume(ctx, path) if err != nil { return err diff --git a/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go b/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go index 42e58403de..3ab3bcd89a 100644 --- a/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go +++ b/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go @@ -2,6 +2,7 @@ package osversion import ( "fmt" + "sync" "golang.org/x/sys/windows" ) @@ -15,19 +16,26 @@ type OSVersion struct { Build uint16 } +var ( + osv OSVersion + once sync.Once +) + // Get gets the operating system version on Windows. // The calling application must be manifested to get the correct version information. func Get() OSVersion { - var err error - osv := OSVersion{} - osv.Version, err = windows.GetVersion() - if err != nil { - // GetVersion never fails. - panic(err) - } - osv.MajorVersion = uint8(osv.Version & 0xFF) - osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF) - osv.Build = uint16(osv.Version >> 16) + once.Do(func() { + var err error + osv = OSVersion{} + osv.Version, err = windows.GetVersion() + if err != nil { + // GetVersion never fails. + panic(err) + } + osv.MajorVersion = uint8(osv.Version & 0xFF) + osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF) + osv.Build = uint16(osv.Version >> 16) + }) return osv }