jenkinsci / jenkinsci/aws-credentials-plugin

Cannot access AWS ECS resources when using v1.32

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
30
Forks
81
PR merge metrics
No merged PRs in 30d

Description

### Version report

Jenkins and plugins versions report:

```
Jenkins: 2.319
OS: Linux - 4.14.248-129.473.amzn1.x86_64
---
Parameterized-Remote-Trigger:3.1.5.1
ace-editor:1.1
amazon-ecr:1.6
amazon-ecs:1.24
ansicolor:1.0.0
ant:1.12
antisamy-markup-formatter:2.1
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
aws-batch:2.8
aws-credentials:1.32
aws-java-sdk:1.11.700
aws-java-sdk-ec2:1.12.101-300.vc09c7be9cb57
aws-java-sdk-minimal:1.12.101-300.vc09c7be9cb57
badge:1.8
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.1-1
bouncycastle-api:2.20
branch-api:2.7.0
build-timeout:1.20
build-token-root:1.7
bulk-builder:1.5
caffeine-api:2.9.2-29.v717aac953ff3
categorized-view:1.12
checks-api:1.7.2
cloudbees-folder:6.16
command-launcher:1.6
conditional-buildstep:1.4.1
credentials:2.6.2
credentials-binding:1.27
dashboard-view:2.17
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
durable-task:1.39
echarts-api:5.2.1-2
email-ext:2.84
external-monitor-job:1.7
extra-columns:1.24
font-awesome-api:5.15.4-1
ghprb:1.42.2
git:4.8.3
git-client:3.10.0
git-server:1.10
github:1.34.1
github-api:1.133
github-branch-source:2.11.3
google-login:1.6
gradle:1.37.1
groovy:2.4
groovy-postbuild:2.5
handlebars:3.0.8
jackson2-api:2.13.0-230.v59243c64b0a5
javadoc:1.6
jdk-tool:1.5
jjwt-api:0.11.2-9.c8b45b8bb173
job-dsl:1.77
jobConfigHistory:2.28.1
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
ldap:2.7
localization-support:1.1
localization-zh-cn:1.0.24
lockable-resources:2.11
mailer:1.34
mapdb-api:1.0.9.0
matrix-auth:2.6.8
matrix-project:1.19
maven-plugin:3.12
momentjs:1.1.1
monitoring:1.88.0
naginator:1.18.1
okhttp-api:3.14.9
pam-auth:1.6
parameterized-trigger:2.41
pipeline-build-step:2.15
pipeline-github-lib:1.0
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.2
pipeline-model-definition:1.9.2
pipeline-model-extensions:1.9.2
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.2
pipeline-stage-view:2.19
plain-credentials:1.7
plugin-usage-plugin:1.2
plugin-util-api:2.5.0
popper-api:1.16.1-2
popper2-api:2.10.1-1
rebuild:1.32
resource-disposer:0.16
run-condition:1.5
scm-api:2.6.5
script-security:1.78
slack:2.48
snakeyaml-api:1.29.1
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:1.23
subversion:2.15.1
thinBackup:1.10
timestamper:1.13
token-macro:266.v44a80cf277fd
trilead-api:1.0.13
variant:1.4
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:2.46
workflow-basic-steps:2.24
workflow-cps:2.94
workflow-cps-global-lib:2.21
workflow-durable-task-step:2.39
workflow-job:2.41
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39
```

- What Operating System are you using (both controller, and any agents involved in the problem)?

```
Linux
```

### Reproduction steps

- Clean Jenkins install v2.319
- Using AWS Credentials Plugins v1.32
- Assigned IAM Role for Jenkins master instance (AWS EC2) to be able to get information for a AWS ECS Cluster (ListContainerInstances and DescribeContainerInstances)
- Install Amazon Elastic Container Service (ECS) / Fargate (https://plugins.jenkins.io/amazon-ecs/) v1.24
- Go to Manage Jenkins -> Configure System -> Configure Clouds -> Click on Add a new cloud

### Results

Expected result:

Able to see the list of ECS Cluster resources based on the IAM Role granted to Jenkins master server.

Actual result:
- Cannot retrieve the expected ECS Cluster Resources
- The small window inside show errors *A Problem occurred while processing the request*
![Screen Shot 2021-11-05 at 23 49 25](https://user-images.githubusercontent.com/35058346/140548786-2386eabb-d612-4692-b7b5-eacdedfcdefd.png)

- Checking the Jenkins System Logs, in turns out there was an issue with ```java.lang.LinkageError: loader constraint violation: loader (instance of jenkins/util/AntClassLoader) previously initiated loading for a different type with name "com/amazonaws/ClientConfiguration"```. Please refer to log
[aws-cloudbess-error.log](https://github.com/jenkinsci/aws-credentials-plugin/files/7487651/aws-cloudbess-error.log)

*Note*
Downgrade AWS Credentials Plugins to v1.30, it works properly and can retrieve the expected ECS Cluster Resources

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with AWS Credentials 1.32, Amazon ECS 1.24, and the Jenkins EC2 IAM role described in the report. Start with the attached system log and the Configure System cloud setup, then investigate the reported ClientConfiguration LinkageError. Done means Jenkins can list the ECS cluster resources without the processing error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.