diff --git a/CHANGES.next.md b/CHANGES.next.md index 12f21a55b4291a71370a3d6676f1a8173fe785b4..281b8fde904048e91db82d47a712db6dfa2c6820 100644 --- a/CHANGES.next.md +++ b/CHANGES.next.md @@ -1,4 +1,9 @@ ### Breaking changes: +- Remove `ubuntu1404` and `debian` OS types. + - Ubuntu 14.04 is now in LTS and has not been fully maintained since April + 2019. + - `debian` os_type alias referred to Ubuntu 14.04 on all clouds. + - Ubuntu 16.04 is now the default. ### New features: diff --git a/README.md b/README.md index d0e4a05ab529ba46cc0b3a61631e6a106a39f8d0..04709b2d7f783d2d1363badb9d82301eed028379 100644 --- a/README.md +++ b/README.md @@ -381,10 +381,10 @@ $ aws configure ### Windows Azure CLI and credentials -This version of Perfkit Benchmarker is known to be compatible with Azure CLI +This version of Perfkit Benchmarker is known to be compatible with Azure CLI version 2.0.75, and will likely work with any version newer than that. -Follow the instructions at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli or +Follow the instructions at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli or on Linux, run the following commands: ```bash @@ -778,7 +778,7 @@ hbase_ycsb: vm_spec: GCP: machine_type: n1-standard-1 - image: ubuntu-14-04 + image: ubuntu-16-04 zone: us-central1-c AWS: machine_type: m3.medium @@ -797,7 +797,7 @@ hbase_ycsb: machine_type: cpus: 2 memory: 10.0GiB - image: ubuntu-14-04 + image: ubuntu-16-04 zone: us-central1-c # Other clouds here... disk_count: 1 @@ -813,7 +813,7 @@ hbase_ycsb: vm_spec: GCP: machine_type: n1-standard-4 - image: ubuntu-14-04 + image: ubuntu-16-04 zone: us-central1-c # Other clouds here... disk_count: 1 diff --git a/perfkitbenchmarker/data/docker/netperf/Dockerfile b/perfkitbenchmarker/data/docker/netperf/Dockerfile index 8e0806310b92f2abce22a3f83cb67f9c0ceaf00e..0259b0bd9771d1b30610b30377bf265a7671ddc9 100644 --- a/perfkitbenchmarker/data/docker/netperf/Dockerfile +++ b/perfkitbenchmarker/data/docker/netperf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:14.04 +FROM ubuntu:16.04 RUN apt-get update && apt-get install -y gcc make curl diff --git a/perfkitbenchmarker/linux_virtual_machine.py b/perfkitbenchmarker/linux_virtual_machine.py index 2571dab5be30c06a2bc31af591cfa4cca25ecd38..787db0e479c00c0632cff8979936fa99688cdffe 100644 --- a/perfkitbenchmarker/linux_virtual_machine.py +++ b/perfkitbenchmarker/linux_virtual_machine.py @@ -1390,14 +1390,14 @@ class CoreOsMixin(BaseContainerLinuxMixin): BASE_OS_TYPE = os_types.CORE_OS -class DebianMixin(BaseLinuxMixin): +class BaseDebianMixin(BaseLinuxMixin): """Class holding Debian specific VM methods and attributes.""" - OS_TYPE = os_types.DEBIAN + OS_TYPE = 'base-only' BASE_OS_TYPE = os_types.DEBIAN def __init__(self, *args, **kwargs): - super(DebianMixin, self).__init__(*args, **kwargs) + super(BaseDebianMixin, self).__init__(*args, **kwargs) # Whether or not apt-get update has been called. # We defer running apt-get update until the first request to install a @@ -1510,7 +1510,7 @@ class DebianMixin(BaseLinuxMixin): def SetupProxy(self): """Sets up proxy configuration variables for the cloud environment.""" - super(DebianMixin, self).SetupProxy() + super(BaseDebianMixin, self).SetupProxy() apt_proxy_file = '/etc/apt/apt.conf' commands = [] @@ -1545,12 +1545,12 @@ class DebianMixin(BaseLinuxMixin): self.Reboot() -class Debian9Mixin(DebianMixin): +class Debian9Mixin(BaseDebianMixin): """Class holding Debian9 specific VM methods and attributes.""" OS_TYPE = os_types.DEBIAN9 -class UbuntuMixin(DebianMixin): +class BaseUbuntuMixin(BaseDebianMixin): """Class holding Ubuntu specific VM methods and attributes.""" def AppendKernelCommandLine(self, command_line, reboot=True): @@ -1564,22 +1564,17 @@ class UbuntuMixin(DebianMixin): self.Reboot() -class Ubuntu1404Mixin(UbuntuMixin): - """Class holding Ubuntu1404 specific VM methods and attributes.""" - OS_TYPE = os_types.UBUNTU1404 - - -class Ubuntu1604Mixin(UbuntuMixin): +class Ubuntu1604Mixin(BaseUbuntuMixin): """Class holding Ubuntu1604 specific VM methods and attributes.""" OS_TYPE = os_types.UBUNTU1604 -class Ubuntu1710Mixin(UbuntuMixin): +class Ubuntu1710Mixin(BaseUbuntuMixin): """Class holding Ubuntu1710 specific VM methods and attributes.""" OS_TYPE = os_types.UBUNTU1710 -class Ubuntu1804Mixin(UbuntuMixin): +class Ubuntu1804Mixin(BaseUbuntuMixin): """Class holding Ubuntu1804 specific VM methods and attributes.""" OS_TYPE = os_types.UBUNTU1804 @@ -1594,12 +1589,12 @@ class Ubuntu1804Mixin(UbuntuMixin): r'sudo sed -i "1 i\export PATH=$PATH:/snap/bin" /etc/bash.bashrc') -class Ubuntu1604Cuda9Mixin(UbuntuMixin): +class Ubuntu1604Cuda9Mixin(BaseUbuntuMixin): """Class holding NVIDIA CUDA specific VM methods and attributes.""" OS_TYPE = os_types.UBUNTU1604_CUDA9 -class ContainerizedDebianMixin(DebianMixin): +class ContainerizedDebianMixin(BaseDebianMixin): """Class representing a Containerized Virtual Machine. A Containerized Virtual Machine is a VM that runs remote commands @@ -1609,7 +1604,7 @@ class ContainerizedDebianMixin(DebianMixin): """ OS_TYPE = os_types.UBUNTU_CONTAINER - BASE_DOCKER_IMAGE = 'ubuntu:trusty-20161006' + BASE_DOCKER_IMAGE = 'ubuntu:xenial' def __init__(self, *args, **kwargs): super(ContainerizedDebianMixin, self).__init__(*args, **kwargs) @@ -1962,7 +1957,7 @@ class ProcCpuResults(object): return processor_id, singles, stanza -class JujuMixin(DebianMixin): +class JujuMixin(BaseDebianMixin): """Class to allow running Juju-deployed workloads. Bootstraps a Juju environment using the manual provider: diff --git a/perfkitbenchmarker/os_types.py b/perfkitbenchmarker/os_types.py index 27e2b8a59bf66c27f21d8c3b4c7769ec0d3db7a2..67e21c801dec910e91702b8d8921380712bc7055 100644 --- a/perfkitbenchmarker/os_types.py +++ b/perfkitbenchmarker/os_types.py @@ -20,12 +20,10 @@ CENTOS7 = 'centos7' CLEAR = 'clear' COS = 'cos' CORE_OS = 'core_os' -DEBIAN = 'debian' DEBIAN9 = 'debian9' JUJU = 'juju' RHEL = 'rhel' UBUNTU_CONTAINER = 'ubuntu_container' -UBUNTU1404 = 'ubuntu1404' UBUNTU1604 = 'ubuntu1604' UBUNTU1604_CUDA9 = 'ubuntu1604_cuda9' UBUNTU1710 = 'ubuntu1710' @@ -38,18 +36,19 @@ WINDOWS2012_BASE = 'windows2012_base' WINDOWS2016_BASE = 'windows2016_base' WINDOWS2019_BASE = 'windows2019_base' +# Base-only OS types +DEBIAN = 'debian' + LINUX_OS_TYPES = [ AMAZONLINUX2, CENTOS7, CLEAR, CORE_OS, COS, - DEBIAN, DEBIAN9, JUJU, RHEL, UBUNTU_CONTAINER, - UBUNTU1404, UBUNTU1604, UBUNTU1604_CUDA9, UBUNTU1710, @@ -67,11 +66,7 @@ WINDOWS_OS_TYPES = [ ALL = LINUX_OS_TYPES + WINDOWS_OS_TYPES BASE_OS_TYPES = [CLEAR, CORE_OS, DEBIAN, RHEL, WINDOWS] -flags.DEFINE_enum( - 'os_type', UBUNTU1604, ALL, - 'The VM\'s OS type. Ubuntu\'s os_type can also be specified as "debian" ' - 'because it is largely built on Debian and uses the same package manager. ' - 'Likewise, CentOS\'s os_type can be "rhel". In general if two OS\'s use ' - 'the same package manager, and are otherwise very similar, the same ' - 'os_type may work on both of them. However, more specific os_types (and ' - 'associated VirtualMachine subclasses can be developed.') +# May change from time to time. +DEFAULT = UBUNTU1604 + +flags.DEFINE_enum('os_type', DEFAULT, ALL, 'The VM\'s OS type.') diff --git a/perfkitbenchmarker/providers/alicloud/ali_virtual_machine.py b/perfkitbenchmarker/providers/alicloud/ali_virtual_machine.py index 9c065c27862e34baa5f5b152a20521a248851632..4fac699d2d2ec8790a01910edd97f491774deca8 100644 --- a/perfkitbenchmarker/providers/alicloud/ali_virtual_machine.py +++ b/perfkitbenchmarker/providers/alicloud/ali_virtual_machine.py @@ -431,18 +431,6 @@ class AliCloudKeyFileManager(object): return keyfile.strip() -class DebianBasedAliVirtualMachine(AliVirtualMachine, - linux_virtual_machine.DebianMixin): - IMAGE_NAME_FILTER = 'ubuntu_14_0405_64*alibase*.vhd' - PYTHON_PIP_PACKAGE_VERSION = '9.0.3' - - -class Ubuntu1404BasedAliVirtualMachine(AliVirtualMachine, - linux_virtual_machine.Ubuntu1604Mixin): - IMAGE_NAME_FILTER = 'ubuntu_14_0405_64*alibase*.vhd' - PYTHON_PIP_PACKAGE_VERSION = '9.0.3' - - class Ubuntu1604BasedAliVirtualMachine(AliVirtualMachine, linux_virtual_machine.Ubuntu1604Mixin): IMAGE_NAME_FILTER = 'ubuntu_16_04_64*alibase*.vhd' diff --git a/perfkitbenchmarker/providers/aws/aws_virtual_machine.py b/perfkitbenchmarker/providers/aws/aws_virtual_machine.py index 1236b4dd5418943899b7dc97e50e716ea7d48cea..e4a39932a8a828d7db9c17cf081ea590592ad4a7 100644 --- a/perfkitbenchmarker/providers/aws/aws_virtual_machine.py +++ b/perfkitbenchmarker/providers/aws/aws_virtual_machine.py @@ -985,24 +985,6 @@ class CoreOsBasedAwsVirtualMachine(AwsVirtualMachine, DEFAULT_USER_NAME = 'core' -class DebianBasedAwsVirtualMachine(AwsVirtualMachine, - linux_virtual_machine.DebianMixin): - """Class with configuration for AWS Debian virtual machines.""" - IMAGE_NAME_FILTER = 'ubuntu/images/*/ubuntu-trusty-14.04-*64-server-20*' - IMAGE_OWNER = '099720109477' # For Amazon-owned images. - PYTHON_PIP_PACKAGE_VERSION = '9.0.3' - DEFAULT_USER_NAME = 'ubuntu' - - -class Ubuntu1404BasedAwsVirtualMachine(AwsVirtualMachine, - linux_virtual_machine.Ubuntu1404Mixin): - """Class with configuration for AWS Ubuntu1404 virtual machines.""" - IMAGE_NAME_FILTER = 'ubuntu/images/*/ubuntu-trusty-14.04-*64-server-20*' - IMAGE_OWNER = '099720109477' # For Amazon-owned images. - PYTHON_PIP_PACKAGE_VERSION = '9.0.3' - DEFAULT_USER_NAME = 'ubuntu' - - class Ubuntu1604BasedAwsVirtualMachine(AwsVirtualMachine, linux_virtual_machine.Ubuntu1604Mixin): IMAGE_NAME_FILTER = 'ubuntu/images/*/ubuntu-xenial-16.04-*64-server-20*' diff --git a/perfkitbenchmarker/providers/azure/azure_virtual_machine.py b/perfkitbenchmarker/providers/azure/azure_virtual_machine.py index 19a8180f986b1c72fb2c79dc6ac42803b4a8e9f1..1838cbe41ebc4205cc7ce42502c17718b55ce0be 100644 --- a/perfkitbenchmarker/providers/azure/azure_virtual_machine.py +++ b/perfkitbenchmarker/providers/azure/azure_virtual_machine.py @@ -749,16 +749,6 @@ class AzureVirtualMachine( return self.low_priority_status_code -class DebianBasedAzureVirtualMachine(AzureVirtualMachine, - linux_virtual_machine.DebianMixin): - IMAGE_URN = 'Canonical:UbuntuServer:14.04.4-LTS:latest' - - -class Ubuntu1404BasedAzureVirtualMachine(AzureVirtualMachine, - linux_virtual_machine.Ubuntu1404Mixin): - IMAGE_URN = 'Canonical:UbuntuServer:14.04.4-LTS:latest' - - class Ubuntu1604BasedAzureVirtualMachine(AzureVirtualMachine, linux_virtual_machine.Ubuntu1604Mixin): IMAGE_URN = 'Canonical:UbuntuServer:16.04-LTS:latest' diff --git a/perfkitbenchmarker/providers/cloudstack/cloudstack_virtual_machine.py b/perfkitbenchmarker/providers/cloudstack/cloudstack_virtual_machine.py index 0b6b8efb05e0029e42833609b4435c807dec3af8..ea31640b287e4f982b40d106a9fd7c13d1ad4729 100644 --- a/perfkitbenchmarker/providers/cloudstack/cloudstack_virtual_machine.py +++ b/perfkitbenchmarker/providers/cloudstack/cloudstack_virtual_machine.py @@ -33,7 +33,6 @@ from perfkitbenchmarker.providers.cloudstack import util from perfkitbenchmarker import providers from six.moves import range -UBUNTU_IMAGE = 'Ubuntu 14.04.2 HVM base (64bit)' RHEL_IMAGE = 'CentOS 7 HVM base (64bit)' FLAGS = flags.FLAGS @@ -45,7 +44,7 @@ class CloudStackVirtualMachine(virtual_machine.BaseVirtualMachine): CLOUD = providers.CLOUDSTACK DEFAULT_ZONE = 'QC-1' DEFAULT_MACHINE_TYPE = '1vCPU.1GB' - DEFAULT_IMAGE = 'Ubuntu 14.04.2 HVM base (64bit)' + DEFAULT_IMAGE = None DEFAULT_USER_NAME = 'cca-user' DEFAULT_PROJECT = 'cloudops-Engineering' @@ -208,11 +207,6 @@ class CloudStackVirtualMachine(virtual_machine.BaseVirtualMachine): self._CreateScratchDiskFromDisks(disk_spec, self.disks) -class DebianBasedCloudStackVirtualMachine(CloudStackVirtualMachine, - linux_vm.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - class RhelBasedCloudStackVirtualMachine(CloudStackVirtualMachine, linux_vm.RhelMixin): DEFAULT_IMAGE = RHEL_IMAGE diff --git a/perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py b/perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py index e8a5fd7d7662589066f063e1c95f673fc0226980..00bc1ffe273b64fe94b31d27032324275faa1043 100644 --- a/perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py +++ b/perfkitbenchmarker/providers/digitalocean/digitalocean_virtual_machine.py @@ -27,8 +27,6 @@ from perfkitbenchmarker.providers.digitalocean import util from perfkitbenchmarker import providers from six.moves import range -UBUNTU_IMAGE = 'ubuntu-14-04-x64' - # DigitalOcean sets up the root account with a temporary # password that's set as expired, requiring it to be changed # immediately. This breaks dpkg postinst scripts, for example @@ -162,17 +160,6 @@ class DigitalOceanVirtualMachine(virtual_machine.BaseVirtualMachine): self._CreateScratchDiskFromDisks(disk_spec, disks) -class ContainerizedDigitalOceanVirtualMachine( - DigitalOceanVirtualMachine, - linux_virtual_machine.ContainerizedDebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - -class DebianBasedDigitalOceanVirtualMachine(DigitalOceanVirtualMachine, - linux_virtual_machine.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - class RhelBasedDigitalOceanVirtualMachine(DigitalOceanVirtualMachine, linux_virtual_machine.RhelMixin): - pass + pass diff --git a/perfkitbenchmarker/providers/docker/docker_container_instance.py b/perfkitbenchmarker/providers/docker/docker_container_instance.py index bb4e77f2ae2868cd65b8fb5c2213cd5834cde829..addf9af305a7a4da13e492643a4eedb98d1af8c7 100644 --- a/perfkitbenchmarker/providers/docker/docker_container_instance.py +++ b/perfkitbenchmarker/providers/docker/docker_container_instance.py @@ -34,7 +34,7 @@ from perfkitbenchmarker.providers.docker import docker_disk FLAGS = flags.FLAGS -UBUNTU_IMAGE = 'ubuntu:xenial' +UBUNTU16_IMAGE = 'ubuntu:xenial' DEFAULT_DOCKER_IMAGE = 'pkb/ubuntu16' DOCKERFILE_DIRECTORY = 'perfkitbenchmarker/data/docker' @@ -289,8 +289,7 @@ class DockerContainer(virtual_machine.BaseVirtualMachine): class DebianBasedDockerContainer(DockerContainer, - linux_virtual_machine.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE + linux_virtual_machine.BaseDebianMixin): def _GetNumCpus(self): return self.cpus @@ -311,9 +310,9 @@ class DebianBasedDockerContainer(DockerContainer, logging.warn('Docker Containers cannot be rebooted to apply flags') -class Ubuntu1604BasedDockerContainer( - DebianBasedDockerContainer, linux_virtual_machine.Ubuntu1604Mixin): - DEFAULT_IMAGE = UBUNTU_IMAGE +class Ubuntu1604BasedDockerContainer(DebianBasedDockerContainer, + linux_virtual_machine.Ubuntu1604Mixin): + DEFAULT_IMAGE = UBUNTU16_IMAGE # Note: to add support for ubuntu 14 and ubuntu 18, we simply need to # create/test Dockerfiles for those distros. This should be diff --git a/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py b/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py index 244005e5cfc55dabc94229bdb0ff5b8ef6e0f56c..3e8541a6c76cfc669c21587d1ef9525fcc05f358 100644 --- a/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py +++ b/perfkitbenchmarker/providers/gcp/gce_virtual_machine.py @@ -62,7 +62,6 @@ FLAGS = flags.FLAGS NVME = 'NVME' SCSI = 'SCSI' -UBUNTU_IMAGE = 'ubuntu-14-04' RHEL_IMAGE = 'rhel-7' _INSUFFICIENT_HOST_CAPACITY = ('does not have enough resources available ' 'to fulfill the request.') @@ -795,16 +794,6 @@ class GceVirtualMachine(virtual_machine.BaseVirtualMachine): return self.preemptible_status_code -class ContainerizedGceVirtualMachine(GceVirtualMachine, - linux_vm.ContainerizedDebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - -class DebianBasedGceVirtualMachine(GceVirtualMachine, - linux_vm.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - class Debian9BasedGceVirtualMachine(GceVirtualMachine, linux_vm.Debian9Mixin): DEFAULT_IMAGE_FAMILY = 'debian-9' @@ -845,12 +834,6 @@ class CoreOsBasedGceVirtualMachine(GceVirtualMachine, linux_vm.CoreOsMixin): DEFAULT_IMAGE_PROJECT = 'coreos-cloud' -class Ubuntu1404BasedGceVirtualMachine(GceVirtualMachine, - linux_vm.Ubuntu1404Mixin): - DEFAULT_IMAGE_FAMILY = 'ubuntu-1404-lts' - DEFAULT_IMAGE_PROJECT = 'ubuntu-os-cloud' - - class Ubuntu1604BasedGceVirtualMachine(GceVirtualMachine, linux_vm.Ubuntu1604Mixin): DEFAULT_IMAGE_FAMILY = 'ubuntu-1604-lts' diff --git a/perfkitbenchmarker/providers/kubernetes/kubernetes_virtual_machine.py b/perfkitbenchmarker/providers/kubernetes/kubernetes_virtual_machine.py index 5a8ee7f8d0000820195c56553a90f62f1189bef0..a86b04f9d827e2a1e09eb09c7d81e1c147d4f9e5 100644 --- a/perfkitbenchmarker/providers/kubernetes/kubernetes_virtual_machine.py +++ b/perfkitbenchmarker/providers/kubernetes/kubernetes_virtual_machine.py @@ -39,7 +39,6 @@ import six FLAGS = flags.FLAGS -UBUNTU_IMAGE = 'ubuntu-upstart' SELECTOR_PREFIX = 'pkb' @@ -335,9 +334,9 @@ class KubernetesVirtualMachine(virtual_machine.BaseVirtualMachine): return result_with_empty_values_removed -class DebianBasedKubernetesVirtualMachine(KubernetesVirtualMachine, - linux_virtual_machine.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE +class DebianBasedKubernetesVirtualMachine( + KubernetesVirtualMachine, linux_virtual_machine.BaseDebianMixin): + """Base class for Debian based containers running inside k8s.""" def RemoteHostCommandWithReturnCode(self, command, should_log=False, retries=None, @@ -536,16 +535,11 @@ def _install_sudo_command(): ]) return ['bash', '-c', container_command] - -class Ubuntu1404BasedKubernetesVirtualMachine( - DebianBasedKubernetesVirtualMachine, linux_virtual_machine.Ubuntu1404Mixin): - # All Ubuntu images below are from https://hub.docker.com/_/ubuntu/ - # Note that they do not include all packages that are typically - # included with Ubuntu. For example, sudo is not installed. - # KubernetesVirtualMachine takes care of this by installing - # sudo in the container startup script. - DEFAULT_IMAGE = 'ubuntu:14.04' - CONTAINER_COMMAND = _install_sudo_command() +# All Ubuntu images below are from https://hub.docker.com/_/ubuntu/ +# Note that they do not include all packages that are typically +# included with Ubuntu. For example, sudo is not installed. +# KubernetesVirtualMachine takes care of this by installing +# sudo in the container startup script. class Ubuntu1604BasedKubernetesVirtualMachine( diff --git a/perfkitbenchmarker/providers/mesos/mesos_docker_instance.py b/perfkitbenchmarker/providers/mesos/mesos_docker_instance.py index 58b014946d1802e3bea4a81303b20cdb0854d93b..bc8a419be9c8fbe0ca860af7b2959d039945f037 100644 --- a/perfkitbenchmarker/providers/mesos/mesos_docker_instance.py +++ b/perfkitbenchmarker/providers/mesos/mesos_docker_instance.py @@ -18,7 +18,7 @@ import logging from perfkitbenchmarker import disk from perfkitbenchmarker import flags from perfkitbenchmarker import providers -from perfkitbenchmarker import virtual_machine, linux_virtual_machine +from perfkitbenchmarker import virtual_machine from perfkitbenchmarker import vm_util from perfkitbenchmarker.configs import option_decoders from perfkitbenchmarker.providers.mesos.mesos_disk import LocalDisk @@ -245,8 +245,3 @@ class MesosDockerInstance(virtual_machine.BaseVirtualMachine): def SetupLocalDisks(self): # Do not call parent's method return - - -class DebianBasedMesosDockerInstance(MesosDockerInstance, - linux_virtual_machine.DebianMixin): - pass diff --git a/perfkitbenchmarker/providers/openstack/os_virtual_machine.py b/perfkitbenchmarker/providers/openstack/os_virtual_machine.py index 9dd0ba19467a2766227994ad876cc7fbd12a1618..a6b0b23c6596a36fc8d0dac44197c7965afe5ccb 100644 --- a/perfkitbenchmarker/providers/openstack/os_virtual_machine.py +++ b/perfkitbenchmarker/providers/openstack/os_virtual_machine.py @@ -42,7 +42,6 @@ from six.moves import range RHEL_IMAGE = 'rhel-7.2' CENTOS_IMAGE = 'centos7' -UBUNTU_IMAGE = 'ubuntu-14.04' NONE = 'None' VALIDATION_ERROR_MESSAGE = '{0} {1} could not be found.' @@ -395,11 +394,6 @@ class OpenStackVirtualMachine(virtual_machine.BaseVirtualMachine): self._CreateScratchDiskFromDisks(disk_spec, disks) -class DebianBasedOpenStackVirtualMachine(OpenStackVirtualMachine, - linux_virtual_machine.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - class RhelBasedOpenStackVirtualMachine(OpenStackVirtualMachine, linux_virtual_machine.RhelMixin): DEFAULT_IMAGE = RHEL_IMAGE diff --git a/perfkitbenchmarker/providers/profitbricks/profitbricks_virtual_machine.py b/perfkitbenchmarker/providers/profitbricks/profitbricks_virtual_machine.py index 8eda0053de26ee10fef84df4b3e4a552d98406c9..e8b344dcb6c499423539753e5a841dcfc643df61 100644 --- a/perfkitbenchmarker/providers/profitbricks/profitbricks_virtual_machine.py +++ b/perfkitbenchmarker/providers/profitbricks/profitbricks_virtual_machine.py @@ -381,17 +381,6 @@ class ProfitBricksVirtualMachine(virtual_machine.BaseVirtualMachine): disk_spec)) -class ContainerizedProfitBricksVirtualMachine( - ProfitBricksVirtualMachine, - linux_virtual_machine.ContainerizedDebianMixin): - pass - - -class DebianBasedProfitBricksVirtualMachine(ProfitBricksVirtualMachine, - linux_virtual_machine.DebianMixin): - pass - - class RhelBasedProfitBricksVirtualMachine(ProfitBricksVirtualMachine, linux_virtual_machine.RhelMixin): pass diff --git a/perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py b/perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py index f720b3c07515379b83fea8c011c643547f776843..f7430ba937e0b37074f412744151480e3c205508 100644 --- a/perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py +++ b/perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py @@ -78,7 +78,6 @@ LSBLK_REGEX = (r'NAME="(.*)"\s+MODEL="(.*)"\s+SIZE="(.*)"' r'\s+TYPE="(.*)"\s+MOUNTPOINT="(.*)"\s+LABEL="(.*)"') LSBLK_PATTERN = re.compile(LSBLK_REGEX) -UBUNTU_IMAGE = '09de0a66-3156-48b4-90a5-1cf25a905207' RHEL_IMAGE = '92f8a8b8-6019-4c27-949b-cf9910b84ffb' INSTANCE_EXISTS_STATUSES = frozenset( @@ -333,7 +332,7 @@ class RackspaceVirtualMachine(virtual_machine.BaseVirtualMachine): raise errors.VirtualMachine.VmStateError() if instance['Status'] == 'DELETED': - logging.info('VM: %s has been successfully deleted.' % self.name) + logging.info('VM: %s has been successfully deleted.', self.name) else: raise errors.Resource.RetryableDeletionError( 'VM: %s has not been deleted. Retrying to check status.' % self.name) @@ -526,11 +525,6 @@ class RackspaceVirtualMachine(virtual_machine.BaseVirtualMachine): blk_device['name'] not in self.allocated_disks) -class DebianBasedRackspaceVirtualMachine(RackspaceVirtualMachine, - linux_virtual_machine.DebianMixin): - DEFAULT_IMAGE = UBUNTU_IMAGE - - class RhelBasedRackspaceVirtualMachine(RackspaceVirtualMachine, linux_virtual_machine.RhelMixin): DEFAULT_IMAGE = RHEL_IMAGE diff --git a/perfkitbenchmarker/static_virtual_machine.py b/perfkitbenchmarker/static_virtual_machine.py index dcd129b470d234d8533cb43e4683a03237d8fafb..d9263c299f86f10ae6ef8819e627199e1ed7f27e 100644 --- a/perfkitbenchmarker/static_virtual_machine.py +++ b/perfkitbenchmarker/static_virtual_machine.py @@ -291,20 +291,15 @@ class StaticVirtualMachine(virtual_machine.BaseVirtualMachine): def GetStaticVmClass(os_type): """Returns the static VM class that corresponds to the os_type.""" if not os_type: - logging.warning('Could not find os type for VM. Defaulting to debian.') - os_type = os_types.DEBIAN + os_type = os_types.DEFAULT + logging.warning('Could not find os type for VM. Defaulting to %s.', os_type) return resource.GetResourceClass(virtual_machine.BaseVirtualMachine, CLOUD=StaticVirtualMachine.CLOUD, OS_TYPE=os_type) -class ContainerizedStaticVirtualMachine( - StaticVirtualMachine, linux_virtual_machine.ContainerizedDebianMixin): - pass - - -class DebianBasedStaticVirtualMachine(StaticVirtualMachine, - linux_virtual_machine.DebianMixin): +class Ubuntu1604BasedStaticVirtualMachine( + StaticVirtualMachine, linux_virtual_machine.Ubuntu1604Mixin): pass diff --git a/tests/aws_test.py b/tests/aws_test.py index 4a2d3d7a1fb9b64396f8ce7f841686132f928a03..5789ddebf62f5108ef7bdfb2a754892d83e4d814 100644 --- a/tests/aws_test.py +++ b/tests/aws_test.py @@ -26,7 +26,6 @@ from perfkitbenchmarker import benchmark_spec from perfkitbenchmarker import context from perfkitbenchmarker import errors from perfkitbenchmarker import flags -from perfkitbenchmarker import os_types from perfkitbenchmarker import providers from perfkitbenchmarker import vm_util from perfkitbenchmarker.configs import benchmark_config_spec @@ -252,7 +251,6 @@ class AwsVirtualMachineTestCase(pkb_common_test_case.PkbCommonTestCase): def setUp(self): super(AwsVirtualMachineTestCase, self).setUp() FLAGS.cloud = providers.AWS - FLAGS.os_type = os_types.DEBIAN FLAGS.run_uri = 'aaaaaa' FLAGS.temp_dir = 'tmp' p = mock.patch('perfkitbenchmarker.providers.aws.' diff --git a/tests/background_cpu_test.py b/tests/background_cpu_test.py index 0d0f0eb48b5a6c36e7ba427fdde65b53294b35d7..e930e6fba917eca2ca0e97d64ba49f1780b218db 100644 --- a/tests/background_cpu_test.py +++ b/tests/background_cpu_test.py @@ -67,7 +67,6 @@ class TestBackgroundWorkload(pkb_common_test_case.PkbCommonTestCase): super(TestBackgroundWorkload, self).setUp() FLAGS.run_uri = 'fake_run_uri' FLAGS.cloud = providers.GCP - FLAGS.os_type = os_types.DEBIAN FLAGS.temp_dir = 'tmp' p = patch(util.__name__ + '.GetDefaultProject') diff --git a/tests/background_network_workload_test.py b/tests/background_network_workload_test.py index 22a43b211d19b4abfa24b4ab9035ce92b1bbdaaf..93906c30df6746480925be501416444c3e559912 100644 --- a/tests/background_network_workload_test.py +++ b/tests/background_network_workload_test.py @@ -100,7 +100,6 @@ class TestBackgroundNetworkWorkload(pkb_common_test_case.PkbCommonTestCase): def setUp(self): super(TestBackgroundNetworkWorkload, self).setUp() - FLAGS.os_type = os_types.DEBIAN FLAGS.cloud = providers.GCP FLAGS.temp_dir = 'tmp' p = patch(util.__name__ + '.GetDefaultProject') diff --git a/tests/background_workload_framework_test.py b/tests/background_workload_framework_test.py index 079d29ef508c63ec8119c41a57b3ab470641d9da..4215bb55f1c51e653ebda28c2cd20bc504d4764f 100644 --- a/tests/background_workload_framework_test.py +++ b/tests/background_workload_framework_test.py @@ -23,7 +23,6 @@ from perfkitbenchmarker import benchmark_spec from perfkitbenchmarker import configs from perfkitbenchmarker import context from perfkitbenchmarker import flags -from perfkitbenchmarker import os_types from perfkitbenchmarker import pkb from perfkitbenchmarker import providers from perfkitbenchmarker import timing_util @@ -43,7 +42,6 @@ class TestBackgroundWorkloadFramework(pkb_common_test_case.PkbCommonTestCase): def setUp(self): self.last_call = 0 super(TestBackgroundWorkloadFramework, self).setUp() - FLAGS.os_type = os_types.DEBIAN FLAGS.cloud = providers.GCP FLAGS.temp_dir = 'tmp' self.addCleanup(context.SetThreadBenchmarkSpec, None) diff --git a/tests/benchmark_spec_test.py b/tests/benchmark_spec_test.py index cc16c1b4ca78dfde094f0c42375faac1d6f3cfdf..3a78035267d926a2efadc24324a4f34c7a9640b8 100644 --- a/tests/benchmark_spec_test.py +++ b/tests/benchmark_spec_test.py @@ -21,7 +21,6 @@ from perfkitbenchmarker import configs from perfkitbenchmarker import context from perfkitbenchmarker import flags from perfkitbenchmarker import linux_benchmarks -from perfkitbenchmarker import os_types from perfkitbenchmarker import pkb # pylint: disable=unused-import # noqa from perfkitbenchmarker import providers from perfkitbenchmarker import static_virtual_machine as static_vm @@ -109,7 +108,6 @@ class _BenchmarkSpecTestCase(pkb_common_test_case.PkbCommonTestCase): def setUp(self): super(_BenchmarkSpecTestCase, self).setUp() FLAGS.cloud = providers.GCP - FLAGS.os_type = os_types.DEBIAN FLAGS.temp_dir = 'tmp' p = mock.patch(util.__name__ + '.GetDefaultProject') p.start() diff --git a/tests/configs/benchmark_config_spec_test.py b/tests/configs/benchmark_config_spec_test.py index 11e865cce7f36e904e2a7f5eb4d735e2a72ea6d4..7a848094126d6b24a2bd4f930c45fb152afaa69c 100644 --- a/tests/configs/benchmark_config_spec_test.py +++ b/tests/configs/benchmark_config_spec_test.py @@ -170,7 +170,7 @@ class VmGroupSpecTestCase(pkb_common_test_case.PkbCommonTestCase): def setUp(self): super(VmGroupSpecTestCase, self).setUp() self._spec_class = benchmark_config_spec._VmGroupSpec - self._kwargs = {'cloud': providers.GCP, 'os_type': os_types.DEBIAN, + self._kwargs = {'cloud': providers.GCP, 'os_type': os_types.UBUNTU1804, 'vm_spec': _GCP_AWS_VM_CONFIG} def testMissingValues(self): @@ -186,7 +186,7 @@ class VmGroupSpecTestCase(pkb_common_test_case.PkbCommonTestCase): self.assertEqual(result.cloud, 'GCP') self.assertEqual(result.disk_count, 1) self.assertIsNone(result.disk_spec) - self.assertEqual(result.os_type, 'debian') + self.assertEqual(result.os_type, 'ubuntu1804') self.assertEqual(result.static_vms, []) self.assertEqual(result.vm_count, 1) self.assertIsInstance(result.vm_spec, gce_virtual_machine.GceVmSpec) @@ -272,19 +272,28 @@ class VmGroupSpecTestCase(pkb_common_test_case.PkbCommonTestCase): def testMissingCloudDiskConfig(self): with self.assertRaises(errors.Config.MissingOption) as cm: - self._spec_class(_COMPONENT, cloud=providers.GCP, os_type=os_types.DEBIAN, - disk_spec={}, vm_spec=_GCP_AWS_VM_CONFIG) - self.assertEqual(str(cm.exception), ( - 'test_component.cloud is "GCP", but test_component.disk_spec does not ' - 'contain a configuration for "GCP".')) + self._spec_class( + _COMPONENT, + cloud=providers.GCP, + os_type=os_types.UBUNTU1804, + disk_spec={}, + vm_spec=_GCP_AWS_VM_CONFIG) + self.assertEqual( + str(cm.exception), + ('test_component.cloud is "GCP", but test_component.disk_spec does not ' + 'contain a configuration for "GCP".')) def testMissingCloudVmConfig(self): with self.assertRaises(errors.Config.MissingOption) as cm: - self._spec_class(_COMPONENT, cloud=providers.GCP, os_type=os_types.DEBIAN, - vm_spec={}) - self.assertEqual(str(cm.exception), ( - 'test_component.cloud is "GCP", but test_component.vm_spec does not ' - 'contain a configuration for "GCP".')) + self._spec_class( + _COMPONENT, + cloud=providers.GCP, + os_type=os_types.UBUNTU1804, + vm_spec={}) + self.assertEqual( + str(cm.exception), + ('test_component.cloud is "GCP", but test_component.vm_spec does not ' + 'contain a configuration for "GCP".')) def createNonPresentFlags(self): FLAGS.cloud = providers.AWS @@ -319,7 +328,7 @@ class VmGroupSpecTestCase(pkb_common_test_case.PkbCommonTestCase): _COMPONENT, flag_values=self.createNonPresentFlags(), vm_count=2, **self._kwargs) self.assertEqual(result.cloud, 'GCP') - self.assertEqual(result.os_type, 'debian') + self.assertEqual(result.os_type, 'ubuntu1804') self.assertEqual(result.vm_count, 2) def testVmCountNone(self): @@ -355,20 +364,20 @@ class VmGroupsDecoderTestCase(pkb_common_test_case.PkbCommonTestCase): def testValidInput(self): result = self._decoder.Decode({ - 'default': {'cloud': providers.GCP, 'os_type': os_types.DEBIAN, + 'default': {'cloud': providers.GCP, 'os_type': os_types.UBUNTU1804, 'vm_spec': _GCP_AWS_VM_CONFIG}}, _COMPONENT, {}) self.assertIsInstance(result, dict) self.assertEqual(len(result), 1) self.assertIsInstance(result['default'], benchmark_config_spec._VmGroupSpec) self.assertEqual(result['default'].cloud, 'GCP') - self.assertEqual(result['default'].os_type, 'debian') + self.assertEqual(result['default'].os_type, 'ubuntu1804') self.assertIsInstance(result['default'].vm_spec, gce_virtual_machine.GceVmSpec) def testInvalidInput(self): with self.assertRaises(errors.Config.UnrecognizedOption) as cm: self._decoder.Decode( - {'default': {'cloud': providers.GCP, 'os_type': os_types.DEBIAN, + {'default': {'cloud': providers.GCP, 'os_type': os_types.UBUNTU1804, 'static_vms': [{}, {'fake_option': 1.2}], 'vm_spec': _GCP_AWS_VM_CONFIG}}, _COMPONENT, {}) @@ -430,7 +439,7 @@ class BenchmarkConfigSpecTestCase(pkb_common_test_case.PkbCommonTestCase): self._spec_class = benchmark_config_spec.BenchmarkConfigSpec self._description = 'Test description.' self._vm_groups = {'default': {'cloud': providers.GCP, - 'os_type': os_types.DEBIAN, + 'os_type': os_types.UBUNTU1804, 'vm_spec': _GCP_AWS_VM_CONFIG}} self._kwargs = {'description': self._description, 'vm_groups': self._vm_groups} @@ -445,7 +454,7 @@ class BenchmarkConfigSpecTestCase(pkb_common_test_case.PkbCommonTestCase): self.assertIsInstance(result.vm_groups['default'], benchmark_config_spec._VmGroupSpec) self.assertEqual(result.vm_groups['default'].cloud, 'GCP') - self.assertEqual(result.vm_groups['default'].os_type, 'debian') + self.assertEqual(result.vm_groups['default'].os_type, 'ubuntu1804') self.assertIsInstance(result.vm_groups['default'].vm_spec, gce_virtual_machine.GceVmSpec) @@ -462,7 +471,7 @@ class BenchmarkConfigSpecTestCase(pkb_common_test_case.PkbCommonTestCase): def testMismatchedOsTypes(self): self._kwargs['vm_groups'] = { os_type + '_group': {'os_type': os_type, 'vm_spec': _GCP_AWS_VM_CONFIG} - for os_type in (os_types.DEBIAN, os_types.RHEL, os_types.WINDOWS)} + for os_type in (os_types.UBUNTU1804, os_types.RHEL, os_types.WINDOWS)} expected_os_types = os_types.JUJU, os_types.WINDOWS with self.assertRaises(errors.Config.InvalidValue) as cm: self._spec_class( @@ -473,9 +482,9 @@ class BenchmarkConfigSpecTestCase(pkb_common_test_case.PkbCommonTestCase): self.assertEqual(str(cm.exception), ( "VM groups in test_component may only have the following OS types: " "'juju', 'windows'. The following VM group options are invalid:{sep}" - "test_component.vm_groups['debian_group'].os_type: 'debian'{sep}" - "test_component.vm_groups['rhel_group'].os_type: 'rhel'".format( - sep=os.linesep))) + "test_component.vm_groups['rhel_group'].os_type: 'rhel'{sep}" + "test_component.vm_groups['ubuntu1804_group'].os_type: 'ubuntu1804'" + .format(sep=os.linesep))) def testFlagOverridesPropagate(self): self._kwargs['flags'] = {'cloud': providers.AWS, @@ -492,7 +501,7 @@ class BenchmarkConfigSpecTestCase(pkb_common_test_case.PkbCommonTestCase): self.assertIsInstance(result.vm_groups['default'], benchmark_config_spec._VmGroupSpec) self.assertEqual(result.vm_groups['default'].cloud, 'AWS') - self.assertEqual(result.vm_groups['default'].os_type, 'debian') + self.assertEqual(result.vm_groups['default'].os_type, 'ubuntu1804') self.assertIsInstance(result.vm_groups['default'].vm_spec, virtual_machine.BaseVmSpec) diff --git a/tests/disk_metadata_test.py b/tests/disk_metadata_test.py index 4d360a7ed00a2f04db5b081f2b236966b56de95f..206358039644f01841a935e99d8f6f8d92dd6f20 100644 --- a/tests/disk_metadata_test.py +++ b/tests/disk_metadata_test.py @@ -75,8 +75,7 @@ class AwsDiskMetadataTest(_DiskMetadataTestCase): vm_spec = aws_virtual_machine.AwsVmSpec( 'test_vm_spec.AWS', zone='us-east-1a', machine_type=machine_type) - vm = aws_virtual_machine.DebianBasedAwsVirtualMachine( - vm_spec) + vm = aws_virtual_machine.Ubuntu1804BasedAwsVirtualMachine(vm_spec) vm.CreateScratchDisk(disk_spec) @@ -114,8 +113,7 @@ class AzureDiskMetadataTest(_DiskMetadataTestCase): vm_spec = azure_virtual_machine.AzureVmSpec( 'test_vm_spec.AZURE', zone='eastus2', machine_type=machine_type) - vm = azure_virtual_machine.DebianBasedAzureVirtualMachine( - vm_spec) + vm = azure_virtual_machine.Ubuntu1604BasedAzureVirtualMachine(vm_spec) azure_disk.AzureDisk.Create = mock.Mock() azure_disk.AzureDisk.Attach = mock.Mock() diff --git a/tests/gce_virtual_machine_test.py b/tests/gce_virtual_machine_test.py index 6fd5320ae03da6014b5ca53709a8b3e31a60b0a9..46c2744849c5f3109c4a791bae2c1cf7345ef4ad 100644 --- a/tests/gce_virtual_machine_test.py +++ b/tests/gce_virtual_machine_test.py @@ -267,44 +267,6 @@ class GceVirtualMachineOsTypesTestCase(pkb_common_test_case.PkbCommonTestCase): fake_rets.append((json.dumps(_CreateFakeDiskMetadata(fake_image)), '', 0)) return fake_rets - def testCreateDebian(self): - vm_class = virtual_machine.GetVmClass(providers.GCP, os_types.DEBIAN) - with PatchCriticalObjects(self._CreateFakeReturnValues()) as issue_command: - vm = vm_class(self.spec) - vm._Create() - vm.created = True - command_string = ' '.join(issue_command.call_args[0][0]) - - self.assertEqual(issue_command.call_count, 1) - self.assertIn('gcloud compute instances create', command_string) - self.assertIn('--image ubuntu-14-04', command_string) - vm._PostCreate() - self.assertEqual(issue_command.call_count, 2) - self.assertDictContainsSubset({'image': 'ubuntu-14-04'}, - vm.GetResourceMetadata()) - - def testCreateUbuntu1404(self): - vm_class = virtual_machine.GetVmClass(providers.GCP, os_types.UBUNTU1404) - fake_image = 'fake-ubuntu1404' - with PatchCriticalObjects( - self._CreateFakeReturnValues(fake_image)) as issue_command: - vm = vm_class(self.spec) - vm._Create() - vm.created = True - command_string = ' '.join(issue_command.call_args[0][0]) - - self.assertEqual(issue_command.call_count, 1) - self.assertIn('gcloud compute instances create', command_string) - self.assertIn( - '--image-family ubuntu-1404-lts --image-project ubuntu-os-cloud', - command_string) - vm._PostCreate() - self.assertEqual(issue_command.call_count, 3) - self.assertDictContainsSubset({'image': fake_image, - 'image_family': 'ubuntu-1404-lts', - 'image_project': 'ubuntu-os-cloud'}, - vm.GetResourceMetadata()) - def testCreateUbuntu1604(self): vm_class = virtual_machine.GetVmClass(providers.GCP, os_types.UBUNTU1604) fake_image = 'fake-ubuntu1604' @@ -406,7 +368,6 @@ class GCEVMFlagsTestCase(pkb_common_test_case.PkbCommonTestCase): super(GCEVMFlagsTestCase, self).setUp() FLAGS.cloud = providers.GCP FLAGS.gcloud_path = 'test_gcloud' - FLAGS.os_type = os_types.DEBIAN FLAGS.run_uri = 'aaaaaa' FLAGS.gcp_instance_metadata = [] FLAGS.gcp_instance_metadata_from_file = [] diff --git a/tests/linux_packages/speccpu_test.py b/tests/linux_packages/speccpu_test.py index db644e83904292b1de267113e0a738e273b229b5..4bbde379a0206cdd9cbe97a1b05de50d8460abf3 100644 --- a/tests/linux_packages/speccpu_test.py +++ b/tests/linux_packages/speccpu_test.py @@ -413,7 +413,7 @@ class Speccpu2006BenchmarkTestCase(unittest.TestCase, test_util.SamplesTestMixin): def testParseResultsC(self): - vm = mock.Mock(vm=linux_virtual_machine.DebianMixin) + vm = mock.Mock(vm=linux_virtual_machine.Ubuntu1604Mixin) spec_test_config = speccpu.SpecInstallConfigurations() spec_test_config.benchmark_name = 'speccpu2006' spec_test_config.log_format = r'Est. (SPEC.*_base2006)\s*(\S*)' @@ -455,7 +455,7 @@ class Speccpu2006BenchmarkTestCase(unittest.TestCase, def testParseSpeedResults(self): speccpu.FLAGS.spec_runmode = 'base' - vm = mock.Mock(vm=linux_virtual_machine.DebianMixin) + vm = mock.Mock(vm=linux_virtual_machine.Ubuntu1604Mixin) spec_test_config = speccpu.SpecInstallConfigurations() spec_test_config.benchmark_name = 'speccpu2006' spec_test_config.log_format = r'Est. (SPEC.*_base2006)\s*(\S*)' @@ -468,7 +468,7 @@ class Speccpu2006BenchmarkTestCase(unittest.TestCase, def testParseAllResults(self): speccpu.FLAGS.spec_runmode = 'all' - vm = mock.Mock(vm=linux_virtual_machine.DebianMixin) + vm = mock.Mock(vm=linux_virtual_machine.Ubuntu1604Mixin) spec_test_config = speccpu.SpecInstallConfigurations() spec_test_config.benchmark_name = 'speccpu2017' spec_test_config.log_format = r'Est. (SPEC.*2017_.*_base)\s*(\S*)' @@ -481,7 +481,7 @@ class Speccpu2006BenchmarkTestCase(unittest.TestCase, def testParsePeakResults(self): speccpu.FLAGS.spec_runmode = 'peak' - vm = mock.Mock(vm=linux_virtual_machine.DebianMixin) + vm = mock.Mock(vm=linux_virtual_machine.Ubuntu1604Mixin) spec_test_config = speccpu.SpecInstallConfigurations() spec_test_config.benchmark_name = 'speccpu2017' spec_test_config.log_format = r'Est. (SPEC.*2017_.*_base)\s*(\S*)' @@ -494,7 +494,7 @@ class Speccpu2006BenchmarkTestCase(unittest.TestCase, def testParsePartialPeakResults(self): speccpu.FLAGS.spec_runmode = 'peak' - vm = mock.Mock(vm=linux_virtual_machine.DebianMixin) + vm = mock.Mock(vm=linux_virtual_machine.Ubuntu1604Mixin) spec_test_config = speccpu.SpecInstallConfigurations() spec_test_config.benchmark_name = 'speccpu2017' spec_test_config.log_format = r'Est. (SPEC.*2017_.*_base)\s*(\S*)' diff --git a/tests/providers/aws/aws_capacity_reservation_test.py b/tests/providers/aws/aws_capacity_reservation_test.py index 9b62f08a48acc16ba85768d59d7c34cdfa5bd9ba..03bbe3fef8264a4177130307c902567ae424ab17 100644 --- a/tests/providers/aws/aws_capacity_reservation_test.py +++ b/tests/providers/aws/aws_capacity_reservation_test.py @@ -47,7 +47,7 @@ class FakeAwsVirtualMachine(object): self.zone = 'us-west-1' self.region = 'us-west-1' self.machine_type = 'fake_machine_type' - self.OS_TYPE = 'debian' # pylint: disable=invalid-name + self.OS_TYPE = 'ubuntu1804' # pylint: disable=invalid-name self.network = mock.MagicMock() diff --git a/tests/providers/kubernetes/kubernetes_virtual_machine_test.py b/tests/providers/kubernetes/kubernetes_virtual_machine_test.py index b836ec42d6d3a90944d399cbcb13e622f5883061..031a939709b4bda95d4c6f8474d7138454b4ef4a 100644 --- a/tests/providers/kubernetes/kubernetes_virtual_machine_test.py +++ b/tests/providers/kubernetes/kubernetes_virtual_machine_test.py @@ -261,7 +261,7 @@ class KubernetesVirtualMachineOsTypesTestCase( def testUbuntuImagesInstallSudo(self): with patch_critical_objects() as (_, temp_file): - self.create_kubernetes_vm(os_types.UBUNTU1404) + self.create_kubernetes_vm(os_types.UBUNTU1604) write_mock = get_write_mock_from_temp_file_mock(temp_file) create_json = json.loads(write_mock.call_args[0][0]) @@ -273,15 +273,6 @@ class KubernetesVirtualMachineOsTypesTestCase( 'sed -i \'/secure_path/d\' /etc/sudoers && ' 'sudo ldconfig && tail -f /dev/null')]) - def testCreateUbuntu1404(self): - with patch_critical_objects() as (_, temp_file): - self.create_kubernetes_vm(os_types.UBUNTU1404) - - write_mock = get_write_mock_from_temp_file_mock(temp_file) - create_json = json.loads(write_mock.call_args[0][0]) - self.assertEqual(create_json['spec']['containers'][0]['image'], - 'ubuntu:14.04') - def testCreateUbuntu1604(self): with patch_critical_objects() as (_, temp_file): self.create_kubernetes_vm(os_types.UBUNTU1604) @@ -350,7 +341,8 @@ class KubernetesVirtualMachineTestCase( FLAGS.container_cluster_cloud = 'AWS' with patch_critical_objects(flags=FLAGS) as (issue_command, _): kub_vm = ( - kubernetes_virtual_machine.DebianBasedKubernetesVirtualMachine(spec)) + kubernetes_virtual_machine.Ubuntu1604BasedKubernetesVirtualMachine( + spec)) kub_vm.DownloadPreprovisionedData('path', 'name', 'filename') command = issue_command.call_args[0][0] @@ -362,7 +354,8 @@ class KubernetesVirtualMachineTestCase( FLAGS.container_cluster_cloud = 'Azure' with patch_critical_objects() as (issue_command, _): kub_vm = ( - kubernetes_virtual_machine.DebianBasedKubernetesVirtualMachine(spec)) + kubernetes_virtual_machine.Ubuntu1604BasedKubernetesVirtualMachine( + spec)) kub_vm.DownloadPreprovisionedData('path', 'name', 'filename') command = issue_command.call_args[0][0] @@ -374,7 +367,8 @@ class KubernetesVirtualMachineTestCase( FLAGS.container_cluster_cloud = 'GCP' with patch_critical_objects() as (issue_command, _): kub_vm = ( - kubernetes_virtual_machine.DebianBasedKubernetesVirtualMachine(spec)) + kubernetes_virtual_machine.Ubuntu1604BasedKubernetesVirtualMachine( + spec)) kub_vm.DownloadPreprovisionedData('path', 'name', 'filename') command = issue_command.call_args[0][0] diff --git a/tests/providers_test.py b/tests/providers_test.py index ce5ed4e6d448e046b1bce9cb835c3683743b6c05..54270fb42848df07c517dbc8e2f8257a426cb745 100644 --- a/tests/providers_test.py +++ b/tests/providers_test.py @@ -69,7 +69,7 @@ class LoadProvidersTestCase(pkb_common_test_case.PkbCommonTestCase): 'vm_groups': { 'group1': { 'cloud': 'AWS', - 'os_type': 'debian', + 'os_type': 'ubuntu1804', 'vm_count': 0, 'vm_spec': {'AWS': {}} } diff --git a/tests/scratch_disk_test.py b/tests/scratch_disk_test.py index e41eb433f8a1ecce0d8483c18ae2786556ab30f0..fea4a42f155f84bfb11bea9a549522ae34fff75c 100644 --- a/tests/scratch_disk_test.py +++ b/tests/scratch_disk_test.py @@ -156,7 +156,7 @@ class AzureScratchDiskTest(ScratchDiskTestMixin, unittest.TestCase): def _CreateVm(self): vm_spec = azure_virtual_machine.AzureVmSpec( 'test_vm_spec.Azure', zone='eastus2', machine_type='test_machine_type') - return azure_virtual_machine.DebianBasedAzureVirtualMachine(vm_spec) + return azure_virtual_machine.Ubuntu1604BasedAzureVirtualMachine(vm_spec) def _GetDiskClass(self): return azure_disk.AzureDisk @@ -170,7 +170,7 @@ class GceScratchDiskTest(ScratchDiskTestMixin, unittest.TestCase): def _CreateVm(self): vm_spec = gce_virtual_machine.GceVmSpec('test_vm_spec.GCP', machine_type='test_machine_type') - return gce_virtual_machine.DebianBasedGceVirtualMachine(vm_spec) + return gce_virtual_machine.Ubuntu1604BasedGceVirtualMachine(vm_spec) def _GetDiskClass(self): return gce_disk.GceDisk @@ -191,7 +191,7 @@ class AwsScratchDiskTest(ScratchDiskTestMixin, unittest.TestCase): vm_spec = aws_virtual_machine.AwsVmSpec('test_vm_spec.AWS', zone='us-east-1a', machine_type='test_machine_type') - return aws_virtual_machine.DebianBasedAwsVirtualMachine(vm_spec) + return aws_virtual_machine.Ubuntu1604BasedAwsVirtualMachine(vm_spec) def _GetDiskClass(self): return aws_disk.AwsDisk diff --git a/tests/static_virtual_machine_test.py b/tests/static_virtual_machine_test.py index 4df48239add5b7f837986155f93c66a229ae7bf5..81e61b5bb59a2633e0ef891ab394ca9ffa1458ed 100644 --- a/tests/static_virtual_machine_test.py +++ b/tests/static_virtual_machine_test.py @@ -72,7 +72,6 @@ class StaticVirtualMachineTest(pkb_common_test_case.PkbCommonTestCase): p.start() self.addCleanup(p.stop) FLAGS.image = 'test_image' - FLAGS.os_type = 'debian' def tearDown(self): super(StaticVirtualMachineTest, self).tearDown() diff --git a/tools/docker_images/Dockerfile b/tools/docker_images/Dockerfile index 0954a8065fe0d2fe4a4e4ebf2bf00cc715ec128c..60054887bec16811b88bd6e749e022bc1667af53 100644 --- a/tools/docker_images/Dockerfile +++ b/tools/docker_images/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:trusty +FROM ubuntu:xenial RUN apt-get update && apt-get install -y ssh RUN mkdir /var/run/sshd ;\