Skip to content

[BUG-NOK] Open Edge Orchestrator- Hardcoded region "us-west-2" in the installer scripts #1107

@Amithpn

Description

@Amithpn

Bug Description

After we unpack the cloud installer package, few scripts have hardcoded region "us-west-2". This will block user to install orchestrator other than us-west-2 region. Also, region variable not picking the correct region for buckets in the file pod-configs/buckets/provider.tf.

After making above changes, finally installer is failing with below error:
`**Warning: Value for undeclared variable

The root module does not declare a variable named "enable_pull_through_cache_proxy" but a value was found in file
"/root/pod-configs/orchestrator/cluster/environments/prod2/variable.tfvar". If you meant to use this value, add a "variable" block to the configuration.

To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations in your organization. To reduce
the verbosity of these warnings, use the -compact-warnings option.

Warning: Argument is deprecated

with module.ec2log[0].aws_s3_bucket.logs,
on ../../module/ec2log/save-log.tf line 103, in resource "aws_s3_bucket" "logs":
103: resource "aws_s3_bucket" "logs" {

lifecycle_rule is deprecated. Use the aws_s3_bucket_lifecycle_configuration resource instead.

(and 6 more similar warnings elsewhere)

Warning: Invalid Attribute Combination

with module.s3.aws_s3_bucket_lifecycle_configuration.bucket_config,
on ../../module/s3/main.tf line 97, in resource "aws_s3_bucket_lifecycle_configuration" "bucket_config":
97: rule {

No attribute specified when one (and only one) of [rule[0].prefix.<.filter] is required

This will be an error in a future version of the provider

(and 11 more similar warnings elsewhere)

Error: creating RDS Cluster (prod2-aurora-postgresql): operation error RDS: CreateDBCluster, https response error StatusCode: 400, RequestID: c1ca6e98-429b-41c4-97a6-b483578f85bf, api error InvalidParameterCombination: Cannot find version 14.9 for aurora-postgresql

with module.aurora.aws_rds_cluster.main,
on ../../module/aurora/main.tf line 32, in resource "aws_rds_cluster" "main":
32: resource "aws_rds_cluster" "main" {

orchestrator-admin:pod-configs$**`

Fix suggested was to export the below variable in the container:
export TF_VAR_aurora_postgres_ver_minor=17

System Setup

Open Edge Orchestrator 3.1.3

Reproducible Steps

After we unpack the cloud installer package, few scripts have hardcoded region "us-west-2". This will block user to install orchestrator other than us-west-2 region. Also, region variable not picking the correct region for buckets in the file pod-configs/buckets/provider.tf.

Root Cause Analysis

Files mentioned below has the region "us-west-2" hardcoded. It should have been read from env variable AWS_REGION instead of hardcoded value. This will block users from using region other than the us-west-2.

https://github.com/open-edge-platform/edge-manageability-framework/blob/main/pod-configs/utils/provision.sh : Line#13
https://github.com/open-edge-platform/edge-manageability-framework/blob/main/pod-configs/buckets/provider.tf : Line#16 to 23
https://github.com/open-edge-platform/edge-manageability-framework/blob/main/installer/update-cluster.sh : Line#10
https://github.com/open-edge-platform/edge-manageability-framework/blob/main/installer/configure-cluster.sh : Line#10
https://github.com/open-edge-platform/edge-manageability-framework/blob/main/installer/prepare-upgrade.sh : Line#10
https://github.com/open-edge-platform/edge-manageability-framework/blob/main/installer/start-tunnel.sh : Line#61

Screenshots for reference:

  1. pod-configs/utils/provision.sh
Image
  1. pod-configs/buckets/provider.tf
Image

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions