Skip to content

Can't attach a new IAM policy to the Head node #246

Open
@cartalla

Description

@cartalla

Description

I tried to add a new IAM policy to the Head node of an existing cluster. When I do I get the following error in the CFN stack for the
cluster and the update fails:

API: iam:AttachRolePolicy User: arn:aws:sts::415233562408:assumed-role/parallelcluster-ui-3-6-1-ParallelClusterLambdaRol-LI4PKRASE0G9/parallelcluster-ui-3-6-1-P-ParallelClusterFunction-WHsr6AQh5Vmr is not authorized to perform: iam:AttachRolePolicy on resource: role edapc5-RoleHeadNode-3WCWVCK2CZG because no identity-based policy allows the iam:AttachRolePolicy action

Steps to reproduce the issue

  1. Create a cluster using the UI
  2. Stop the cluster
  3. Update the cluster. Add a new IAM policy to the head node.

Expected behaviour

Update succeeds and new managed policy added to the head node role.

Actual behaviour

Update fails

Required info

In order to help us determine the root cause of the issue, please provide the following information:

  • Region where ParallelCluster UI is installed: us-east-1
  • Version of ParallelCluster UI and ParallelCluster (follow this guide to see what's installed): 3.6.1
  • Logs

Additional info

The following information is not required but helpful:

  • OS: alinux2
  • Browser: firefox

If having problems with cluster creation or update

YAML file generated by the ParallelCluster UI

Imds:
  ImdsSupport: v2.0
HeadNode:
  InstanceType: c6a.large
  Imds:
    Secured: true
  Ssh:
    KeyName: cartalla-us-east-1
  LocalStorage:
    RootVolume:
      VolumeType: gp3
  Networking:
    SubnetId: subnet-01736d0861ece4a42
    AdditionalSecurityGroups:
      - sg-0f7436a767536f5ab
  Iam:
    AdditionalIamPolicies:
      - Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
      - Policy: arn:aws:iam::415233562408:policy/ParallelClusterAssetReadPolicy
  Dcv:
    Enabled: true
Scheduling:
  Scheduler: slurm
  SlurmQueues:
    - Name: queue-1
      AllocationStrategy: lowest-price
      ComputeResources:
        - Name: queue-1-cr-1
          Instances:
            - InstanceType: c6a.large
          MinCount: 0
          MaxCount: 4
          DisableSimultaneousMultithreading: true
      ComputeSettings:
        LocalStorage:
          RootVolume:
            VolumeType: gp3
      Networking:
        SubnetIds:
          - subnet-01736d0861ece4a42
        PlacementGroup: {}
  SlurmSettings:
    Database:
      PasswordSecretArn: >-
        arn:aws:secretsmanager:us-east-1:415233562408:secret:ClusterPasswordSecret743CC6-jOMTmBFmV2HH-IYTAQK
      Uri: >-
        slurmedapc-slurmdbcluster120ff02f-yuyux7xgwbx7.cluster-c61o7abigj40.us-east-1.rds.amazonaws.com:3306
      UserName: slurm
    EnableMemoryBasedScheduling: true
    CustomSlurmSettings:
      - FederationParameters: fed_display
      - JobRequeue: 1
      - PreemptExemptTime: '0'
      - PreemptMode: REQUEUE
      - PreemptParameters: reclaim_licenses,send_user_signal,strict_order,youngest_first
      - PreemptType: preempt/partition_prio
      - PrologFlags: X11
      - SchedulerParameters: >-
          batch_sched_delay=10,bf_continue,bf_interval=30,bf_licenses,bf_max_job_test=500,bf_max_job_user=0,bf_yield_interval=1000000,default_queue_depth=10000,max_rpc_cnt=100,nohold_on_prolog_fail,sched_min_internal=2000000
      - ScronParameters: enable
      - AccountingStoreFlags: job_comment
      - PriorityType: priority/multifactor
      - PriorityWeightPartition: '100000'
      - PriorityWeightFairshare: '10000'
      - PriorityWeightQOS: '10000'
      - PriorityWeightAge: '1000'
      - PriorityWeightAssoc: '0'
      - PriorityWeightJobSize: '0'
Region: us-east-1
Image:
  Os: alinux2
Tags:
  - Key: parallelcluster-ui
    Value: 'true'

If having problems with custom image creation

YAML file of the custom image

Metadata

Metadata

Assignees

Labels

BacklogIssue has been tracked in team backlogenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions