Skip to content

Commit

Permalink
Deprecate AL1 and Ubuntu16: address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Rex <[email protected]>
  • Loading branch information
rexcsn committed Mar 22, 2021
1 parent 8f8470d commit 6f8e978
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion cli/src/pcluster/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import pcluster.configure.easyconfig as easyconfig
import pcluster.createami as createami
import pcluster.utils as utils
from pcluster.constants import SUPPORTED_OSS
from pcluster.dcv.connect import dcv_connect

LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -360,7 +361,7 @@ def _get_parser():
"--os",
dest="base_ami_os",
required=True,
help="Specifies the OS of the base AMI. " "Valid options are: alinux2, ubuntu1804, centos7, centos8.",
help="Specifies the OS of the base AMI. " "Valid options are: %s." % ", ".join(SUPPORTED_OSS),
)
pami.add_argument(
"-i",
Expand Down
10 changes: 8 additions & 2 deletions cli/src/pcluster/config/mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@
tags_validator,
url_validator,
)
from pcluster.constants import CIDR_ALL_IPS, FSX_HDD_THROUGHPUT, FSX_SSD_THROUGHPUT, SUPPORTED_ARCHITECTURES
from pcluster.constants import (
CIDR_ALL_IPS,
FSX_HDD_THROUGHPUT,
FSX_SSD_THROUGHPUT,
SUPPORTED_ARCHITECTURES,
SUPPORTED_OSS,
)

CLUSTER_COMMON_VALIDATORS = [duplicate_shared_dir_validator, region_validator]
# This file contains a definition of all the sections and the parameters configurable by the user
Expand Down Expand Up @@ -811,7 +817,7 @@
("base_os", {
"type": BaseOSCfnParam,
"cfn_param_mapping": "BaseOS",
"allowed_values": ["alinux2", "ubuntu1804", "centos7", "centos8"],
"allowed_values": SUPPORTED_OSS,
"validators": [architecture_os_validator],
"required": True,
"update_policy": UpdatePolicy.UNSUPPORTED
Expand Down
4 changes: 2 additions & 2 deletions cli/src/pcluster/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import boto3
from botocore.exceptions import ClientError, ParamValidationError

from pcluster.constants import CIDR_ALL_IPS, FSX_HDD_THROUGHPUT, FSX_SSD_THROUGHPUT
from pcluster.constants import CIDR_ALL_IPS, FSX_HDD_THROUGHPUT, FSX_SSD_THROUGHPUT, SUPPORTED_OSS
from pcluster.dcv.utils import get_supported_dcv_os
from pcluster.utils import (
InstanceTypeInfo,
Expand Down Expand Up @@ -90,7 +90,7 @@
}

FSX_SUPPORTED_ARCHITECTURES_OSES = {
"x86_64": ["centos7", "centos8", "ubuntu1804", "alinux2"],
"x86_64": SUPPORTED_OSS,
"arm64": ["ubuntu1804", "alinux2", "centos8"],
}

Expand Down
1 change: 1 addition & 0 deletions cli/src/pcluster/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
SUPPORTED_ARCHITECTURES = ["x86_64", "arm64"]
FSX_SSD_THROUGHPUT = [50, 100, 200]
FSX_HDD_THROUGHPUT = [12, 40]
SUPPORTED_OSS = ["alinux2", "ubuntu1804", "centos7", "centos8"]
3 changes: 2 additions & 1 deletion cli/src/pcluster/dcv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and
# limitations under the License.

from pcluster.constants import SUPPORTED_OSS

DCV_CONNECT_SCRIPT = "/opt/parallelcluster/scripts/pcluster_dcv_connect.sh"


def get_supported_dcv_os(architecture):
"""Return a list of all the operating system supported by DCV."""
architectures_dict = {
"x86_64": ["centos7", "centos8", "ubuntu1804", "alinux2"],
"x86_64": SUPPORTED_OSS,
"arm64": ["ubuntu1804", "alinux2", "centos8"],
}
return architectures_dict.get(architecture, [])
2 changes: 1 addition & 1 deletion tests/integration-tests/configs/common/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ disable_hyperthreading:
test_disable_hyperthreading.py::test_sit_disable_hyperthreading:
dimensions:
# Manually disabled HT
{%- for os, scheduler in [("centos8", "torque"), ("ubuntu1804", "sge")] %}
{%- for os, scheduler in [("centos7", "torque"), ("ubuntu1804", "sge")] %}
- regions: ["sa-east-1"]
instances: ["m4.xlarge"]
oss: ["{{ os }}"]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests/configs/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test-suites:
runtime_bake:
test_runtime_bake.py::test_runtime_bake: # These are currently skipped
dimensions:
{%- for os, scheduler in [("alinux2", "torque"), ("centos7", "sge")] %}
{%- for os, scheduler in [("alinux2", "slurm"), ("alinux2", "torque"), ("centos7", "sge")] %}
- regions: ["eu-west-2"]
instances: {{ common.INSTANCES_DEFAULT_X86 }}
oss: ["{{ os }}"]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration-tests/configs/new_region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ test-suites:
dimensions:
- regions: {{ NEW_REGION }}
instances: {{ common.INSTANCES_DEFAULT_X86 }}
oss: ["alinux"]
oss: ["alinux2"]
schedulers: ["slurm"]
test_efs.py::test_efs_compute_az:
dimensions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _base_os_to_platform(base_os):
"""Turn the name of a base OS into the platform."""
# Special case: alinux2 is how the config file refers to amazon linux 2, but in the chef cookbook
# (and the cloudwatch log config produced by it) the platform is "amazon".
translations = {"alinux": "amazon"}
translations = {"alinux2": "amazon"}
no_digits = base_os.rstrip(string.digits)
return translations.get(no_digits, no_digits)

Expand Down

0 comments on commit 6f8e978

Please sign in to comment.