Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRS] The v2 job API cannot be accessed #913

Open
dmicheneau opened this issue Jan 20, 2023 · 3 comments
Open

[MRS] The v2 job API cannot be accessed #913

dmicheneau opened this issue Jan 20, 2023 · 3 comments

Comments

@dmicheneau
Copy link

dmicheneau commented Jan 20, 2023

Terraform Version

Terraform v1.3.7
TERRAFORM_PROVIDER_VERSION = 1.36.0

Affected Resource(s)

  • flexibleengine_mrs_job_v2

Terraform Configuration Files

"resource": {
        "flexibleengine_mrs_job_v2": {
            "example-mrs-job": {
                "cluster_id": "xxxxxxxxxxx",
                "lifecycle": {
                    "prevent_destroy": true
                },
                "name": "example-mrs-job",
                "parameters": "admin xxxxxxxx 1 s3a://obs-demo-analysis/input s3a://obs-demo-analysis/output",
                "program_parameters": {
                    "--class": "com.orange.bigdata.spark.examples.DriverBehavior"
                },
                "program_path": "s3a://obs-demo-analysis/program/driver_behavior.jar",
                "type": "SparkSubmit"
            }
        }
    }

Panic Output

terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # flexibleengine_mrs_job_v2.example-mrs-job will be created
  + resource "flexibleengine_mrs_job_v2" "example-mrs-job" {
      + cluster_id         = "xxxxxxxxxxxx"
      + finish_time        = (known after apply)
      + id                 = (known after apply)
      + name               = "example-mrs-job"
      + parameters         = "admin xxxxxxxxx 1 s3a://obs-demo-analysis/input s3a://obs-demo-analysis/output"
      + program_parameters = {
          + "--class" = "com.orange.bigdata.spark.examples.DriverBehavior"
        }
      + program_path       = "s3a://obs-demo-analysis/program/driver_behavior.jar"
      + region             = (known after apply)
      + start_time         = (known after apply)
      + status             = (known after apply)
      + submit_time        = (known after apply)
      + type               = "SparkSubmit"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

flexibleengine_mrs_job_v2.example-mrs-job: Creating...
╷
│ Error: Error execution MapReduce job: Bad request with: [POST https://mrs.eu-west-0.prod-cloud-ocb.orange-business.com/v2/bb4a068de4b24eea97b11d43e9b5910d/clusters/30b44829-2aa6-4f31-95cb-0895737de1e7/job-executions], error message: {"error_code":"0167","error_msg":"The v2 job API cannot be accessed."}
│ 
│   with flexibleengine_mrs_job_v2.example-mrs-job,
│   on mr-job.tf.json line 16, in resource.flexibleengine_mrs_job_v2.example-mrs-job:
│   16:             }
│ 

Expected Behavior

Create job resource for MRS cluster with Spark

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a MRS cluster 1.8.9 or 2.0.1 Analysis
  2. Create a job
  3. terraform apply
@dmicheneau
Copy link
Author

same problem with MRS cluster 3.1.0-LTS.1 in type Analysis.

@ShiChangkuo
Copy link
Collaborator

@dmicheneau Is the MRS cluster created by terraform?

@dmicheneau
Copy link
Author

dmicheneau commented Jan 30, 2023

yes see, terraform json:
And the resource is created succesfully.

{
    "resource": {
        "flexibleengine_mrs_cluster_v2": {
            "example-mrs-cluster": {
                "analysis_core_nodes": [
                    {
                        "data_volume_count": 1,
                        "data_volume_size": 600,
                        "data_volume_type": "SAS",
                        "flavor": "c6.4xlarge.4.linux.mrs",
                        "node_number": 3,
                        "root_volume_size": 480,
                        "root_volume_type": "SAS"
                    }
                ],
                "availability_zone": "eu-west-0a",
                "component_list": [
                    "Hadoop",
                    "Spark2x",
                    "Hive"
                ],
                "lifecycle": {
                    "prevent_destroy": true
                },
                "manager_admin_pwd": "Superxxxxxxx",
                "master_nodes": [
                    {
                        "data_volume_count": 1,
                        "data_volume_size": 600,
                        "data_volume_type": "SAS",
                        "flavor": "c6.4xlarge.4.linux.mrs",
                        "node_number": 2,
                        "root_volume_size": 480,
                        "root_volume_type": "SAS"
                    }
                ],
                "name": "example_mrs_cluster",
                "node_key_pair": "example-keypair",
                "subnet_id": "355f43be-ff60-4854-920d-7f00b3e7d37d",
                "type": "ANALYSIS",
                "version": "MRS 3.1.0-LTS.1",
                "vpc_id": "16f0268e-a59b-4566-b7d7-a519454978aa"
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants